DISCOUNT IN SALES INVOICE

Discussion in 'Tally Developer' started by ahmed rishali, Mar 28, 2013.

    
  1. ahmed rishali

    ahmed rishali Member


    Dear sir,
    I customized invoice , want to make discount field only at bottom

    eg:in particulars showing all items and down all ledgers then total amount (items+ledgers)
    but the discount ledger i need at bottom space ,this will minus and bottom grand total

    I USED THIS CODE FOR LEDGER ENTRIES , PLEASE SUGGEST ME WHAT ARE THE CHANGES I NEED ,

    [Part : Traffic Acc]
    Line : Traffic Acc
    Repeat:Traffic Acc:Ledger Entries
    Vertical : Yes

    [Line : Traffic Acc]
    Space top: 2 mms
    Empty: $LedgerName = $PartyLedgerName
    Field : Traffic INV SlNo, Traffic INV Particular
    Right Field : Traffic INV qty,Traffic INV unit,Traffic INV Rate, Traffic INV Amt
    Local : Field : Traffic INV SlNo : Set as : ""
    Local : Field : Traffic INV Particular : Set as : $LedgerName ;;:not contains " discount"
    Local : Field : Traffic INV Particular : Align : Right

    Local : Field : Traffic INV Particular : Space Right : 50 mms
    Local : Field : Traffic INV Particular : Style : Traffic normal8
    ; Local : Field : Traffic INV purticular : Border : thick left right

    Local: Field : Traffic INV Rate: Set as: ""

    Local : Field : Traffic INV qty : Set as : ""
    Local : Field : Traffic INV unit : Set as : ""
    Local : Field : Trafficpo Amt : Set As :$Amount ;;:$LedgerName ;;:not contains " discount"
    ;Local : Field : Traffic INV Amt : Border : thick left right


    ALSO PLEASE TELL ME HOW CAN I FORMAT UDF FIELD, FOR EXAMPLE I CREAT AN UDF FOR VEHICLE IN AND OUT DATE I WANT THIS FIELD ONLY FOR ENTERING DATE

    Thank you !
     

    Attached Files:



  2. ahmed rishali

    ahmed rishali Member


    Sir please help
     


  3. kpstup

    kpstup New Member


    U try to add Discount in INV bottom part :)
     


  4. ahmed rishali

    ahmed rishali Member


    sir how can i add only discount ledger in inv bottom
     


  5. Yogender

    Yogender Member


    Storage:LEDGERNAME:ledgerentries:first:$narration:ledger:$ledgername contains "discount"
     


  6. ahmed rishali

    ahmed rishali Member


    got it sir , thank you
     


  7. saranbe

    saranbe New Member


    SIR,

    PLS SENT COMPLETE TDL.
     


  8. Rakesh1988

    Rakesh1988 New Member


    hey i want to add total discount in bottom part can someone help me please i added all titile fields only total VAT and Total Discount is not coming
     


  9. Rakesh1988

    Rakesh1988 New Member


    ;Here is my code fr dotmatrix pritnting only Transport (Ind Expense) and roundoff is not coming

    ;Prepared By Rakesh
    [Report: Smpl InvPrinting]

    Use : Day Book
    Set : VoucherTypeName : $$VchTypeSales
    Local : Form : Default : Add : Parts : At Beginning : Smpl Info

    [Part: Smpl Info]

    Lines : Smpl Info Line

    Local : Line : Smpl Info Line : Local : Field : Info Field : Info : "Drill Down into a Sales Invoice and print the same to view the Customized Invoice."
    Local : Line : Smpl Info Line : Local : Field : Info Field : Color : Red
    [#Form: Comprehensive Invoice]
    Option : Smpl Invoice Printing : @@IsSales
    [#Form: Simple Printed Invoice]
    Option : Smpl Invoice Printing : @@IsSales
    [!Form: Smpl Invoice Printing]
    Delete : Parts
    Delete : Bottom Parts
    Delete : PageBreak
    Space Top : 2.70 inch
    Space Bottom: 5
    Space Left : 0.20 inch
    Space Right : 0
    Add : Parts : Smpl Invoice Top Part
    Add : Parts : Smpl Invoice Body Part
    Add : Bottom Parts : Smpl Invoice Bottom Part
    [Part: Smpl Invoice Top Part]
    Left Part:abc

    [Part:abc]
    Lines : Smpl PartyName, Party Mob,Party Address,LED VATGCC TINNumber1

    [Line: Smpl PartyName]
    Left Field : Short Prompt, Smpl PartyName
    Right Field :Smpl VCHNo

    Fields : Short Prompt, Smpl PartyName
    Local: Field: Short Prompt : Set as : " "
    Space Bottom:0.10 inch

    [Field: Smpl PartyName]
    Use : Name Field
    Set as : $PartyLedgerName
    Full Width:Yes

    Local: Field: Smpl VCHNo :Set as : " "

    [Field: Smpl VCHNo]
    Use : Short Name Field
    Set as : $VoucherNumber
    [Line: Party Mob]
    Field : Short Prompt, Party Mob
    Right Field :Smpl VCHDt
    Local: Field: Short Prompt : Set as : " "
    Space Bottom:0.15 inch
    [Field: Party Mob]

    Use : Number Field
    Set as : @@VchContactNo
    Full Width:Yes
    Format :"No comma"

    Local: Field: Smpl VCHDt :Set as : " "
    [Field: Smpl VCHDt]
    Local: Field: Smpl VCHDt:Align :Right

    Use : Short Date Field
    Set as : $Date
    Full Width:Yes
    [Line: Party Address]


    Fields : Short Prompt
    Local : Field : Short Prompt : Set as : " "
    Space Bottom:0.15 inch
    Field:Address
    [Field:Address]
    Use:Name Field
    Set as : $BasicBuyerAddress



    [Line: LED VATGCC TINNumber1]
    Fields :Short Prompt,LED VATGCC TINNumber2
    Local: Field:Short Prompt : Set as : " "
    Space Bottom:5
    [Field: LED VATGCC TINNumber2]

    Use : Default Field
    Set as : $VATTINNumber:Ledger:$PartyName
    Full Width:Yes
    Format: "No comma"
    [Line: Smpl Column Titles]
    Skip Rows:2
    Use : Smpl IE Details
    Local: Field: Default : Lines : 2
    Local: Field: Default : Type : String
    Local: Field: Default : Style : Normal Bold

    Local: Field: Smpl IE SrNo : Set as : "Sr No"
    Local: Field: Smpl IE SiName : Set as : "Name"
    Local: Field: Smpl IE Qty : Set as : "Billed Qty"
    Local: Field: Smpl IE Unit : Set as : "Unit"
    Local: Field: Smpl IE Rate : Set as : "Rate"
    Local: Field: Smpl IE Exl Vat : Set as : "Amount Excl VAT"
    Local: Field: Smpl IE VAT% : Set as : "Vat%"
    Local: Field: Smpl IE VAT Amount: Set as : "VAT Amount"
    Local: Field: Smpl IE Amount : Set as : "Amount"

    ;Space Bottom:0.5
    Border : Column Titles
    [Part: Smpl Invoice Body Part]
    Parts : Smpl IE Details
    Vertical : Yes
    Scroll : Vertical
    CommonBorder: No
    [Part: Smpl IE Details]
    Lines : Smpl IE Details
    Repeat : Smpl IE Details : Inventory Entries
    Total : Smpl IE Qty,Smpl IE Unit,Smpl IE Rate,Smpl IE Exl Vat ,Smpl IE VAT% ,Smpl IE VAT Amount,Smpl IE Amount
    [Line: Smpl IE Details]
    Fields : Smpl IE SrNo, Smpl IE SiName
    Right Fields: Smpl IE Qty,Smpl IE Unit,Smpl IE Rate,Smpl IE Exl Vat ,Smpl IE VAT% ,Smpl IE VAT Amount, Smpl IE Amount
    Explode : Smpl Item Desc : $$NumItems:UserDescription > 0
    [Part: Smpl Item Desc]
    Lines : Smpl Item Desc
    Repeat : Smpl Item Desc : UserDescription
    [Line: Smpl Item Desc]
    Fields : Smpl Item Desc
    [Field: Smpl Item Desc]
    Use : Name Field
    FullWIdth : Yes
    Indent : 8
    Set as : $UserDescription
    Style : Normal Italic
    [Field: Smpl IE SrNo]
    Use : Short Name Field
    Set as : $$Line
    ;Border : Thin Left
    FullWIdth : Yes
    ;Space Right:0
    [Field: Smpl IE SIName]
    Use : Name Field
    Set as : $StockItemName
    ;Border : Thin Left
    WIdth : 25
    Space Right:25
    [Field: Smpl IE Qty]
    Use : Number Field
    Set as : $BilledQty
    ;Border : Thin Left
    Align : Right
    FullWIdth : Yes
    [Field: Smpl IE Unit]
    Use :Name Field
    Set as :"NOS"

    Align : Right
    FullWIdth : Yes
    Space Right:3





    [Field: Smpl IE Rate]
    Use : RatePriceField
    Set as : $Rate
    ;Border : Thin Left
    FullWIdth : Yes
    Space Right:3
    [Field: Smpl IE Exl Vat]
    Use : Default
    Set as : $VATAssesableVal
    ;Border : Thin Left
    Align : Right
    Width : Default
    FullWIdth : Yes
    Space Right:3
    [Field: Smpl IE VAT%]
    Use : Number Field
    Set as : "5 %"
    ;Border : Thin Left
    Align : Right
    FullWIdth : Yes
    ; Space Left:3
    [Field: Smpl IE VAT Amount]
    Use : Amount Field
    Style : Normal Bold
    Align : Right
    FullWIdth : Yes
    Set as : If $$IsEmpty:mad:transnature Then "" Else $$AsCrAmt:mad:taxamt
    taxamt : $$ReportObject:$$CollectionFieldByKey:$VTAGCCInv_TaxAmount:mad:@GVATTaxAnalysisItemLedKey:VATGCCTaxAnalysisAlongWithItems
    transnature : $$ReportObject:$$CollectionFieldByKey:$VATGCCInv_TransNature:mad:@GVATTaxAnalysisItemLedKey:VATGCCTaxAnalysisAlongWithItems
    Invisible : ((@@IsPurchase OR @@IsDebitNote) AND Not ##PUVATPrnVATAmt) OR ((@@IsSales OR @@IsCreditNote) AND Not ##SAVATPrnVATAmt)
    ;Space Left:0

    [Field: Smpl IE Amount]
    Use : Amount Field
    Set as : If $$IsEmpty:mad:transnature Then "" Else $$AsCrAmt:($$AmountAdd:mad:taxableamt:mad:taxamt)
    taxableamt : $$ReportObject:$$CollectionFieldByKey:$VTAGCCInv_AssesableValue:mad:@GVATTaxAnalysisItemLedKey:VATGCCTaxAnalysisAlongWithItems
    taxamt : $$ReportObject:$$CollectionFieldByKey:$VTAGCCInv_TaxAmount:mad:@GVATTaxAnalysisItemLedKey:VATGCCTaxAnalysisAlongWithItems
    transnature : $$ReportObject:$$CollectionFieldByKey:$VATGCCInv_TransNature:mad:@GVATTaxAnalysisItemLedKey:VATGCCTaxAnalysisAlongWithItems
    Style : Small
    Align : Right
    Width : @@AmountWidth
    Format : "NoComma"
    Invisible : NOT @@InvWithVATGCCTotalAmt
    [Part:Smpl Invoice Bottom Part]
    Space Top:4.0
    Left Part:TDLInv Part2
    Right Part:TDLInv Part1


    [Part:TDLInv Part2];Left Part In Bottom
    Lines:VRGInvAmtinWords

    [Line:VRGInvAmtinWords]
    Left Field:ShortPrompt,VRGInvAmtinWords
    Fields:ShortPrompt,VRGInvAmtinWords
    Local:Field:ShortPrompt:Set as:" "
    [Field:VRGInvAmtinWords]
    Use:Name Field
    Set as:$$InWords:$Amount + "Only"
    Style:Normal Bold
    Full Width:Yes
    [Part:TDLInv Part1];Right part in bottom
    Lines:Gross Amt,Transport Cost,InvDtLine, DiscTotal ,Roundoff,Total Amount
    [Line:Gross Amt]

    Field:Medium prompt, InvNofld
    Local:Field:Medium Prompt:Set as:$$LocaleString:"Gross Amount"
    Local: Field:Medium Prompt:Style:Normal Bold
    Space Bottom:0.5

    [Field:InvNoFld]
    Use : Amount Field
    Set as : $$FilterAmtTotal:AllLedgerEntries:NotIsVATAcct:$Amount
    Format:"No Commas"

    [Line:Transport Cost]
    Field:Medium prompt, Transport Cost1
    Local:Field:Medium Prompt:Set as:$$LocaleString:"Transport Cost"
    Local: Field:Medium Prompt:Style:Normal Bold
    Space Bottom:0.5
    [Field:Transport Cost1]

    Use : Amount Field
    Set as : "13"
    Format:"No Commas"
    [Line:InvDtLine]
    Field:Medium prompt, InvDtfld
    Local:Field:Medium Prompt:Set as:$$LocaleString:"Total Exc Vat"
    Local: Field:Medium Prompt:Style:Normal Bold
    Space Bottom:0.5
    [Field:InvDtFld]
    Use:Amount Field
    Set as:$$FilterAmtTotal:AllLedgerEntries:NotIsVATAcct:$Amount
    Format:"No Commas"

    [Line: DiscTotal]
    Field:Medium prompt, Discfld
    Local:Field:Medium Prompt:Set as:$$LocaleString:"VAT 5%"
    Local: Field:Medium Prompt:Style:Normal Bold
    Space Bottom:0.5
    [Field:Discfld]
    Use:Amount Forex Field

    Set as: $$FilterAmtTotal:AllLedgerEntries:IsVATAcct:$Amount
    Format:"No Commas"
    [Line:Roundoff]
    Field:Medium prompt, Roundoffa
    Local:Field:Medium Prompt:Set as:$$LocaleString:"Roundoff"
    Local: Field:Medium Prompt:Style:Normal Bold
    Space Bottom:0.5
    [Field:Roundoffa]
    Use:Number Field
    Set as:mad:@InvWithAm
    Format : "NoZero,Percentage"

    Invisible : If (@@IsJobOrderOut OR @@IsJobOrderIn OR (@@IsSales And (@@AcctsInvoice OR @@AcctsInvoiceMfgr))) Then Yes Else (NOT @@WithDiscount OR (NOT @@InvWithRate AND NOT @@InvWithAmt) OR @@InvWithDiscount)
    [Line:Total Amount]
    Field:Medium prompt, Total Amount
    Local:Field:Medium Prompt:Set as:$$LocaleString:"Total Amount"
    Local: Field:Medium Prompt:Style:Normal Bold
    Space Bottom:0.5
    [Field:Total Amount]
    Use:Amount Field
    Set as:$$SignedAmount:$Amount
    Format:"No Commas"
     


Share This Page