Fields are not adding in Total Line of Batch Allocation form

Discussion in 'Tally Developer' started by Varadha, Jun 19, 2019.

    
  1. Varadha

    Varadha Member


    Dear Amit sir,

    I trying to calculate proportionate discount based on stock item amount in batch allocations and succeeded but i am unable to add Two fields for totals of fields ActualAmount VCHBATCH DetailsTotal, Discount EI DetailsTotal the code written from line No 87 to 96 please advise me
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    from 87 to 96....do not see any addition formula.....

    You want total of these 2 fields or trying to add these 2 fields.

    Explain by way of screenshot........
     


  3. Varadha

    Varadha Member


    i am trying to add these 2 fields Actual amount and Discount fields in the bottom line and also i want to get their totals i am attaching screen shot
     

    Attached Files:



  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You need to define the total in [Part: VCHBATCH Allocation]

    Whereas you have done in [!Part : ProportionateDiscPart]

    And your bottom total should be defined here.... [Line: STKVCH BatchTotal]
     


  5. Varadha

    Varadha Member


    Thank you i got it your analysis is excellent sir
     


  6. Varadha

    Varadha Member


    Sir can i add any control to check total Invoice amount already known while entering data in batch allocations with multiple items any guidance
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    did not get you.......... give example......
     


  8. Varadha

    Varadha Member


    Sir in my proportionate discount code I am specifying total invoice amount before and after discount. I want a control in vchbatch allocation to check while entering data whether my total of all item values is exceeding my invoice value already specified at the beginning where can I place the control can you guide me at field level because at form level I placed a control to check the totals and it is working fine
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If it is working fine, then simply copy what you have specified at the FORM level into the FIELD level.....

    only copy the segment after the "field".
     


  10. Mohan.S

    Mohan.S Member


    Dear Sir,
    While Import Purchase the batch details are come each one line.

    see code below:

    71 : INSERT COLLECTION OBJECT : ALLINVENTORYENTRIES
    72 : Set Target : ALLINVENTORYENTRIES[$$LoopIndex]
    73 : SET VALUE : StockItemName : $Item
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    81 : IF : $$IsEmpty:$Name:StockItem:$Item
    82 : Call: PurStockImport
    83 : End If
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    131 : SET : QtyVar : $$String:$ExQty
    ;; 101 : Set : DiscVar : $$String:$ExDisc
    132 : SET : RateVar : $$String:$ExRate
    134 : SET : AmtVar : $$String:$ExAmt
    140 : SET VALUE : ActualQty : $$TgtObject:$$AsQty:##QtyVar * -1
    150 : SET VALUE : BilledQty : $$TgtObject:$$AsQty:##QtyVar * -1
    151 : SET VALUE : Rate : $$TgtObject:$$AsRate:$$Number:##RateVar
    156 : SET VALUE : Amount : $$TgtObject:$$AsAmount:##AmtVar ;;;; * -1
    158 : SET VALUE : ISDEEMEDPOSITIVE : yes
    159 : SET : TT AMt : $$AsAmount:##TTAMt + $$AsAmount:##AmtVar
    157 : Log:$$string:##AmtVar + $$String:$Item

    160 : INSERT COLLECTION OBJECT : BATCHALLOCATIONS
    ;; 161 : Set Target : BatchAllocations[$$LoopIndex]
    162 : SET VALUE : GodownName : "Main Location"
    163 : Set Value : batchname : $Batch
    173 : SET VALUE : StockItemName : $Item
    174 : SET VALUE : ActualQty : $$TgtObject:$$AsQty:##QtyVar *- 1
    175 : SET VALUE : BilledQty : $$TgtObject:$$AsQty:##QtyVar *- 1
    176 : SET VALUE : Rate : $$TgtObject:$$AsRate:$$Number:##RateVar
    177 : SET VALUE : Amount : $$TgtObject:$$AsAmount:##AmtVar ;;;* -1
    178 : SET VALUE : IsDeemedPositive : Yes
    179 : SET TARGET : ..
    200 : INSERT COLLECTION OBJECT : ACCOUNTINGALLOCATIONS
    210 : SET VALUE : LEDGERNAME : "PURCHASE" ;;; @@SalesAc ;;; $AcName
    211 : SET VALUE : LedgerFromItem : Yes
    220 : SET VALUE : ISDEEMEDPOSITIVE : Yes
    230 : SET VALUE : AMOUNT : $$TgtObject:$$AsAmount:##AmtVar *-1 ;;;##AmtVar * -1
    ;; 230a: Log: $$String:##AmtVar + $$STring:"Purchae"
    231 : Set Value : GSTClass: "Purchase Taxable"
    240 : SET TARGET : ..


    in this TDL Each Batch number is imported each stick item field with Qty 1
    What Is the solution for this
     


Share This Page