Hello everyone,
I Require a restriction when creating a journal so that only one branch can be selected per voucher. Selecting different branches within a single voucher will not be allowed and will be restricted. Those journals are fixed asset journal, general journal, invoice journal, vendor payment journal and customer payment journal. A Boolean field must be created in the general ledger parameters. If enabled, this parameter will enforce the restriction for all specified journal types and error message will be displayed: "Choose one branch per voucher”, and the journal cannot be posted without resolving this error. If set to "no," there will be no restriction.
as you can see in the screenshot, this journal has same voucher number, but the branch is different. this should display error message if the boolean field is enabled.
anyone can provide like source code or guidance to accomplish this task?
thanks