Process Reconart Files-MR Script Enhancement-Effective Commission Rate Proposal

The map-reduce for processing the Reconart files should be updated. The new enhancement is related to the fetching of the commission rate for the vendor bill and invoice. The script should look at the commission rate from the  Effective Commission Rate table on the vendor record based on the transaction date and the effective from date from the Effective Commission Rate table.

Requirement 

The requirement is to update the Map-Reduce for the Reconart Process Files. The script should look for the commission for the  generated transactions (vendor bill and invoice) from the  Effective Commission Rate table on the vendor record. 

Currently the script is set up to look at the Commission field (custentity_commission) to calculate the commission on the generated transactions. With the enhancement, the script should look at the transaction date and the effective date from the Effective Commission Rate table.

Our Solution

A map-reduce is already present in the account which is used to process the Reconart files. Based on the file contents, the script would identify the corresponding vendor record and will create the transactions(vendor bill and invoice). For the generated transactions, the script needs to find the commission. Currently the commissions are directly fetched from the Commission field (custentity_commission) from the Vendor record. 

The Name of the map reduce script is Process Reconart Files – MR (customscript_process_reconart_files_mr)

The script needs to be updated for identifying the correct commission from the Vendor record. Now the script should fetch the commission from the Effective Commission Rate table based on the transaction date and the effective date from the Effective Commission Rate table.

Example:

Imported transaction date: 31/05/2021 – effective commission rate will be 2%

Imported transaction date: 01/06/2021 – effective commission rate will be 2.5%

The imported transaction date will be available in the file contents. The Effective commission rate can be finalized by comparing the imported transaction date and the effective from date in the effective commission rate table on the vendor record.

The effective commission rate will be used for all the generated transactions.

Assumptions

  • The scope is only for finding the correct commission rate from the  effective commission rate table based on the transaction date and the effective from date. Rest of the process has no change and script won’t be changed furthermore.
  • The commission rate should be identified from the  effective commission rate table on the vendor record for all the generated transactions(Vendor Bill and Invoice).
  • We are assuming that the effective commission rate table would have values with the correct effective rates. If the commission rate is not available, the script should not proceed in creating the transactions. Instead, it should create an error log that the commission rate does not exist.
  • We are assuming that testing files are available for the development and the testing in the sandbox account

Risks 

  • New update shouldn’t affect the whole process of the Map Reduce script, so should be aware of the current setup of the whole script before starting the development

Total Efforts: 10hr

Leave a comment

Your email address will not be published. Required fields are marked *