I am 2,3 weeks old developer in Tally, Trying to solve personal use case in family business. Please help me with below Problem. Thanks in Advance. Problem: I am making new sales order normal one no group. that ledgername is under particular group name. when i am making sales invoice, i wanted to refrence any of order under that ledger group. below code make union of sales order under particular ledger group but if partyledger is diffrent than what i choose from other group ledgername then invetoryentry or batchallocations refrence order nos are missing. below code group 11 ledgername it's fixed code for upto 11 ledger not dynamic one. what is the best way to do it? if any sample code or ready source code out there then much appreciated? even if paid source code is available then let me know. i.e. Group name : LAXMI GROUP Ledgername : Laxmi 1 Ledgername : Laxmi 2 Ledgername : Laxmi 3 then let say Laxmi1, Laxmi2, Laxmi3 any one has sales order or all have sales order when i make sales invoice i need to make invoice by any ledgername by entering refrence of any sales order under that group ===> Sample Code ===> ;; START PENDING SALES ORDER ;; [System: Variable] Variable : mypartyname : String Variable : groupname : String Variable : party1 : String Variable : party2 : String Variable : party3 : String Variable : party4 : String Variable : party5 : String Variable : party6 : String Variable : party7 : String Variable : party8 : String Variable : party9 : String Variable : party10 : String Variable : party11 : String [Collection: myledgers] Type: Ledger Child Of: $(Ledger,##mypartyname).parent Fetch: name [Function: setPartyNames] ;;Variable: partyname : String : If $$IsEmpty$$BaseOwner:$PartyLedgerName) then $LedgerEntries[1].LedgerName Else ($$BaseOwner:$PartyLedgerName) Variable : Counter : Number RETURNS : String 001 : Set: mypartyname : If $$IsEmpty$$BaseOwner:$PartyLedgerName) then $LedgerEntries[1].LedgerName Else ($$BaseOwner:$PartyLedgerName) 002: Set: groupname : $(Ledger,##mypartyname).parent 003 : SET : Counter : 0 004 : Set: party1 : "" 005 : Set: party2 : "" 006 : Set: party3 : "" 007 : Set: party4 : "" 008 : Set: party5 : "" 009 : Set: party6 : "" 010 : Set: party7 : "" 011 : Set: party8 : "" 012 : Set: party9 : "" 013 : Set: party10 : "" 014 : Set: party11 : "" 015 : If : ##groupname = "Sundry Debtors" 016 : Set: party1 : ##mypartyname 017 : Return: ##mypartyname 018 : End If ;;001 : Set : getPartyName : ##partyname 020 : WALK COLLECTION : myledgers 030 : SET : Counter : ##Counter+1 040 : If: ##Counter = 1 050 : Set: party1 : $name 060 : End If 070 : If: ##Counter = 2 080 : Set: party2 : $name 090 : End If 100 : If: ##Counter = 3 110 : Set: party3 : $name 120 : End If 130 : If: ##Counter = 4 140 : Set: party4 : $name 150 : End If 160 : If: ##Counter = 5 170 : Set: party5 : $name 180 : End If 190 : If: ##Counter = 6 200 : Set: party6 : $name 210 : End If 220 : If: ##Counter = 7 230 : Set: party7 : $name 240 : End If 250 : If: ##Counter = 8 260 : Set: party8 : $name 270 : End If 280 : If: ##Counter = 9 290 : Set: party9 : $name 300 : End If 310 : If: ##Counter = 10 320 : Set: party10 : $name 330 : End If 340 : If: ##Counter = 11 350 : Set: party11 : $name 360 : End If 370 : END WALK 380 : RETURN : "test" [*Collection: InvSalesOrders] Title : $$LocaleString:"List of Sales Orders" Collections : NewOrderNumber Parmvar : pvPartyLedgerNameHAHA : String : $$setPartyNames Collections : table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11 Add: SubTitle : $$LocaleString:"Order No", "Order Date", "Item","Ledger Name", "Godown", "Batch", "Order Qty", "Pending Qty", "Rate", "Narration" Format : A, 13 Format : B, 8 ;;Format : $PartyLedgerName, 20 Format : C ;;Format : $inventoryentries[1].basicuserdescription[1].BasicUserDescription Format : D, 18 Format : E, 18 Format : F, 13 Format : G Format : H Format : I Format : J [Collection: table1] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party1 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party1 Else ##party1 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table2] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party2 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party2 Else ##party2 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table3] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party3 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party3 Else ##party3 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table4] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party4 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party14 Else ##party4 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table5] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party5 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party5 Else ##party5 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table6] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party6 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party6 Else ##party6 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table7] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party7 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party7 Else ##party7 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table8] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party8 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party8 Else ##party8 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table9] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party9 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party9 Else ##party9 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table10] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party10 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party10 Else ##party10 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger [Collection: table11] Title : $$LocaleString:"List of Sales Orders" Type : Ledger Sales Orders ChildOf : ##pvPartyLedgerName Parmvar : pvPartyLedgerName : String : ##party11 ParmVar : pvFirstPartyLedgerName : String : If @@IsRejIn OR @@IsRejOut Then $$BaseOwner:##party11 Else ##party11 Parm Var : pvIsInvoice : Logical : @@IsInvoice Parm Var : pvIsPurcSalesVchType : Logical : (@@IsPurchase OR @@IsSales OR @@IsRcptNote OR @@IsDelNote OR @@IsSalesOrder OR @@IsPurcOrder OR @@IsCreditNote OR @@IsDebitNote) Parm Var : pvIsReceiptVch : Logical : @@IsReceipt Parm Var : pvIsPaymentVch : Logical : @@IsPayment Parm Var : pvIsJournalVch : Logical : @@IsJournal Format : $Name, 13 Format : $Date, 8 : Universal Date Format : $parent Format : $LedgerEntries[1].LedgerName, 20 Format : $GodownName, 18 Format : $BatchName, 13 Format : $inventoryentries[1].BatchAllocations[1].billedqty Format : $BilledQty Format : $Rate Format : $Narration Fetch : Name, PartyLedgerName, Date,parent, BatchName, BilledQty, Rate, Narration Unique : $Name, $BasicPurchaseOrderNo, $Date Compute : IsVchExcise : (If @@IsExciseTraderOn then (If $$IsEmpty$LedgerEntries[1].IsVchExcise) then No else $LedgerEntries[1].IsVchExcise) Else No) ; Compute introduced for to check Excise Voucher Filter : TrackOfLedger ;; END PENDING SALES ORDER ;;
Try This........ Parmvar : pvPartyLedgerName : String : If $$IsEmpty$$BaseOwner:$PartyLedgerName) then $LedgerEntries[1].LedgerName Else ($$BaseOwner:$PartyLedgerName)
this is already happening in code, it is what default thing in tally. 001 : Set: mypartyname : If $$IsEmpty$$BaseOwner:$PartyLedgerName) then $LedgerEntries[1].LedgerName Else ($$BaseOwner:$PartyLedgerName) let say 5 Party/Ledger is under One Group Then my Sales order is of Group, as of now i make sales order of any one ledger/party, so i can make invoice of that ledger name only. it's what in tally. but when i make Sales Invoice that group may say make sales bill out of those 5 ledger/party, so goods may go to random ledger/party from those 5....