Need help in code for Blocking Sales on Credit Days

Discussion in 'Tally Developer' started by Mohammadali Tinwala, Jul 13, 2022.

    
  1. Mohammadali Tinwala

    Mohammadali Tinwala New Member


    Hello Everyone,

    I have written a code for blocking sales bill if party outstanding exceeds credit days, also i have added a new field in ledger master for selecting block credit days.
    Now i want to add that it should block only if the field added in ledger master is set to yes if it is No then it should not block..
    Pls Guide..

    Code is as below

    [#Field: EI Consignee]
    Control : CtrlCreditDays : @@ChkCreditDays>0 and $$InCreateMode and $$IsSales:##SVVoucherType
    [Collection: Credit PartyPending Bills]
    Type : Bills
    Child of : #EIConsignee
    Unique : $$Name
    Format : @@DateDiff
    Format : $BillDate, 8 : Universal Date
    Format : $$Name, 10
    Format : $BaseClosing,-30 : "AllSymbols, DrCr"
    Format : @@DueDate
    Format : ##SVCurrentDate
    Filter : FltrCreditDays, FltrCrAmt
    [System : Formula]
    CtrlCreditDays : if @@ChkCreditDays = 1 then "The Customer has " + $$NewLine + $$String:mad:@ChkCreditDays + $$NewLine + " Bill OverDue." else "The Customer has " + $$NewLine + $$String:mad:@ChkCreditDays + $$NewLine + " Bills OverDue."
    ChkCreditDays : $$Numitems:CreditPartyPendingBills
    FltrCreditDays : $$Number:mad:@DateDiff>=1
    DueDate : $$Date:$$String:$BillCreditPeriod:UniversalDate
    DateDiff : ##SVCurrentDate - @@DueDate
    FltrCrAmt : $$IsDr:$BaseClosing
    [#Part:Led Contact]
    Add:Lines:Block Credit Days
    [Line:Block Credit Days]
    Field:Medium Prompt, Block Credit Days
    Local:Field:Medium Prompt:Set as:"Block Credit Days?"
    [Field:Block Credit Days]
    Use:Logical Field
    Storage:Days

    [System:UDF]
    Days:Logical:53633
     


  2. Access

    Access Member


    This Is correct Code What is The Problem???
     


Share This Page