Merge pull request #23128 from overleaf/ii-flexible-group-licensing-add-seats-cost-summary

[web] FL cost summary billing info

GitOrigin-RevId: eae6a7f02aa37e304144ccf75b952406567ca5d5
This commit is contained in:
Liangjun Song
2025-01-28 11:12:22 +00:00
committed by Copybot
parent 027c6bc96a
commit 7f1c07a796
5 changed files with 32 additions and 12 deletions
@@ -99,7 +99,7 @@
"address_second_line_optional": "",
"adjust_column_width": "",
"advanced_reference_search_mode": "",
"after_that_well_bill_you_x_annually_on_date_unless_you_cancel": "",
"after_that_well_bill_you_x_total_y_subtotal_z_tax_annually_on_date_unless_you_cancel": "",
"aggregate_changed": "",
"aggregate_to": "",
"agree_with_the_terms": "",
@@ -114,12 +114,20 @@ function CostSummary({ subscriptionChange, totalLicenses }: CostSummaryProps) {
</div>
<div>
{t(
'after_that_well_bill_you_x_annually_on_date_unless_you_cancel',
'after_that_well_bill_you_x_total_y_subtotal_z_tax_annually_on_date_unless_you_cancel',
{
subtotal: formatCurrency(
totalAmount: formatCurrency(
subscriptionChange.nextInvoice.total,
subscriptionChange.currency
),
subtotalAmount: formatCurrency(
subscriptionChange.nextInvoice.subtotal,
subscriptionChange.currency
),
taxAmount: formatCurrency(
subscriptionChange.nextInvoice.tax.amount,
subscriptionChange.currency
),
date: formatTime(
subscriptionChange.nextInvoice.date,
'MMMM D'
@@ -72,13 +72,24 @@ function UpgradeSummary({ subscriptionChange }: UpgradeSummaryProps) {
)}
</div>
<div>
{t('after_that_well_bill_you_x_annually_on_date_unless_you_cancel', {
subtotal: formatCurrency(
subscriptionChange.nextInvoice.subtotal,
subscriptionChange.currency
),
date: formatTime(subscriptionChange.nextInvoice.date, 'MMMM D'),
})}
{t(
'after_that_well_bill_you_x_total_y_subtotal_z_tax_annually_on_date_unless_you_cancel',
{
totalAmount: formatCurrency(
subscriptionChange.nextInvoice.total,
subscriptionChange.currency
),
subtotalAmount: formatCurrency(
subscriptionChange.nextInvoice.subtotal,
subscriptionChange.currency
),
taxAmount: formatCurrency(
subscriptionChange.nextInvoice.tax.amount,
subscriptionChange.currency
),
date: formatTime(subscriptionChange.nextInvoice.date, 'MMMM D'),
}
)}
</div>
</Card.Body>
</Card>
+1 -1
View File
@@ -118,7 +118,7 @@
"administration_and_security": "Administration and security",
"advanced_reference_search": "Advanced <0>reference search</0>",
"advanced_reference_search_mode": "Advanced reference search",
"after_that_well_bill_you_x_annually_on_date_unless_you_cancel": "After that, well bill you __subtotal__ + applicable taxes annually on __date__, unless you cancel.",
"after_that_well_bill_you_x_total_y_subtotal_z_tax_annually_on_date_unless_you_cancel": "After that, well bill you __totalAmount__ (__subtotalAmount__ + __taxAmount__ tax) annually on __date__, unless you cancel.",
"aggregate_changed": "Changed",
"aggregate_to": "to",
"agree_with_the_terms": "I agree with the Overleaf terms",
@@ -246,6 +246,7 @@ describe('<AddSeats />', function () {
subtotal: 895,
tax: {
rate: 0.2,
amount: 105,
},
total: 1000,
},
@@ -300,7 +301,7 @@ describe('<AddSeats />', function () {
/well charge you now for the cost of your additional users based on the remaining months of your current subscription/i
)
cy.findByText(
/after that, well bill you \$1,000.00 \+ applicable taxes annually on December 1, unless you cancel/i
/after that, well bill you \$1,000\.00 \(\$895\.00 \+ \$105\.00 tax\) annually on December 1, unless you cancel/i
)
})
})