I Want Tow Type formate Invoice by Table value but how set in code plz anyone expert solved This. My Invoice Form Name "Normal_A and "Normal_B" Code: [#Part: VCH Narration] Option : TlyErp_VCH Narration : @@IsSales [!Part: TlyErp_VCH Narration] Add : Line: At Beginning: TlyErp_VCH_NarraLn [Line: TlyErp_VCH_NarraLn] Fields : Medium Prompt, TlyErp_VCH_Narra_Fld, TlyErp_VCH_NarraFormt_Fld Local : Field : Medium Prompt : Info : "Print Formate Type:" Local : Field : Medium Prompt : Style: Normal Bold Italic Local : Field : Medium Prompt : Color : Blue [Field : TlyErp_VCH_Narra_Fld] Use : Logical Field Type : String Set as : if $$isempty:$$value then "No" else $$Value Set Always : Yes [Field : TlyErp_VCH_NarraFormt_Fld] Set Always: Yes Table : TlyErp_FormtTable, EndofList Show Table : Always Width:@@ShortNameWidth Modifies : VerPrntFormt :Yes Variable : VerPrntFormt On: Accept: yes: Field Accept On: Accept: Yes: Call: PrntFormtTyp [Collection: TlyErp_FormtTable] Title : $$LocaleString:"List of Invoice Type" Alignment : Right Full Height : No ListName : $$LocaleString:"Normal_A" , $$LocaleString:"Normal_B" Format : $$Name, 15 Client Only : Yes [#Form : Printed invoice] add : option : Normal A Print : @@Normal_A add : Option : Normal B print : @@Normal_B ;;Function to display selected report ;;-------------- [Function: PrntFormtTyp] 00: Msg Box:"Displaying":##VerPrntFormt 01: If:##VerPrntFormt = "Normal_A" 02: Print : STC GST INVOICE OTS 03: Else 04: If:##VerPrntFormt = "Normal_B" 05: Print : My Invoice 06: End [Variable:VerPrntFormt] Type : String Persistent : Yes [System:Variables] VerPrntFormt:""
There are many ways to code the same. I have corrected your code in this case. The Voucher will refreash once you selected the print type and then you can print and the format you wanted print will be printed. If you want to integrate this through function you can modify it accordingly. Code: [#Part: VCH Narration] Option : TlyErp_VCH Narration : @@IsSales [!Part: TlyErp_VCH Narration] Add : Line: At Beginning: TlyErp_VCH_NarraLn [Line: TlyErp_VCH_NarraLn] Fields : Medium Prompt, TlyErp_VCH_Narra_Fld, TlyErp_VCH_NarraFormt_Fld Local : Field : Medium Prompt : Info : "Print Formate Type:" Local : Field : Medium Prompt : Style: Normal Bold Italic Local : Field : Medium Prompt : Color : Blue [Field : TlyErp_VCH_Narra_Fld] Use : Logical Field Type : String Set as : if $$isempty:$$value then "No" else $$Value Set Always : Yes [Field : TlyErp_VCH_NarraFormt_Fld] Set Always: Yes Table : TlyErp_FormtTable, EndofList Show Table : Always Width:@@ShortNameWidth Storage: TlyErpVCH [System: UDF] TlyErpVCH : String : 5478 [Collection: TlyErp_FormtTable] Title : $$LocaleString:"List of Invoice Type" Alignment : Right Full Height : No ListName : $$LocaleString:"Normal_A" , $$LocaleString:"Normal_B" Format : $$Name, 15 Client Only : Yes [#Form : Sales Color] Option : Normal A Print Invoice : $TlyErpVCH = "Normal_A" Option : Normal B Print Invoice : $TlyErpVCH = "Normal_B" [!Form: Normal A Print Invoice] Delete : Print Add : Print : Normal_A [!Form: Normal B Print Invoice] Delete : Print Add : Print : Normal_B
Sir ji Thnks for solve My Solution and work but some issues in This Logical Field Yes/No not work If "No" then show Table and If "Yes" then show Table 1st Tym create Voucher Go cursor direct on Date Field 2nd Tym Save I think this issue solve soon plz
Since the code is being applied in the Entry Screen the voucher will refresh. You have to keep it at company level or vouchertype level so it doesnt happen. Refer about logical fields for the second issue you are facing I gave you the overall concept of applying it. You have to modify it for your needs. if you have any doubts feel free to ask.