Enhance Shipment model and NewShipment component with invoicing fields

- Added new invoicing fields: invoicedAmount, invoicedAmountWithTax, invoicedAmountRemaining, and invoicedAmountWithTaxRemaining to the Shipment model.
- Updated NewShipment component to include the new invoicing fields in its initial state configuration for better shipment tracking and management.
This commit is contained in:
Tom Butcher 2025-12-28 01:10:26 +00:00
parent 4da63e6a32
commit 6b983ca873
2 changed files with 57 additions and 1 deletions

View File

@ -85,7 +85,11 @@ const NewShipment = ({ onOk, reset, defaultValues }) => {
shippedAt: false,
expectedAt: false,
deliveredAt: false,
taxRecord: false
taxRecord: false,
invoicedAmount: false,
invoicedAmountWithTax: false,
invoicedAmountRemaining: false,
invoicedAmountWithTaxRemaining: false
}}
isEditing={false}
objectData={objectData}

View File

@ -131,6 +131,10 @@ export const Shipment = {
'amountWithTax',
'taxRate',
'taxAmount',
'invoicedAmount',
'invoicedAmountWithTax',
'invoicedAmountRemaining',
'invoicedAmountWithTaxRemaining',
'trackingNumber',
'shippedAt',
'expectedAt',
@ -288,6 +292,54 @@ export const Shipment = {
}
return 0
}
},
{
name: 'invoicedAmount',
label: 'Invoiced Amount',
type: 'number',
required: false,
readOnly: true,
prefix: '£',
fixedNumber: 2,
min: 0,
step: 0.01,
columnWidth: 150
},
{
name: 'invoicedAmountWithTax',
label: 'Invoiced Amount w/ Tax',
type: 'number',
required: false,
readOnly: true,
prefix: '£',
fixedNumber: 2,
min: 0,
step: 0.01,
columnWidth: 200
},
{
name: 'invoicedAmountRemaining',
label: 'Remaining Invoiced Amount',
type: 'number',
required: false,
readOnly: true,
prefix: '£',
min: 0,
step: 0.01,
columnWidth: 225,
fixedNumber: 2
},
{
name: 'invoicedAmountWithTaxRemaining',
label: 'Remaining Invoiced Amount w/ Tax',
type: 'number',
required: false,
readOnly: true,
prefix: '£',
min: 0,
fixedNumber: 2,
step: 0.01,
columnWidth: 275
}
]
}