web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Multiple cheque printing designs across same or different company at Bank accounts level X++

Muhammad Uzair Shah Profile Picture Muhammad Uzair Shah 201

Hi guys,

If you talk about implementing Finance module in any organization then one thing that will surely come into your mind is printing Cheques from the system. Most of the organizations wants to prints Cheques from system to maintain consistency in Cheque numbers without disturbing Cheque series. D365 Fin Ops provides an option for printing Cheques automatically but with limited functionality means that you can't use different custom cheque printing designs across same or multiple companies.

Background:

In order to print cheques from the system, standard out of the box Cheque layout doesn't match at all with the layouts of different banks so in any case customization has to be done in order to fulfill customers requirements.

Requirement:

I came across one requirement recently where customer had same cheque layouts in different companies as the cheque design was different from standard cheque design in fact having payment details as well at the bottom of the cheque print out so customization was required to map this requirement in the system. 

I am sharing my experience with the d365 tech guys in the form of blog. 

Here is another useful blog to cater customers requirements of different cheque printing designs across multiple companies at bank level. 

Solution:

Cheque printing customization has to be done in such a way that it is more flexible with respect to cross company Bank accounts. Cheque layout of other companies can be used using the custom Cheque layout parameter on Bank check layout setup form and also within the same company cheque layout can be mapped differently for different banks accounts.

Create a table extension of "BankChequeLayout" and add a new field on extended table of type "Enum". Each "Enum" value will be bind to respective Cheque layout design. Let say, if you have 7 different Cheque layouts then you can add seven "Enum" values of each Cheque layout design so that you can reuse anyone of these 7 different cheque layouts across different companies or the same company depends on the requirement.

Create a form extension of "BankChequeLayout" and add a custom field of "BankChequeLayout" table in the extended form for parametrization purpose. This will allow system admin users to change the Cheque layout at any time from the front end of the application in case if cheque printing design is matching with any of the existing designs rather then writing a code and deploying the solution which will be time consuming so this solution is flexible in terms of reusing different designs of cheque printing at bank account level.

Create new custom report designs and call them at run time based on the enum values specified at Bank cheque layout form.

Custom report element: Custom_Cheque 

Below are the different custom report designs on the custom report element "Custom_Cheque"

  • USSI
  • USMF
  • USRT
  • USPI
  • USMFV2
  • USSIV2
  • USRTV2

In my case, cheque layout was having more or less same dimensions as that of French cheque layout dimensions so I extended the init method of French cheque printing controller class.

[ExtensionOf(classStr(ChequeController_FR))]

final class CustomChequeController_FR_Report_Extension

{

    public void init()

    {

        next init();

        BankChequeLayout  bankChequeLayout;

        //To get the bank cheque layout table buffer at run time    

        bankChequeLayout = BankChequeLayout::find(tmpChequePrintout.AccountId);

        //CustomChequeFormType is the custom enum field pointing custom cheque designs. Based on the enum value specifed on the bank cheque layout form, system will return the corresponding cheque design.     

        switch (bankChequeLayout.CustomChequeFormType)

        {

            case CustomChequeFormType::USSI:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USSI);

        

            break;

            case CustomChequeFormType::USMF:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USMF);

            break;

            case CustomChequeFormType::USRT:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USRT);

            break;

            case CustomChequeFormType::USPI:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USPI);

            break;

            case CustomChequeFormType::USMFV2:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USMFV2);

            break;

            case CustomChequeFormType::USSIV2:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USSIV2);

            break;

            case CustomChequeFormType::USRTV2:

            

            chequeReport = ssrsReportStr(Custom_Cheque, USRTV2);

            break;

        }

    }

}

Comments

*This post is locked for comments