mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: add local discount and adjustment calculations to financial models and transformers
- Introduced `discountAmountLocal` and `adjustmentLocal` properties across Bill, CreditNote, SaleInvoice, SaleReceipt, and VendorCredit models to calculate amounts in local currency. - Updated transformers for CreditNote, PurchaseInvoice, and VendorCredit to include formatted representations of local discount and adjustment amounts. - Enhanced GL entry services to handle discount and adjustment entries for SaleReceipt and CreditNote, ensuring accurate ledger entries. - Improved overall consistency in handling financial calculations across various models and services.
This commit is contained in:
@@ -15,11 +15,17 @@ export class SaleReceiptTransformer extends Transformer {
|
||||
return [
|
||||
'discountAmountFormatted',
|
||||
'discountPercentageFormatted',
|
||||
'discountAmountLocalFormatted',
|
||||
|
||||
'subtotalFormatted',
|
||||
'subtotalLocalFormatted',
|
||||
|
||||
'totalFormatted',
|
||||
'totalLocalFormatted',
|
||||
|
||||
'adjustmentFormatted',
|
||||
'adjustmentLocalFormatted',
|
||||
|
||||
'formattedAmount',
|
||||
'formattedReceiptDate',
|
||||
'formattedClosedAtDate',
|
||||
|
||||
Reference in New Issue
Block a user