How To auto entry fixed discount in field....

Discussion in 'Free Source Codes' started by udaya, Mar 12, 2022.

    
  1. udaya

    udaya Active Member


    I want to fixed amount to discount by my calculation... anybody guide me...

    upload_2022-3-12_8-28-48.png
     


  2. udaya

    udaya Active Member


    [#Field: EI Value]
    use: Amount Forex Field
    Set as: If $LedgerName = "Discount" Then "-" + (#OTSCGSTAmt + #OTSSGSTAmt) Else ""
     


  3. mahbu

    mahbu Member


    use like this is better

    Set By Condition : @IsMyDiscountLed : $$Negative:(#OTSCGSTAmt + #OTSSGSTAmt)
    IsMyDiscountLed : $LedgerName = "Discount"
     


  4. udaya

    udaya Active Member


    Mahbu thanks lot ..... but like below not working (it not getting Auto Value).... please .... support


    [#Field: EI Value]
    Set By Condition : @IsMyDiscountLed : $$Negative:#OTSCGSTAmt + #OTSSGSTAmt
    IsMyDiscountLed : $LedgerName = "Discount"
     

    Attached Files:



  5. mahbu

    mahbu Member


    What is the Nature of Ledger "OTSCGS" + and "OTSSGST" ?
    you can make formula like ($Taxtype:Ledger:$LedgerName="Others") then :$AllLedgerEntries[1,@@Formula].LedgerEntries.Amount
     


  6. udaya

    udaya Active Member


    Sorry.... Mr. Mahbu....
    [#Field: EI Value]
    Set By Condition : @IsMyDiscountLed : $$Negative:#CGSTAmt + #SGSTAmt
    IsMyDiscountLed : $LedgerName = "Discount"

    What is the Field name and how set condition.... thank advance
    upload_2022-3-14_6-51-51.png
     
    mahbu likes this.


  7. Murali.R

    Murali.R Member


    [#Field: EI Value]
    Set By Condition : If @IsMyDiscountLed then $$Negative:@CGST + $$Negative:mad:SGST Else ""
    IsMyDiscountLed : $LedgerName = "Discount"
    SGST :$$FilterAmtTotal:LedgerEntries:SGSTLed:$Amount
    SGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"SGST"
    CGST :$$FilterAmtTotal:LedgerEntries:CGSTLed:$Amount
    CGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"CGST"
     
    mahbu likes this.


  8. udaya

    udaya Active Member


    Thanks Murali sir.... err at formula Showing.... when Open Sales Voucher... please Guide me.....

    upload_2022-3-15_6-59-33.png

    [#Field: EI Value]
    Set By Condition : If @IsMyDiscountLed then $$Negative:mad:CGST + $$Negative:mad:SGST Else ""
    IsMyDiscountLed : $LedgerName = "Discount"
    SGST :$$FilterAmtTotal:LedgerEntries:SGSTLed:$Amount
    SGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"SGST"
    CGST :$$FilterAmtTotal:LedgerEntries:CGSTLed:$Amount
    CGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"CGST"
     
    mahbu likes this.


  9. mahbu

    mahbu Member


    Try this

    [#Field: EI Value]
    Set By Condition : @@IsMyDiscountLed : $$Negative:mad:@CGST + $$Negative:mad:@SGST
    [System:Formula]
    IsMyDiscountLed : $LedgerName contains "Discount"
    SGST :$$FilterAmtTotal:LedgerEntries:SGSTLed:$Amount
    SGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"SGST"
    CGST :$$FilterAmtTotal:LedgerEntries:CGSTLed:$Amount
    CGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"CGST"
     


  10. udaya

    udaya Active Member


    Thanks you for continue support Mr Mahbu...

    I am Using ERP 9 ... its not working

    video file is added
     

    Attached Files:

    mahbu likes this.


  11. mahbu

    mahbu Member


    TODAY I CHECKED ERP ALSO IT IS WORKING ME
    Please check your code as per attached picture
     

    Attached Files:



  12. udaya

    udaya Active Member


    Thanks lot Mahbu... Its Working Fine ... one issue how the value Should Less (-25.48) as in tally (-)25.48 please....
     


  13. udaya

    udaya Active Member


    upload_2022-3-16_8-11-14.png
     
    mahbu likes this.


  14. mahbu

    mahbu Member


    Try this
    [#Field: EI Value]
    Set By Condition : @@IsMyDiscountLed : $$Negative:mad:@CGST + $$Negative:mad:@SGST
    Control : MydiscountValue : @@IsMyDiscountLed and (@@CGST+@@SGST) < #EIValue
    [System:Formula]
    IsMyDiscountLed : $LedgerName contains "Discount"
    SGST :$$FilterAmtTotal:LedgerEntries:SGSTLed:$Amount
    SGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"SGST"
    CGST :$$FilterAmtTotal:LedgerEntries:CGSTLed:$Amount
    CGSTLed :$Name:Ledger:$LedgerName Contains $$LocaleString:"CGST"
    MydiscountValue : "Morethan SGSST+CGST not allowed"
     


  15. udaya

    udaya Active Member


    Mr. Mahbu Above code is working Same as Previous Code. I what Discount amount as (-)15.24. The code Give as 15.24. (means Plus Value)...
    Please Give me this Solution...
     


  16. udaya

    udaya Active Member


    The discount value less from total amount... but it add the amount. please guide me...
     


  17. mahbu

    mahbu Member


    Hi Mr.Udaya
    just change formula as per your criteria
     


  18. udaya

    udaya Active Member


    Your grate Support Is Like a teacher.... thanks lot..... mahbu... thanks once again....
     


  19. udaya

    udaya Active Member


    Your grate Support Is Like a teacher.... thanks lot..... mahbu... thanks once again....
     
    mahbu likes this.


Share This Page