Updated models.
This commit is contained in:
parent
bbadede777
commit
a4e68b5088
@ -130,7 +130,40 @@ export const Filament = {
|
|||||||
label: 'Cost',
|
label: 'Cost',
|
||||||
columnWidth: 150,
|
columnWidth: 150,
|
||||||
required: true,
|
required: true,
|
||||||
type: 'currency'
|
type: 'number',
|
||||||
|
prefix: '£'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'costWithTax',
|
||||||
|
label: 'Cost w/ Tax',
|
||||||
|
columnWidth: 150,
|
||||||
|
required: true,
|
||||||
|
readOnly: true,
|
||||||
|
type: 'number',
|
||||||
|
prefix: '£',
|
||||||
|
value: (objectData) => {
|
||||||
|
if (objectData?.costTaxRate?.rateType == 'percentage') {
|
||||||
|
return (
|
||||||
|
(
|
||||||
|
objectData?.cost *
|
||||||
|
(1 + objectData?.costTaxRate?.rate / 100)
|
||||||
|
).toFixed(2) || undefined
|
||||||
|
)
|
||||||
|
} else if (objectData?.costTaxRate?.rateType == 'amount') {
|
||||||
|
return (
|
||||||
|
(objectData?.cost + objectData?.costTaxRate?.rate).toFixed(2) ||
|
||||||
|
undefined
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'costTaxRate',
|
||||||
|
label: 'Cost Tax Rate',
|
||||||
|
required: true,
|
||||||
|
type: 'object',
|
||||||
|
objectType: 'taxRate',
|
||||||
|
showHyperlink: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'color',
|
name: 'color',
|
||||||
|
|||||||
@ -82,11 +82,19 @@ export const OrderItem = {
|
|||||||
},
|
},
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'shipment',
|
||||||
|
label: 'Shipment',
|
||||||
|
type: 'object',
|
||||||
|
objectType: 'shipment',
|
||||||
|
showHyperlink: true,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'itemType',
|
name: 'itemType',
|
||||||
label: 'Item Type',
|
label: 'Item Type',
|
||||||
type: 'objectType',
|
type: 'objectType',
|
||||||
masterFilter: ['part', 'packaging'],
|
masterFilter: ['part', 'packaging', 'filament'],
|
||||||
required: true,
|
required: true,
|
||||||
columnWidth: 125
|
columnWidth: 125
|
||||||
},
|
},
|
||||||
|
|||||||
@ -71,12 +71,24 @@ export const PurchaseOrder = {
|
|||||||
showHyperlink: true
|
showHyperlink: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cost',
|
name: 'totalAmount',
|
||||||
label: 'Cost',
|
label: 'Total Amount',
|
||||||
type: 'netGross',
|
type: 'number',
|
||||||
|
prefix: '£',
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'totalAmountWithTax',
|
||||||
|
label: 'Total Amount w/ Tax',
|
||||||
|
type: 'number',
|
||||||
|
prefix: '£',
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'totalTaxAmount',
|
||||||
|
label: 'Total Tax Amount',
|
||||||
|
type: 'number',
|
||||||
prefix: '£',
|
prefix: '£',
|
||||||
min: 0,
|
|
||||||
step: 0.01,
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user