Proportionate Discount Based on Value

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

    
  1. Varadha

    Varadha Member


    Dear Amit Sir i want to calculate discount based on the value of the item to be sold i.e Qty*Rate given the total Total Discount
    i altered EI Consignee Line so that i collect Total Invoice Value and Total discount to be apportioned on the basis of Stock Item value in the Invoice.
    i Altered EI InvInfo Line to capture quantity and Rate and discount is to be calculated based on value

    i am able to calculate discount amount but how to deduct it from VCH Value filed i am not able to get please help me in this regard
    i am sending my code snippets along with demo company
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    will be complicated....since it is roundabout method you are making.....

    even before you enter the Stockitems...... you have the total invoice value, total discount and then go onwards to enter the stockitems and allocate it pro-rata??

    You will need to study well the FIELD : VCH Value....thereon it branches off to other applicable fields via SWITCH........... so depends on what features you have activated....batch etc, you need to find the correct one and make changes there.
     


  3. Varadha

    Varadha Member


    when stock item hasinvalloc then I am able to get vch value as i deleted local formula ResetVal and values are getting as intended
    but problem arising when item has no invalloc i mean no features such as Multiple Godown or Batch allocations etc i am not able to get vch value moreover i am not able to enter rate value also as i am using VCH rate field for my field how to get Vch Value in this case
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    that what I suggested...you need to study......because there are many switches in the FIELD : VCH Value.....

    So when there is no "hasinvalloc" then it would be switching to other FIELDs.... so trace all the fields as per your Tally Invoicing settings and you need to change the "Set AS" of those fields as well.

    Sorry, but since I am travelling, am not able to give you better solutions except guidance.....so in the meantime, you need to "fish" yourself and find the solution.
     


  5. Varadha

    Varadha Member


    Thank you for your guidance and sorry for troubling you i will go through once again VCH Value try to understand the implications. kindly help me if i get any further doubts
     


Share This Page