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
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 ====================================
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
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 .
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.
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.
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.