[#Field: EI Consignee] Add : Option : EIConsDupNumbBlock : Not $$InAlterMode And @@IsPurchase [!Field: EIConsDupNumbBlock] Control : DuplicateNumberWAR : If (Not $$IsEmpty:#VCHRef) Then @IsSupplierNO Else No IsSupplierNO: ($$FilterValue:$SuppilerINVNumber:SupplierNumberColletion:1:IsSamePurchaseVCH) = #VCHRef [#Field : VchParticulars] Add : Option : EIConsDupNumbBlockVCH : Not $$InAlterMode And @@IsPurchase [!Field : EIConsDupNumbBlockVCH] Control : DuplicateNumberWAR : If (Not $$IsEmpty:#VCHRef) And ($$Line = 1) Then @IsSupplierNO Else No IsSupplierNO: ($$FilterValue:$SuppilerINVNumber:SupplierNumberColletionVCH:1:IsSamePurchaseVCH) = #VCHRef ;----------------------------------------------------------------------------------------------------------------------------------------; [Collection: SuppilerVCHCollletion] Type : Vouchers : Ledger Child Of : #EIConsignee Fetch : Reference, VoucherTypeName, * Filter : IsPurchaseVoucherType [Collection: SupplierNumberColletion] Source Collection : SuppilerVCHCollletion By : SuppilerINVNumber : $Reference [Collection: SuppilerVCHCollletionVCH] Type : Vouchers : Ledger Child Of : #VchParticulars Fetch : Reference, VoucherTypeName, * Filter : IsPurchaseVoucherType [Collection: SupplierNumberColletionVCH] Source Collection : SuppilerVCHCollletionVCH By : SuppilerINVNumber : $Reference [System: Formulae] IsSamePurchaseVCH : $SuppilerINVNumber = #VCHRef DuplicateNumberWAR : $$LocaleString:"Duplicated Purchase" + $$NewLine + "" + $$NewLine + "Already Entered this Party Purchase...!" + + $$NewLine + "Please Check Purchase...!" IsLedgerGRPBranch : $$collectionField:$ParentHierarchy@@NosGrpVehicleBrn)arentHierarchy = "Branch / Divisions" NosGrpVehicleBrn : $$NumItemsarentHierarchy IsControlCondCMP : $IseCommOperator AND NOT $$IsEmpty:$$Value
Nice... Kindly put your code in Code window provided in Insert Button.. It looks better and Format is also maintained ... (And it is easy to Copy Paste ..)
Code: [#Field: EI Consignee] Add : Option : EIConsDupNumbBlock : Not $$InAlterMode And @@IsPurchase And $CMPPurcDupBlock:Company:##SVCurrentCompany = Yes [!Field: EIConsDupNumbBlock] Control : DuplicateNumberWAR : If (Not $$IsEmpty:#VCHRef) Then @IsSupplierNO Else No IsSupplierNO: ($$FilterValue:$SuppilerINVNumber:SupplierNumberColletion:1:IsSamePurchaseVCH) = #VCHRef [#Field : VchParticulars] Add : Option : EIConsDupNumbBlockVCH : Not $$InAlterMode And @@IsPurchase And $CMPPurcDupBlock:Company:##SVCurrentCompany = Yes [!Field : EIConsDupNumbBlockVCH] Control : DuplicateNumberWAR : If (Not $$IsEmpty:#VCHRef) And ($$Line = 1) Then @IsSupplierNO Else No IsSupplierNO: ($$FilterValue:$SuppilerINVNumber:SupplierNumberColletionVCH:1:IsSamePurchaseVCH) = #VCHRef ;----------------------------------------------------------------------------------------------------------------------------------------; [Collection: SuppilerVCHCollletion] Type : Vouchers : Ledger Child Of : #EIConsignee Fetch : Reference, VoucherTypeName, * Filter : IsPurchaseVoucherType [Collection: SupplierNumberColletion] Source Collection : SuppilerVCHCollletion By : SuppilerINVNumber : $Reference [Collection: SuppilerVCHCollletionVCH] Type : Vouchers : Ledger Child Of : #VchParticulars Fetch : Reference, VoucherTypeName, * Filter : IsPurchaseVoucherType [Collection: SupplierNumberColletionVCH] Source Collection : SuppilerVCHCollletionVCH By : SuppilerINVNumber : $Reference [System: Formulae] IsSamePurchaseVCH : $SuppilerINVNumber = #VCHRef DuplicateNumberWAR : $$LocaleString:"Duplicated Purchase" + $$NewLine + "" + $$NewLine + "Already Entered this Party Purchase...!" + + $$NewLine + "Please Check Purchase...!" IsLedgerGRPBranch : $$collectionField:$ParentHierarchy:(@@NosGrpVehicleBrn):ParentHierarchy = "Branch / Divisions" NosGrpVehicleBrn : $$NumItems:ParentHierarchy IsControlCondCMP : $IseCommOperator AND NOT $$IsEmpty:$$Value
Modified code. Working fine Code: [#Field: EI Consignee] Control : DuplicateNumberWAR : If (Not $$IsEmpty:#VCHRef) AND (Not $$InAlterMode) Then @IsSupplierNO Else No IsSupplierNO: ($$FilterValue:$SuppilerINVNumber:SupplierNumberColletion:1:IsSamePurchaseVCH) = #VCHRef [#Field : VchParticulars] Control : DuplicateNumberWAR : If (Not $$IsEmpty:#VCHRef) And ($$Line = 1) AND (Not $$InAlterMode) Then @IsSupplierNO Else No IsSupplierNO: ($$FilterValue:$SuppilerINVNumber:SupplierNumberColletionVCH:1:IsSamePurchaseVCH) = #VCHRef ;----------------------------------------------------------------------------------------------------------------------------------------; [Collection: SuppilerVCHCollletion] Type : Vouchers : Ledger Child Of : #EIConsignee Fetch : Reference, VoucherTypeName, * Filter : IsPurchaseVoucherType [Collection: SupplierNumberColletion] Source Collection : SuppilerVCHCollletion By : SuppilerINVNumber : $Reference [Collection: SuppilerVCHCollletionVCH] Type : Vouchers : Ledger Child Of : #VchParticulars Fetch : Reference, VoucherTypeName, * Filter : IsPurchaseVoucherType [Collection: SupplierNumberColletionVCH] Source Collection : SuppilerVCHCollletionVCH By : SuppilerINVNumber : $Reference [System: Formula] IsSamePurchaseVCH : $SuppilerINVNumber = #VCHRef DuplicateNumberWAR : $$LocaleString:"Duplicated Purchase" + $$NewLine + "" + $$NewLine + "This Invoice is Already Entered...!" + + $$NewLine + "Please Check Party Ledger...!" ;;;;;;End code;;;;;