I need to print two types of sales invoice 1. Credit sales & 2. Cash sales i have created two types of vouchers under sales. but how to define if credit sales = Credit invoice format should print & for cash Cash invoice should print.
[#Menu:GatewayofTally] Add: Key Item: Petty Cash :C: Display: Petty cash [Report: PettyCash] Form: petty cash [Form: Petty Cash] Part: New part1 Bottom Part: bottom part Use: DSP template Background: Light yellow Width: 100% page [Part: NEw Part1] Add : Left Part : Petty cash receipt, Add: Right Parts: petty cash paid ;Total: total parts ;Repeatetty Cash Body : mycoll1 ;Add : Bottom Part: Bottom Part cash Border: thick box Sync: Yes [Part: Petty cash receipt] Add: Lines: Title Left line ,column left titles,Petty Cash left body, Repeatetty Cash left body : mycoll1 ;Total: left total ;Height : 100 % Page ;Width : 50 % Page Horizontal Align: left Scroll: Vertical Common Borders: Yes Background: Light yellow Width: 50% page [Partetty cash paid] Add: Lines: Title Right line, column right titles,Petty Cash right body Repeatetty Cash right body : mycoll2 ;Height : 100 % Page ;;Width : 100 % Page Horizontal Align: Right Scroll: Vertical Width: 50% page Common Borders: Yes [Line: Title Left line] Field: Simple Field, ;Petty cash, ;Right Field: Name Field, Date1 Local: Field : Simple Field : Set as: "PETTY CASH RECEIVED" Local: Field : Simple Field : Style: Large Bold Local: Field : Simple Field : Align: Center Local: Field : Simple Field : Full Width: Yes Local: Field : Simple Field : Color: White Local: Field : Simple Field : Background: DEEP COBALT BLUE ;Local: Field: Name Field : Set as: "Date :" [Line: Title right line] Field: Simple Field, ;Petty cash, ;Right Field: Name Field, Date1 Local: Field : Simple Field : Set as: "PETTY CASH EXPENSES" Local: Field : Simple Field : Style: Large Bold Local: Field : Simple Field : Align: Center Local: Field : Simple Field : Full Width: Yes Local: Field : Simple Field : Color: White Local: Field : Simple Field : Background: DEEP COBALT BLUE ;::::::::::::::::::::::::::::;Column;::::::::::::::::::::::; ;[Part: Column Parts] ; Add: Line: Column line ; Scroll: Vertical [Line: column left titles] ;;Field: Pt Sl No, PT Name, pt Amount Rcd, Amount paid, Customer Name, Use : Petty cash left body Local: Field: Default : Lines : 1 Local: Field: Default : Type : String Local: Field: Default : Style : Normal Bold ;Local: Field: LC SlNo : Info : "SR NO" Local: Field: Lc Date : Info : "DATE" Local: Field: Lc Name : Info : "PARTICULARS" Local: Field: Lc Amount Rcd : Info : "AMOUNT R'CD" Border : Column Titles [Line: column right titles] Use: Petty cash right body Local: Field: Default : Lines : 1 Local: Field: Default : Type : String Local: Field: Default : Style : Normal Bold Local: Field: RC Date : Info : "SR.NO." Local: Field: RC Date : Info : "DATE" Local: Field: RC Customer : Info : "PARTICULARS" Local: Field: RC Amount Paid: Info : "AMOUNT PAID" Border : Column Titles ;[Part: Petty Cash Body] ; Line: Column titles ; Line: Petty Cash body [Line: Petty Cash left body] Fields: Lc SlNo. , Lc date, Lc Name, Lc Amount Rcd, Border: thin bottom [Line: Petty Cash Right body] Field: Rc SlNo. , Rc Date,Rc customer, Rc Amount Paid, Border: thin bottom [Field: Lc SlNo.] Use : Number Field Width: 11 MM Set as : $$Line Align: Centre Border : Thin Left Right [Field: Lc date] Use: short date field Type: Date Width: 18 MM Set as: $Date Align: Left Border : Thin Left Right [Field: Lc Name] Use: Name Field Type: String Full Width: Yes Border : Thin Right Set as: $LedgerName Lines: 2 [Field: Lc amount Rcd] Use: Amount Field Type: Amount Width: 30 MM Set as: $Amount Border:Thin Right Align:Center ;Right Fields [Field: Rc SlNo.] Use : Number Field Width: 11 MM Set as : $$Line Align: Centre Border : Thin Left Right [Field: Rc date] Use: short date field Type: Date Width: 18 MM Border : Thin Left Right Set as: $Date Align: Left [Field: Rc Amount paid] Use: Amount Field Type: Amount Width: 23 MM Border : Thin Right Set as: $amount Align: Right Style: normal bold [Field:Rc customer] Use: Name Field Type: String Full Width: Yes Border : Thin Right Set as: $ledgername Lines: 2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Bottpom parts [Part: bottom part] Add: left Part: total left, total Right Local: Part: default : Width: 51% page Common Border : Yes Sync: no [Part: total left] Lines: Ledgername1, OPngline Background: Lily White ;Width: 50% page [Line: ledgername1] Field: simple prompt, NAme field ;Local: Field: Default : Width: 30 Local: Field: Simple prompt : Set as: "LEDGER NAME" Local: Field: Simple prompt : Width: 30 ;Local: Field: Name Field : Set as: $ledgername Local: Field: Name Field : Set as: "CASH" Local: Field: Default : Style: Large bold Border: Thin Bottom [Line: opngline] Field: simple prompt, NAme Field;Amount Field Local: Field: Default : Width: 30 Local: Field: Default : Style: Large bold Local: Field: Simple prompt : Set as: "OPENING CASH" Local: Field: Name Field : Set as@PartyOpBalance Local: Field: Name Field : Style: Large bold Border: Thin Bottom [System: Formula] $$LocaleString:: $$String:"Opening Balance: " + $$LocaleString$OpeningBalance:Ledger:##LedgerName) partyname1 : $Ledgername:Group:"Cash In hand" [Part: total Right] Line: TOtal left line,TOtal Right line, Balance amount ;Space Left: Background: Lily White ;Width: 50% page Border: Thin Left Right [Line: total left line] Right Field: Simple Field, left total Local: Field: Simple Field : Set as: "TOTAL CASH REVEIVED" Local: Field: Simple Field : Style: Normal bold Border: Thin Bottom [Field: left total] Use: amount field Set as: $$CollAmtTotal:mycoll1:$amount Width: 20 Style: large bold Border: Thick Left ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Line: total right line] Right Field: Simple Field,right total Local: Field: Simple Field : Set as: "TOTAL EXPENSES" Local: Field: Simple Field : Style: Normal bold Border: Thin Bottom [Field: right total] Use: amount field Set as: $$CollAmtTotal:mycoll2:$amount Width: 20 Style: large bold Border: Thin Right [Line: Balance Amount] Right Field: Simple Field, Balance Field Local: Field: Simple Field : Set as: "BALANCE IN CASH" Local: Field: Simple Field : Style: Normal bold Border: Thin Bottom [Field: Balance Field] Use: amount field Set as : $$CollAmtTotal:mycoll1:$amount - $$CollAmtTotal:myColl2:$amount Width: 20 Style: large bold Align: Right Border : Thick Left [Collection: mycoll2] Type: voucher Fetch: *.*,LedgerEntries.* Filter: Onlypayment [Collection: Mycoll1] Type: Voucher Fetch: *.*,LedgerEntries.* Filter: onlyreceipt [System: Formulae] Onlypayment: $VOUCHERTYPENAME=" Payment" onlyreceipt : $VOUCHERTYPENAME="Receipt" ;;;End code attribute defination with out a valid defination i am using 9.1.1 kindly solve this issue