tango-app-api-payment-subscription 3.5.25 → 3.5.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-payment-subscription",
3
- "version": "3.5.25",
3
+ "version": "3.5.26",
4
4
  "description": "paymentSubscription",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1280,7 +1280,11 @@ async function resolveBasePricingScope( group, getClient ) {
1280
1280
 
1281
1281
  async function standardPrice( group, getClient, baseDate ) {
1282
1282
  console.log( '🚀 ~ standardPrice ~ baseDate:', baseDate.format( 'MMM YYYY' ) );
1283
- const currentMonthDays = 30;
1283
+ // Prorate against the actual number of days in the invoice's billing month
1284
+ // (e.g. 31 for July, 28/29 for Feb) so invoice line amounts match the
1285
+ // annexure, which uses billingMonth.daysInMonth() in buildAnnexureRows().
1286
+ // Previously hardcoded to 30, which inflated 31-day-month invoices.
1287
+ const currentMonthDays = baseDate.daysInMonth();
1284
1288
  console.log( '🚀 ~ standardPrice ~ currentMonthDays:', currentMonthDays );
1285
1289
  // Pricing method: 'flat' => bill every store for the full month
1286
1290
  // regardless of working days. 'prorate' => bill for actual working days.