Request help in negative stock control

Discussion in 'Free Source Codes' started by panam, May 2, 2023.

    
  1. panam

    panam Member


    dear experts,
    i want help in my tdl code.
    This code is working fine in default sales invoice voucher but not working in newly created sales voucher with pos enabled.

    [#Part: VCFG Inventory]

    Local : Line : VCFG NegativeStock : Invisible : Yes


    [#Field: VCHSTKJrnl BilledQty]

    Control : NegativeStock : $$InCreateMode AND $$IsNegative:mad:@StockTotal
    Control : NegativeStock : $$InAlterMode AND $$IsNegative:mad:@StockTotal

    [#Field: VCHBATCH NrmlAQty]

    Control : NegativeStock : @@IsOutwardType AND $$InCreateMode AND $$IsNegative:mad:@StockTotal

    [#Field: VCHBATCH NrmlBQty]

    Control : NegativeStock : $$InCreateMode AND $$IsNegative:mad:@StockTotal
    Control : NegativeStock : $$InAlterMode AND $$IsNegative:mad:@StockTotal

    [#Field: VCH NrmlBilledQty]

    Control : NegativeStock : @@IsOutwardType AND $$InCreateMode AND $$IsNegative:mad:@StockTotal

    [#Field: VCH JrnlBilledQty]

    Control : NegativeStock : @@IsOutwardType AND $$InCreateMode AND $$IsNegative:mad:@StockTotal

    [#Field: VCHBATCH BilledQty]

    Control : NegativeStock : @@IsOutwardType AND $$InCreateMode AND $$IsNegative:mad:@StockTotal
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Negative Stock Control has been implemented within Tally. Why you need a code??
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Instead of $$InCreateMode use @@InvoiceInCreate
     
    panam likes this.


  4. panam

    panam Member


    Dear Amit sir,
    In tally negative stock just notifies but not restricts the billing. so i want to restrict the billing if there is negative stock.
     


  5. panam

    panam Member


    Thank u for the help
     


  6. Johar

    Johar Member


    Amit Sir,

    If we use control then first item gets skipped then if we go backwards and again enter item then it is controlling, can you suggest why it skips for the 1st time and again go backwards and select the item it get controlled, any solution.

    Thanks
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Code:
        [#Field: VCHBATCH BilledQty]
        Control : NegativeStock : @@IsSales Or @@IsDelNote Or @@IsStockJrnlVch AND $$InCreateMode OR $$InAlterMode AND $$IsNegative:@@FinalStockTotal
    
     


  8. Johar

    Johar Member


    Thanks Sir my problem Solved
     


Share This Page