EWAY DISTANCE

Discussion in 'Free Source Codes' started by Jay kumar tailor, Sep 8, 2018.

    
  1. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Something Went Wrong In This TDL.
    Please Check
     

    Attached Files:

    Last edited: Sep 11, 2018



  2. Code:
    [System: UDF]
      Myudfa : Number: 3003
    
    [#Field: GST ewayDistance]
       
        Use    : Number Field
        Format    : "No Zero, No Comma"
        Storage    : Myudfa
        Width    : 6
        Notify    : GSTeWayDistanceMsg    : $$Value> 3000
     


  3. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    sir
    it is not fetching values
     



  4. Code:
    ;;;================================== e- way Distance=====================================================================================
    
    
    [Line :PartyDistance]
        Field : Medium Prompt, PartyDistance
      
        Local : Field : Medium Prompt : Set As : “Distance to Customer Site: ”
    
    
    [Field: PartyDistance]
           Use    : Number Field
        Format    : "No Zero, No Comma"
        Storage    : PartyDistance
        Width    : 6
        Notify    : GSTeWayDistanceMsg    : $$Value> 3000
    
    
    [System : UDF]
    PartyDistance : Number: 1105
    
    
    
    [#Field: GST ewayDistance]
      
        Use             : Number Field
        Storage         : tempGSTewayDistance
        Set as        : If $$IsFieldEdited Then $$Value Else + ;;; $PartyDistance:Ledger:##vGSTeWayBuyerName
                    If ##vIsNotEmptyEwayBills Then ##vGSTewayDistance Else +
                            If ##GSTTrasactionType IN ("Purchases", "Sales Returns") Then +
                             If ##vIsGSTCMPMultiAddrOn Then $(Company, ##SVCurrentCompany).MultiAddressList[1, ($AddressName = ##vGSTCMPMultiAddrType)].PartyDistance Else $PartyDistance:Company:##SVCurrentCompany +
                                Else $PartyDistance:Ledger:##vGSTeWayBuyerName
                    
        Set Always     : Yes
        Format        : "No Zero, No Comma"
        Max            : 4
        Inactive    : $$IsSysNameEqual:NotApplicable:$tempGSTewayTransportMode
        Notify        : GSTeWayDistanceMsg    : $$Value> 3000
    
    
    [#Report    : GSTeWayBillVariables]
    
        Variable    : vGSTewayDistance    : Number
    
    
    
    
    ;;;;================================== E N D ====================================
     


  5. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Not storing Altered Values
     


  6. sivam

    sivam Active Member


    Check with this code

    [#Field: GST ewayDistance]

    Use : Short Name Field
    Set as : If $$IsEmpty:$$Value Then $Myudfa:Ledger:$PartyLedgerName Else $$Value
    Set Always : Yes
    Max : 4
    Inactive : $$IsSysNameEqual:NotApplicable:$tempGSTewayTransportMode
    Notify : GSTeWayDistanceMsg : $$Value> 3000
    Skip : No
     
    vinoth and Jaya like this.


  7. rony

    rony Member


    Dear, I think u want distance field in ledger creation menu. Is it correct?
     


  8. Jay kumar tailor

    Jay kumar tailor Well-Known Member



    dear

    it`s working like bidyut banarjee`s tdl. but when we enters value manually (while creating voucher). it replaces with stored field/ not storing .
     


  9. sivam

    sivam Active Member


    That Mean your value not stored. Check it Again. This code will work perfectly.
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    JayKumar....

    If during voucher entry, if you change the ledgername, do you expect the Ledger Master to change accordingly? If one follows the logic of coding, if any value is input in the master, it has to take that value........which the code does as intended.

    In this case if you have specified KMS in ledger master, the same will be picked up in the Invoice.
    However if the KMS in ledger master is empty then, whatever you input in Invoice will be taken.
    But do not expect that if you change KMS in Invoice, that will be static and firm, because it will be overridden by the Master value. If at all the KMS change then change it in Master.

    So, the code submitted by KNSivam is correct.

    As far as Bidyut Banerjee's code is concerned, it is not complete code, so implementing "as it is" will not work.
     


  11. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Amit ji
    You says

    (But do not expect that if you change KMS in Invoice, that will be static and firm, because it will be overridden by the Master value. If at all the KMS change then change it in Master.)

    Exactly
    This is the actual condition.
    That I was taking about.
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If at all you really want this............. then you have to make an override code........

    see tally developer......wherein they allow rates, MRP etc to be override during invoice entry. Follow the same pattern for your KMS.
     


Share This Page