Skip to content

Commit

Permalink
Use destructured billingBatchId
Browse files Browse the repository at this point in the history
We spotted that we were using `billingBatch.billingBatchId` when we were already destructuring this, so we move to using this directly
  • Loading branch information
StuAA78 committed May 15, 2023
1 parent 829a8c4 commit 15ba5aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ async function go (billingBatch, billingPeriod) {
await _updateStatus(billingBatchId, 'processing')

const chargeVersions = await _fetchChargeVersions(billingBatch, billingPeriod)
const invoiceAccounts = await _fetchInvoiceAccounts(chargeVersions, billingBatch.billingBatchId)
const invoiceAccounts = await _fetchInvoiceAccounts(chargeVersions, billingBatchId)

// We pre-generate our billing invoices ahead of time to ensure we have only one invoice per account id
const billingInvoices = _generateBillingInvoices(invoiceAccounts, billingBatch.billingBatchId, billingPeriod)
const billingInvoices = _generateBillingInvoices(invoiceAccounts, billingBatchId, billingPeriod)

for (const chargeVersion of chargeVersions) {
// Retrieve our previously-generated billing invoice for this charge version's invoice account
Expand Down

0 comments on commit 15ba5aa

Please sign in to comment.