Help on "Last Payment Details in Invoice Entry"

Discussion in 'Free Source Codes' started by kishan_raval, Apr 24, 2019.

    
  1. kishan_raval

    kishan_raval Member


    DEAR DEVELOPERS,
    I WANT LAST PARTY'S LAST RECEIVED AMOUNT & DATE IN INVOICE ENTRY, BUT IT'S NOT WORKING SOMETIMES WHILE CREATING INVOICE, IN ALTER MODE IT'S WORKING FINE, PLEASE HELP FOR THE FIELD "Party Last Pymt",
    FILE IS ATTACHED,
    THANKS IN ADVANCE
     

    Attached Files:



  2. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    You are confusing with Invoice Entry Field with Invoice Print Fields

    I have tried to correct it.
    Invoice Balance.jpg

    make changes to your code as per code attached
    Code:
    ;;------------------------------------------------------------------------------
    ;; Outstanding Details
    ;;------------------------------------------------------------------------------
    
    [#Part: VCH GST Analysis]
       
        Option        : VCH GST Analysis GST    : @@IsGSTOnAndAppl ;AND @@GSTInvoiceModule AND @@SameCountry
       
    [!Part: VCH GST Analysis GST]
       
        Add            : Part        : VCH Party PrevBalance
       
    [Part: VCH Party PrevBalance]
    
        Line        : EXPINV SubTitle, VCH Party PrevBalance, VCH Party Last Payment
        Local        : Line        : EXPINV SubTitle    : Local    : Field        : EXPINV SubTitle    : Info        : "Mini Statement (*Ignore if Paid)"
        Local        : Line        : EXPINV SubTitle    : Local    : Field        : EXPINV SubTitle    : Style        : Small Bold
        ;Local        : Field        : Party Last Pymt    : Set as    : $PartyLastPymt
        Space Top   : 0
        Border      : Thin Top Left Right
    
    [Line: VCH Party PrevBalance]
    
        Field       : Simple Prompt, Party PrevBalance, Medium Prompt, Party Bill Value, Simple Field, Party Net Balance
        Local       : Field : Simple Prompt        : Set as : $$LocaleString:"PrevBalance :"
        Local       : Field : Simple Prompt        : Width  : 13
        Local       : Field : Medium Prompt        : Set as : $$LocaleString:"Bill Value :"
        Local       : Field : Medium Prompt        : Width     : 13
        Local       : Field : Simple Field      : Set as : $$LocaleString:"Net Balance :"
        Local       : Field : Simple Field      : Width  : 13
       
    [Field: Party PrevBalance]
    
        Type        : Amount    : Forced
        Set as         : If $$InAlterMode then #PartyNetBalance - #EIValueTotal else $ClBalLastVchDate:Ledger:$PartyLedgerName
        Set Always    : Yes
        Storage        : Party PrevBalance
        Width       : @@AmountWidth + 5
        Style       : Normal Bold
        Format      : "No Zero, Symbol," + ##ShowForex
        Align       : Left
        Invisible    : NOT ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)
       
    [Field: Party Bill Value]
    
        Type        : Amount    : Forced
        Set as         : #EXPINVInvTotal
        Set Always    : Yes
    ;    Storage        : Party Bill Value
        Width       : @@AmountWidth + 5
        Style       : Normal Bold
        Format      : "No Zero, Symbol," + ##ShowForex
        Align       : Left
        Invisible    : NOT ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)
       
    [Field: Party Net Balance]
    
        Type        : Amount    : Forced
        Set as        : If $$InAlterMode then $ClBalLastVchDate:Ledger:$PartyLedgerName else #PartyPrevBalance + #EXPINVInvTotal
        Set Always    : Yes
        ;Storage        : Party Net Balance
        Width       : @@AmountWidth
        Style       : Normal Bold
        Format      : "No Zero, Symbol," + ##ShowForex
        Align       : Right
        Invisible    : NOT ($$InPrintMode OR $$InExportMode OR $$InMailAction) OR ($$InCreateMode OR $$InAlterMode)
       
    [Line: VCH Party Last Payment]
    
        Field       : Simple Prompt, Party Last Pymt, Medium Prompt, Party Last Pymt Date
        Local       : Field : Simple Prompt        : Set as : $$LocaleString:"Last Received Payment :"
        Local       : Field : Simple Prompt        : Width  : 20
        Local       : Field : Simple Prompt        : Style     : Normal Italic
        Local       : Field : Medium Prompt        : Set as : $$LocaleString:"Dt. :"
        Local       : Field : Medium Prompt        : Width     : 3
        Local       : Field : Medium Prompt        : Style     : Normal Italic
        Local       : Field : Medium Prompt        : Inactive: $$IsEmpty:#PartyLastPymt
       
    [Field: Party Last Pymt]
    
        Use            : Amount Field
        Type        : Amount    : Forced
        Set as         :  $$CollectionField:$Amount:1:PartyLastPayment ;else $$FilterValue:$Amount:PartyLastPayment:1:DummyFormula
        Set Always    : Yes
        ;Storage        : Party Last Pymt
        ;Width       : @@AmountWidth
        Style       : Normal Bold
        Format      : "No Zero, Symbol," + ##ShowForex
        Align       : Left
       
    [Field: Party Last Pymt Date]
    
        Use            : Uni Date Field
        ;Type        : Date        : Forced
        Set as         : $$CollectionField:$Date:1:PartyLastPayment ;else $$FilterValue:$Date:PartyLastPayment:1:DummyFormula
        Set Always    : Yes
        ;Storage        : Party Last Pymt Date
        Width       : @@ShortDateWidth + 3
        Style       : Normal Bold
        Align       : Left
        Inactive: $$IsEmpty:#PartyLastPymt
    
    [Collection : Party Last Payment]
       
        Parm VAR     : SVCurrentDate : Date : ##SVCurrentDate
        Parm Var    : svFromDate    : Date  : @@CMPStartDate
        Parm Var    : svToDate      : Date  : @@FinYrEnding
        ;Parm Var    : svCurrentDate : Date  : ##SVCurrentDate
        Parm Var    : pConsignee    : String: #EXPINVPartyLedName
    
        Type         : Vouchers : Ledger
        Child Of     : ##pConsignee ;#EIConsignee;
        Walk         : All Ledger Entries
       
        Filter       : Receipt;, SameLedger
        Sort        : @@Default        : -$Date
        Fetch        : Amount, AllLedgerEntries.Amount, Date, AllLedgerEntries.Date
       
       
    [System:Formulae]
        Receipt : $$IsReceipt:$VoucherTypeName
       
    
     


  3. kishan_raval

    kishan_raval Member


    YOU DON'T UNDERSTAND, WHAT I AM SAYING IS THAT WHEN WE CHANGE DATE OF INVOICE ENTRY, THEN CODE IS NOT WORKING, WITHOUT CHANGING DATE IT'S WORKING WELL
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Do not shout..... stop using all CAPS........... learn to communicate well, if you really want help from experts.......

    And please do lower your tonal attitude.

    You don't and should not talk to seniors / experts in this tone.............
     


  5. kishan_raval

    kishan_raval Member


    Dear Mr. Amit Kamdar, I didn't say anything wrong, but still i am sorry, can you help me or not?
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear Kishan, you have not said anything wrong..... but when coupled with all CAPS, simple sentence gets a deeper and different meaning. In Internet/online communication parlance....using ALL CAPS means shouting, screaming, angry.......

    I will check up when I am free......rest assured.
     
    auruem likes this.


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    The PART ........ Part: VCH GST Analysis ........ refers to Invoice printing.........which Garima was telling you about. So going by your reference to PART made in your code......... what Garima has done is correct. So you must also understand before counter-reacting.

    And further I am confused, as per your post you are saying it is visible in Invoice Entry...how?? Kindly do take screenshots on where you want? and how? If you had referred TDE, you would know that this PART is only for printing of invoice and not for Invoice entry display.

    It would be better for us to understand, if you submit screenshots of your problems.
     
    bhaskar82 likes this.


  8. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Dear Keshav,

    This was your query :

    DEAR DEVELOPERS,
    I WANT LAST PARTY'S LAST RECEIVED AMOUNT & DATE IN INVOICE ENTRY, BUT IT'S NOT WORKING SOMETIMES WHILE CREATING INVOICE, IN ALTER MODE IT'S WORKING FINE, PLEASE HELP FOR THE FIELD "Party Last Pymt",
    FILE IS ATTACHED,
    THANKS IN ADVANCE

    Now you are saying:
    YOU DON'T UNDERSTAND, WHAT I AM SAYING IS THAT WHEN WE CHANGE DATE OF INVOICE ENTRY, THEN CODE IS NOT WORKING, WITHOUT CHANGING DATE IT'S WORKING WELL

    Can you tell me, where did you mention the "date change" part.. (I think it is there in your other post, but not this).
     


  9. Devendra_Rawat

    Devendra_Rawat Well-Known Member



  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear Garimaji,

    Am also confused. Who is Keshav ????? :oops::oops::rolleyes:o_Oo_O
     


  11. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Krishna = Kishan/keshav/madhav/kanhaiya........
     
    TARANDEEP SINGH and sattam like this.


  12. kishan_raval

    kishan_raval Member


    I get it now, I didn't know the meaning of writing in bold letters, therefor i am extremely sorry to all, i will never do this again,

    thanks for the reply, also note that problem is solved now, but i have another problem with email after save module & i will seek help for that in new thread, i hope you will help me

    once again i am sorry
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    no problems......
     


  14. Devendra_Rawat

    Devendra_Rawat Well-Known Member



    HA Ha.. good logic.

    .:D:D.. These smilies are not smilies ..Horro Smilies
     


  15. Devendra_Rawat

    Devendra_Rawat Well-Known Member



    Yes I know, your intention was not that..with CAPITALS.
     


  16. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    ..
    He is Kishan. Sorry.
     


  17. Pradeep Bhagat

    Pradeep Bhagat New Member


    Dear Amit ji,

    Could you please help me with code for debtor age analysis printed on invoice.

    Thanks

    Pradeep
     


  18. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Share your code and explain the problem.....so I can look into it...........
     


  19. Pradeep Bhagat

    Pradeep Bhagat New Member


    Amit ji,

    Am a beginner, trying to learn, yet to make code on my own. Wished to have Debtor’s age wise analysis printing on invoices issued by me.
    If possible, please post the code.

    Thanks
    Pradeep
     


  20. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Would love to help you, but I cannot.....I don't undertake pro-projects on TDL modules, simply because I do not have time from my business to be in full time coding.

    There are other experts, who can take your requirement on project basis or may be free of cost.
     


  21. dkp_jal

    dkp_jal Member


    In above code How to select the Last Received Payment amount and date which is received before the INVOICE created.
    Example:
    Invoice Date Amount
    01/04/2020 10000.00
    03/04/2020 15000.00
    05/04/2020 16000.00
    07/04/2020 20000.00

    Payment Received
    02/04/2020 10000.00
    04/04/2020 15000.00
    08/04/2020 36000.00

    Now if I print the invoice of 03/04/2020 it show Last Received Payment is 36000.00 Dated 08/04/2020. (Required to show Last Received Payment is 10000.00 dated 02/04/2020)

    Please Guide me changes in above Code.

    Thanking you in advance.
     


  22. Gagan Jyoti

    Gagan Jyoti Member


    Respected Experts!

    Please guide if I want to add a button while printing invoice for the option to add outstanding details in invoice.
    Code:
    [#Form: SV Print Config]
        Add         : Top Button     : At Beginning      : Set Balance
    
    [Button: Set Balance]
    
        Key         : Alt+B
        Action      : Execute : SetBalance
        Title       : $$LocaleString:"Print Balance"
    
    [Report: SetBalance]
    
        Auto    : Yes
        Title    : $$LocaleString:"Set Balance"
    
     


  23. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Instead of Button, much better to add your option in the Print Config itself.
     


  24. Gagan Jyoti

    Gagan Jyoti Member


    OK Sir, but my idea is that the user will have the option to enable or disable it.
     


Share This Page