Thursday, May 7, 2015

Cheque modification in AX 2012

Cheque modification is a most common requirements in Dynamics AX world. In this post I will discuss the values which are prepared before these values are dumped in SSRS Report framework. All cheque values including Recipient name and address, Amount in words, Date, Slip transactions etc.

The class which needs to be modify in order to customize the values is "CustVendCheque".

CustVendCheque class methods are generally modified to get the cheque values customized:
  • getSlipText or (fillSlipTxt which is obsolete in AX 2012)
  • output

getSlipText method is responsible for most of the data that is printed on the check slip lines; the key point here is that it is sent as a single block of text which leaves the developer very little room to actually modify the cheque without getting into a stream of circular reference errors. So, whatever we need to do as far as Text formatting (for check stubs) goes, we should get it done before this text (‘chequeSlipTxt’) leaves the class.

output method mainly contains the code for adding the check number to the stub. One can also use ‘\t’(tab) or StrlFix or StrRFix methods for aligning the string lines, such as if a customer wants check Number to fit the pre-printed cheques, we can deliberately use ‘\t’ tabs:

tmpChequePrintout.SlipTxt = strFmt(‘\t\t’+ “@SYS22495″+’ ‘+slipChequeNum+’\n);


Another important part to look at is "TmpChequePrintout" table which contains method responsible for the following details on cheque.
  • Amount in Words
setChequeAmount sets the AmountTxt (Amount in words) field of this table by the format of the non-negotiable check.

Following are the SSRS reports in AX 2012 which are displayed basis on Check Format setuped on Bank.
  • Cheque_BR
  • Cheque_CA
  • Cheque_DE
  • Cheque_DK
  • Cheque_ES
  • Cheque_FR
  • Cheque_UK
  • Cheque_US

No comments:

Post a Comment