In Sales Voucher, I have two entries USD and Dinars. If the entry is in USD I need to convert into USD into Dinars. If the entry is in Dinars, the conversion part has to be invisible, because the entry is already in dinars. Please help for this query. The source code is as follows: [#Field:default] Add : Tooltip : $$DescName ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [#Line: EI Consignee] Field : Simple Prompt, EI Consignee, EI CurrConsignee, EI FirstLedger, INVMailName, Name Field Right Field : PriceBasisF, PriceBasisFField; ,PriceBasisF1, PriceBasisFField1 [FieldriceBasisF] Info:"Price Basis:" ;Full Width:Yes [FieldriceBasisFField] Use : Name Field Storage : PriceBasics Set as : $PriceBasics Full Width:Yes [System:UDF] PriceBasics : String : 12345 EIConsigneeCurrency: String : 12346 CustPONum:String:12347 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [#Form: sales Color] Delete : Print : Printed Invoice Print : Alsaie_Print [Report: Alsaie_Print] Use : Printed Invoice Delete : Form Add : Form : salesform Object : Voucher : ##VoucherID Title : "Tax Invoice" Print Set : Report Title : "Tax Invoice" Set : SVPrintOrientation: $$SysName:Landscape [Form:salesform] Part : TopPart,InvBodyPart Part : BottomPart Height : 100% page Width : 100% page Space Left : 5% page Space Right : 5% page Page Break : DSP ClPageBreak, TopPart [Part : TopPart] Part:AddressPart,CustomerDetailPart,PurchaseDetailPart,InvHeaderPart Vertical:Yes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Part:AddressPart] Line:AddressLine,TaxInvoiceline ; Repeat:AddressLine:cmpAddressColl [Collection: cmpAddressColl] Type : Address : Company Child of : ##SVCurrentCompany [Collection: BuyerAddressColl] Type : Address : Ledger Child of : ##SVCurrentCompany [Line:AddressLine] Field:Addressfield Space Top:10 Space Bottom:0.5 [Field:Addressfield] Set as:$$LocaleString:$$CollectionField:$Address:1:cmpAddressColl++ $$LocaleString:$$CollectionField:$Address:2:cmpAddressColl+$$LocaleString:$$CollectionField:$Address:3:cmpAddressColl++ $$LocaleString:$$CollectionField:$Address:4:cmpAddressColl+$$LocaleString:$$CollectionField:$Address:5:cmpAddressColl;"Flt/Shp 107,Bldg 1501, Rd/St 2116, Manama/AI Qudaibiya, Block 321, Kingdom of Bahrain" Line:0 Align:Center Full Width:Yes ; Style :large [Line:TaxInvoiceline] Field:TaxInvoiceField Space Top:0.5 Space Bottom:0.5 Border:Thin Top Bottom [Field:TaxInvoiceField] Set as:"TAX INVOICE" Align:Center Full Width:Yes Style :large bold ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Part:CustomerDetailPart] Line:CustHead,Custname,CustAddress,VATAccNum,AttentionLine,AttentionDetailLine [Line:CustHead] Field:CustHeadField Right Field:InvoiceNumfield Space Top:0.3 [Field:CustHeadField] Set as:"Customer" Border:Thin Bottom [Field:InvoiceNumfield] Set as:"Invoice Number" Border:Thin Bottom [Line:Custname] Field:CustnameField Right Field:InvoiceNumfields Space Top:0.3 [Field:CustnameField] Set as:$PartyLedgerName;"TTSJV WLL" Style: Normal Bold [Field:InvoiceNumfields] Set as:$VoucherNumber;"INV-RJC-21-81208" Style:Normal Bold [Line:CustAddress] Field:CustAddressField Right Field:InvoiceDatefield Space Top:0.3 [Field:CustAddressField] Set as:$$LocaleString:$$CollectionField:$Address:1:BuyerAddressColl++ $$LocaleString:$$CollectionField:$Address:2:BuyerAddressColl+$$LocaleString:$$CollectionField:$Address:3:BuyerAddressColl++ $$LocaleString:$$CollectionField:$Address:4:BuyerAddressColl+$$LocaleString:$$CollectionField:$Address:5:BuyerAddressColl;$basicbuyeraddress;"Flt/Shp 12,Bldg 1130, Rd/St 1531, Muharraq, Block 215, Bahrain" Width:60 Lines:0 [Field:InvoiceDatefield] Set as:"Invoice Issue Date" Border:Thin Bottom [Line:VATAccNum] Field:VATaccField,VATaccField1 Right Field:InvoiceDatefields Space Top:0.3 [Field:VATaccField] Set as:"VAT Account Number: " Style:Normal Bold [Field:VATaccField1] Use: Name Field Set as: $VATTINNumber:ledger:$Partyledgername;If $$IsEmpty:$VATTINNumber Then ##vLEDTINNumber Else $VATTINNumber Style:Normal Bold [Field:InvoiceDatefields] Set as:$Date;"22-Mar-21" Style:Normal Bold [Line:AttentionLine] Field:AttentionField,DeliveryNo Right FieldateofSupply,PaymentDue Space Top:0.6 [Field:AttentionField] Set as:"Attention" Border:Thin Bottom [FieldeliveryNo] Set as:"Delivery Note No" Border:Thin Bottom Space Left:32 [FieldateofSupply] Set as:"Date of Supply" Border:Thin Bottom Space Right:5 [FieldaymentDue] Set as:"Payment Due Date" Border:Thin Bottom [Line:AttentionDetailLine] Field:AttentionField1,DeliveryNo1 Right FieldateofSupply1,PaymentDue1 Space Top: 0.3 Space Bottom:0.3 Border:Thin Bottom [Field:AttentionField1] Set as:"Accounts / Finance Department" Style:Normal Bold [FieldeliveryNo1] Set as:$BasicShipDeliveryNote;"NIB-SEC-RJC-21-50060" Space Left:7 Width:25 Align:Center Style:Normal Bold [FieldateofSupply1] Set as:$BasicShippingDate;"20-Mar-21" Space Right:10 Width:10 Align:Center Style:Normal Bold [FieldaymentDue1] ; Typeate ; Use : Number field ; Set as : $BillofLadingDate;$BillCreditPeriod:ledger:$Partyledgername;$BillCreditPeriod:ledger:$Partyledgername;"21-Apr-21" ; Style : Normal Bold ; Align:Right ; Typeate ; Use : Number field Use : Uni Date field Set as : $AllLedgerEntries[1].BillAllocations[1].BillCreditPeriod ; Now checksss check Style : Normal Bold Align:Right Width:10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [ParturchaseDetailPart] LineurchaseCont,PurchaseName,POHeader,PODetail [LineurchaseCont] FieldurchaseContfield Right Field:Faxheaderfield Space Top:0.3 [FieldurchaseContfield] Set as:"Purchase Contact" Border:Thin Bottom [Field:Faxheaderfield] Set as:"Fax/E-Mail" Border:Thin Bottom [LineurchaseName] Field:CustomernameField Right Field:Faxdetailfields Space Top:0.2 [Field:CustomernameField] Set as:$LedgerContact:Ledger:$PartyLedgerName;"Paul Atherton" Style:Normal Bold [Field:Faxdetailfields] Set as:$EMail:Ledger:$PartyLedgerName;$EMail;"paul.atherton@ttsjv.com" Style:small Bold Width:30 Align:Right [LineOHeader] Field:CustomerPOHeader,Pricebasics Right Field:Currencyfield Space Top:0.5 [Field:CustomerPOHeader] Set as:"Customer PO Number" Border:Thin Bottom [Fieldricebasics] Set as:"Price Basis" Border:Thin Bottom Space Left:30 [Field:Currencyfield] Set as:"Currency" Border:Thin Bottom [LineODetail] Field:CustomerPOHeader1,Pricebasics1 Right Field:Currencyfield1 Space Top:0.5 Space Bottom:0.5 Border:Thin Bottom [Field:CustomerPOHeader1] Use : NewNumberTemplate Use : Short Name Field Set as:$BasicPurchaseOrderNo;"076551C-SPO-0066-03/FMR # 1017-6" Width:25 Align:left Style:small Bold [Fieldricebasics1] Set as:$PriceBasics Space Left:15 Width:20 Align:Center [Field:Currencyfield1] ; Use:Symbol Field ; Use : Amount Forex Field ; Set as:$Amount;$EIConsigneeCurrency;"US DOLLARS" ; Format: "Currency,ShowBaseSymbol" Set as: If $$Currency:$Amount="$" Then "US Dollars" else "Bahraini Dinar" ;Set as:$CurrencyName:Company:##SvCurrentCompany Style:Large Bold ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Part:InvHeaderPart] Line:Invheader1,Invheader2 Border:Thin Top Bottom [Line:Invheader1] Field:ItemNo,SOItem,ItenDesc,UOM,Qty Right Field:UnitPrice,TotalPice,VAT,VATAmount Space Top:0.2 Space Bottom:0.2 Local : Field : ItemNo : info : $$LocaleString:"Item" Local : Field : SOItem : info : $$LocaleString:"Sales Order" Local : Field : ItenDesc : info : $$LocaleString:"Item Description" Local : Field : UOM : info : $$LocaleString:"UOM" Local : Field : Qty : info : $$LocaleString:"Qty" Local : Field : UnitPrice : info : $$LocaleString:"Unit Price" Local : Field : TotalPice : info : $$LocaleString:"Total Price" Local : Field : VAT : info : $$LocaleString:"VAT" Local : Field : VATAmount : info : $$LocaleString:"VAT" [Line:Invheader2] Field:ItemNo,SOItem,ItenDesc,UOM,Qty Right Field:UnitPrice,TotalPice,VAT,VATAmount Space Bottom:0.2 Local : Field : ItemNo : info : $$LocaleString:"No" Local : Field : SOItem : info : $$LocaleString:"Serial No" Local : Field : ItenDesc : info : $$LocaleString:"" Local : Field : UOM : info : $$LocaleString:"" Local : Field : Qty : info : $$LocaleString:"" Local : Field : UnitPrice : info : $$LocaleString:"" Local : Field : TotalPice : info : $$LocaleString:"Excl.VAT" Local : Field : VAT : info : $$LocaleString:"%" Local : Field : VATAmount : info : $$LocaleString:"Amount" [Field:ItemNo] Set as:"" Align:Center Width:4 [Field:SOItem] Set as:$TrackingNumber Align:Center Width:8 [Field:ItenDesc] Set as:"" Align:Center Full Width:Yes [Field:UOM] Type : Rate :Unit Symbol Set as:"" Align:Center Width:4 [Field:Qty] Delete:Style:Normal Bold Use:Number Field Format:"Decimal:3" Set as:"" Align:Right Width:6 [Field:UnitPrice] Delete:Style:Normal Bold Use:Rate Price Field Format:"Decimal:3" Set as:"" Align:Right Width:8 [Field:TotalPice] Delete:Style:Normal Bold Use : Number Field Format:"Decimal:3" Set as:"" Align:Right Width:10 [Field:VAT] Delete:Style:Normal Bold Use:Number Field Format:"Decimal:2" Align:Right Width:4 ;Use : Rate Units Field Set As If $GVATTaxRate=0 then "" else $$String:$GVATTaxRate+$$String:" %");:StockItem:$STockItemNAme;@taxrate; $VATDetails[Last].RateofVAT:StockItem:$StockItemName ;"5%"$$Sprintf:"%s%%"taxrate taxrate : $$ReportObject:$$CollectionFieldByKey:$VATGCCInv_TaxRateGVATTaxAnalysisItemLedKey:VATGCCTaxAnalysisAlongWithItems GVATTaxAnalysisItemLedKey : $StockItemName+$$SeparatorChar+($$String:$GVATVchItemSerialNum) [Field:VATAmount] Delete:Style:Normal Bold Format:"Decimal:3" ; Use: Amount Forex Field Use:Number Field Align:Center Width:10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Part:InvBodyPart] Line:InvDetLine Repeat: InvDetLine:inventoryEntries Total:TotalPice,VATAmount [Line:InvDetLine] Field:ItemNo,SOItem,ItenDesc,UOM,Qty Right Field:UnitPrice,TotalPice,VAT,VATAmount Space Bottom:0.2 Local : Field : ItemNo : Set as : $$Line ; Local : Field : SOItem : Set as : $TrackingNumber;"SO Item6" Local : Field : ItenDesc : Set as : $StockItemName;"Air Quality Monitoring using Sulphur Dioxide Diffusion Tubes - 3 Tubes" Local : Field : ItenDesc : Lines : 0 Local : Field : ItenDesc : Align : Left Local : Field : UOM : Set as : $Rate;"Each" Local : Field : UOM : Align : Center Local : Field : Qty : Set as : $BilledQty;"9.000" Local : Field : Qty : Align : Right Local : Field : UnitPrice : Set as : $$AsRate:$Rate;"20.000" Local : Field : UnitPrice : Align : Right Local : Field : TotalPice : Set as : ($$Number:$BilledQty*$$Number:$Rate);$Amount;"180.000" Local : Field : TotalPice : Align : Right ; Local : Field : VAT : Set as : $$GetInfoFromHierarchy:$StockItemName:"Stock Item":"RateOfVAT":$Date:"VAT":0 Local : Field : VATAmount : Set as : $$Number:#TotalPice*$$Number:#VAT/$$Number:100 Local : Field : VATAmount : Align : Right VATAmount : $$FilterAmtTotal:LedgerEntries:InvoiceVATLedger:$Amount InvoiceVATLedger: $$IsSysNameEqual:VAT:$TaxType:Stockitem:$StockItemName ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Part:BottomPart] Part:InvTotalPart,USConversion,Dinarsconverion,ForCompanyname Vertical:Yes [Part:InvTotalPart] Line:InvTotalLine,EmptyyLine [Line:InvTotalLine] Field:TotalField Right Field:VATTotal,TotalAmount Space Bottom:0.2 Space Top:0.2 Border:Thin Top [Field:TotalField] Set as:"Total" Style:Normal Bold [Field:VATTotal] Format:"Decimal:3" Use:Number Field Set as:$$Total:TotalPice Space Right:7 Style:Normal Bold [Field:TotalAmount] Format:"Decimal:3" Use:Number Field Set as:$$Total:VATAmount Style:Normal Bold Align:Right [Line:EmptyyLine] Field:EmptyyField Border:Thin Top Space Top:1 [Field:EmptyyField] Set as:"" [Part:USConversion] Line:USHeaderLine,USDescLine,USTotaLine,USInWordsLine [Line:USHeaderLine] Field:EcxludingVATField,USDollarfield Right Field:ExcludingAmountField Border:Thin Top Bottom Space Bottom:0.2 Space Top:0.2 [Field:EcxludingVATField] Set as:"Total Value Excluding VAT" [Field:USDollarfield] Use:Name Field Use : Upper Case Field Case : Upper Case Set as:#Currencyfield1;$EIConsigneeCurrency;"US DOLLARS" Space Left:15 Style:Normal Bold [Field:ExcludingAmountField] Use:Number Field Set as:$$Total:TotalPice Style:Normal Bold Align:Right Format:"Decimal:3" [Line:USDescLine] Field:AddTotalVAT Right Field:RoundOffAmountField Space Bottom:0.2 Space Top:0.2 [Field:AddTotalVAT] Set as:"Add:Total VAT(Value Added Tax)-Rounded-Off(from individual calculations above)" [Field:RoundOffAmountField] Format:"Decimal:3" Use:Number Field Set as:$$Total:VATAmount Align:Right Style:Normal Bold [Line:USTotaLine] Field:IncludingVATField,USDollarfieldd Right Field:IncludingAmountField Border: Thin Top Space Top:0.2 Space Bottom:0.2 [Field:IncludingVATField] Set as:"Total Value Including VAT" [Field:USDollarfieldd] Set as:#Currencyfield1;$EIConsigneeCurrency;"US DOLLARS" Space Left:15.5 Style:Normal Bold [Field:IncludingAmountField] Use:Number Field Set as$$Total:TotalPice)+($$Total:VATAmount) Style:Normal Bold Align:Right Format:"Decimal:3" [Line:USInWordsLine] Field:USDollarInWordsField Space Top:0.7 Space Bottom:0.7 Border:Thin Top [Field:USDollarInWordsField] Set as:"US DOLLARS "+$$InWords:#IncludingAmountField+ " Only" Style:Normal Bold ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Invisible: If (#Currencyfield1="Bahraini Dinar") then No else #Dinarsconverion ;If ($$Currency:$Amount==$CurrencyName:Company:##SvCurrentCompany) Then Print ##Dinarsconverion else No [Partinarsconverion] Line:ConvertionHeaderLine,DinarHeaderLine,DinarDescLine,DinarTotaLine,DinarRemarksLine,EmptyLines [Line:ConvertionHeaderLine] Field:ConvertionHeaderField Border:Thin Top Bottom Space Bottom:0.2 Space Top:0.2 [Field:ConvertionHeaderField] Set as:"Conversion to "+$FormalName:Company:##SvCurrentCompany Align:Center Full Width:Yes Style:Normal Bold [LineinarHeaderLine] Field:EcxludingVATField1,USDollarfield1,AtField0,AtField Right Field:ExcludingAmountField1 Border:Thin Bottom Space Bottom:0.2 Space Top:0.2 [Field:EcxludingVATField1] Set as:"Total Value Excluding VAT" [Field:USDollarfield1] Use:Short Name Field Set as:$FormalName:Company:##SvCurrentCompany; "BAHRAINI DINARS" ; Set as:"BAHRAINI DINARS" Space Left:12 Style:Normal Bold [Field:AtField0] Set as:"@" Space Left:12 [Field:AtField] ; Use:Number Field ; Use : Amount XchgRate Field ; Set as : $Amount ; Width:10 ; Style:Normal Bold ; Format : "No Symbol" use : number field set as : $$ratexvalue:$amount [Field:ExcludingAmountField1] ; Type : Amount : Rate ; Use : Amount XchgRate Field ; Use:Amount Forex Field Set as:$$Number:$Amount-$$Number:$VATAmount;$$Total:TotalPice*$Amount Style:Normal Bold Format:"Decimal:3" ;Use:NumberField ;Type : Amount : Rate ; Set as:if NOT $$isempty:#AtField Then #AtField*2 Else 2 ; ;$$Number:#AtField; ; Style:Normal Bold ; Format : "No Symbol" [LineinarDescLine] Field:AddTotalVAT1 Right Field:RoundOffAmountField1 Space Bottom:0.2 Space Top:0.2 [Field:AddTotalVAT1] Set as:"Add:Total VAT(Value Added Tax)-Rounded-Off(from individual calculations above)" [Field:RoundOffAmountField1] ; Use : Amount XchgRate Field Set as : $$Number:$VATAmount Style:Normal Bold Format:"Decimal:3" [LineinarTotaLine] Field:IncludingVATField1,USDollarfieldd1,AtField01,AtField1 Right Field:IncludingAmountField1 Border: Thin Top Space Top:0.2 Space Bottom:0.2 [Field:IncludingVATField1] Set as:"Total Value Including VAT" [Field:USDollarfieldd1] Use:Short Name Field Set as:$FormalName:Company:##SvCurrentCompany; "BAHRAINI DINARS" Space Left:12.5 Style:Normal Bold [Field:AtField01] Set as:"@" Space Left:12 [Field:AtField1] ; Use : Amount XchgRate Field ; Set as : $Amount ; Width:10 ; Style:Normal Bold ; Format:"Decimal:3" use : number field set as : $$ratexvalue:$amount [Field:IncludingAmountField1] ; Use: Amount XchgRate Field Set as:$$Number:$Amount;$$Total:TotalPice*$Amount Style:Normal Bold Format:"Decimal:3" [LineinarRemarksLine] Field:RemarksField Space Top:0.3 Space Bottom:0.3 Border:Thin Top Bottom [Field:RemarksField] Set as:"Remarks :"+" "+$Narration [Line:EmptyLines] Field:EmptyFields Border:Thin Bottom SpaceTop:0.2 Space Bottom:0.2 [Field:EmptyFields] Set as:"" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Part:ForCompanyname] Line:CompanyNameLine,SignatureLine [Line:CompanyNameLine] Field:CompanyNameField Space Top:0.3 [Field:CompanyNameField] Set as:"For "+ $BasicCompanyFormalName:Company:##SVCurrentCompany; Newtech International W.L.L." [Line:SignatureLine] Field:SignatureField Space Top:5 [Field:SignatureField] Set as:"Authorized Signatory"
Sir, The output still remains the same. I need to invisible the part in the above code "[Partinarsconverion]", if the #Currencyfield1 contains Bahraini Dinar