Closed erawat closed 3 years ago
Since we have changed the way to display instalments schedule, the API format has also been updated to remove formatting like currency symbol, status label, so the API will return raw data and the page will handle the display format. This way makes the API result more flexible to reuse in other systems or a module like webform.
Can we just confirm that this works with sites that use Euros or other currencies i.e. for FEMS or WHF?
Since we have changed the way to display instalments schedule, the API format has also been updated to remove formatting like currency symbol, status label, so the API will return raw data and the page will handle the display format. This way makes the API result more flexible to reuse in other systems or a module like webform.
Can we just confirm that this works with sites that use Euros or other currencies i.e. for FEMS or WHF?
@jamienovick This will work with any currency as the template is using default currency symbol and date format from civicrm localisation settings.
Overview
Total amount and tax amount on currently screen is confusing. This PR adds line item(s) as sub table on each instalment to visualize financial type, quantity, unit price, sub total, tax amount as total amount similar to CiviCRM contribution line item.
Line items table works with
Before
After
Technical Details
Previously, the instalments display was generated each time by rewriting DOM, this method was expensive especially when we need to rewrite the DOM with nested table each time and the display is not reusable.
Since, we need a complex table for displaying instalments, the CiviCRM page for displaying the content is created and the membership form is loading the instalments table by using CRM.loadPage() function that provided by CiviCRM to inject the page into the membership form. This method is widely used in CiviCRM in many pages.
Finally, we have also changed the way to display instalments schedule, the API format has also been updated to remove formatting like currency symbol, status label, so the API will return raw data and the page will handle the display format. This way makes the API result more flexible to reuse in other systems or a module like webform.