Show profit in invoice

Discussion in 'Free Source Codes' started by ANANDH-laxmi, May 9, 2024.

    
  1. ANANDH-laxmi

    ANANDH-laxmi New Member


    Could load in the tally prime was using it in the ERP
    please help me correct it.


    Code:
    [#Line: EI COLUMNONE]
        Add: Right Field: At Beginning : LPURCOST, LSALEPRICE, LPROFIT
        Local: Field: LPURCOST : Info: "Last Purchase cost"
        Local: Field: LSALEPRICE : Info: "Last Sale Price"
        Local: Field: LPROFIT: Info: "Profit"
    
    [#Line: EI INVINFO]
        Add: Right Field: At Beginning: LPURCOST, LSALEPRICE, LPROFIT
    
    [Field: LPURCOST]
        Use : RATE PRICE FIELD
        Width : @@VCHRateWidth
        Set: $LASTPURCPRICE:STOCKITEM:$STOCKITEM
        Set Always: Yes
        Color: RED
        Skip: YES
        Style:LARGE BOLD
        Width: 12
        Invisible:NOT $$IsSales:$VOUCHERTYPENAME
    
    [Field: LSALEPRICE]
        Use: RATE FIELD
        Set: $LASTSALEPRICE:STOCKITEM:$STOCKITEM
        Set Always: Yes
        Color: red
        Skip: YES
        Style: LARGE BOLD
        Width: 12
        Space Left:2
        Invisible: NOT $$IsSales:$VOUCHERTYPENAME
    [Field: LPROFIT]
        Color:BLUE
        Use: amount forex field
        Set as:@@netprofit
    [System:Formulae]
        netprofit:(#vchvalue-(#lpurcost*#vchbilledqty))
    [#Line:vch narrprompt]
        Add: Right Field: At Beginning:profittotal
    
    [Field:profittotal]
    
        Border: totals
        Use: amount field
        Width:10
        Set as:$$Total:LPROFIT
    
     
    Last edited: May 9, 2024


  2. J.Ravi Kumar Rao

    J.Ravi Kumar Rao New Member


    [#line: EI COLUMNONE]
    Add: Field: After : VCH ITEM TITLE:LPURCOSTinfo,LSALEPRICEinfo,LPROFITinfo;

    [Field:LPURCOSTinfo]
    Type:String
    Info:"Last Purcost"
    Color:red
    Space Left:20
    Width:12
    Style: Normal Bold
    Invisible:NOT $$IsSales:$VOUCHERTYPENAME
    [Field:LSALEPRICEinfo]
    Type:String
    Info:"Last Sale Price"
    Color:red
    Width:15
    Style: Normal Bold
    Invisible:NOT $$IsSales:$VOUCHERTYPENAME
    [Field:LPROFITinfo]
    Type:String
    Use:name field
    Info:"Profit"
    Color:blue
    Width:15
    Style: Normal Bold
    Invisible:NOT $$IsSales:$VOUCHERTYPENAME

    [#Line: EI INVINFO]
    Add: Field: After:VCH stock item: LPURCOST, LSALEPRICE, LPROFIT

    [Field:LPURCOST]
    Use:Rate Price Field
    Width:mad:@VCHRateWidth
    Set:$LASTPURCPRICE:STOCKITEM:$STOCKITEM
    Set Always:Yes
    Color:RED
    Skip:Yes
    Style: LARGE BOLD
    Width:12
    Invisible:NOT $$IsSales:$VOUCHERTYPENAME

    [Field: LSALEPRICE]
    Use: RATE FIELD
    Set: $LASTSALEPRICE:STOCKITEM:$STOCKITEM
    Set Always: Yes
    Color: red
    Skip: YES
    Style: LARGE BOLD
    Width: 12
    Space Left:2
    Invisible: NOT $$IsSales:$VOUCHERTYPENAME
    [Field: LPROFIT]
    Color:BLUE
    Use: amount forex field
    Set as:mad:@netprofit
    Skip:Yes
    [System:Formulae]
    netprofit:(#vchvalue-(#lpurcost*#vchbilledqty))
    [#Line:vch narrprompt]
    Add: Right Field: At Beginning:profittotal

    [Field:profittotal]
    Border: totals
    Use: amount field
    Width:10
    Set as:$$Total:LPROFIT
     

    Attached Files:



  3. J.Ravi Kumar Rao

    J.Ravi Kumar Rao New Member


    please try with the above code its now working in Tally Prime
    screen shot also enclosed
     


  4. ANANDH-laxmi

    ANANDH-laxmi New Member


    thank you a lot sir ,
     


  5. ANANDH-laxmi

    ANANDH-laxmi New Member


    can we bring this to day book page
     


  6. ANANDH-laxmi

    ANANDH-laxmi New Member


    Can you guide me to store the profittotal in udf vaule and store it for futher use .
     


  7. Hems

    Hems Member



    [Field:profittotal]
    Border: totals
    Use: amount field
    Width:10
    Set as:$$Total:LPROFIT
    Storage : LPPROFIT123

    [System: udf]
    LPPROFIT123:AMOUNT:23600


     


  8. ANANDH-laxmi

    ANANDH-laxmi New Member


    THIS ERROR IT SHOWS
    upload_2024-5-14_12-15-38.png
     


Share This Page