mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Auto-fill currency for new supplier part (#9286)
- Closes https://github.com/inventree/InvenTree/issues/9284
This commit is contained in:
parent
0049544305
commit
7a43c3a83e
@ -276,7 +276,7 @@ export default function SupplierPartDetail() {
|
|||||||
label: t`Supplier Pricing`,
|
label: t`Supplier Pricing`,
|
||||||
icon: <IconCurrencyDollar />,
|
icon: <IconCurrencyDollar />,
|
||||||
content: supplierPart?.pk ? (
|
content: supplierPart?.pk ? (
|
||||||
<SupplierPriceBreakTable supplierPartId={supplierPart.pk} />
|
<SupplierPriceBreakTable supplierPart={supplierPart} />
|
||||||
) : (
|
) : (
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
)
|
)
|
||||||
|
@ -111,9 +111,9 @@ export function SupplierPriceBreakColumns(): TableColumn[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function SupplierPriceBreakTable({
|
export default function SupplierPriceBreakTable({
|
||||||
supplierPartId
|
supplierPart
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
supplierPartId: number;
|
supplierPart: any;
|
||||||
}>) {
|
}>) {
|
||||||
const table = useTable('supplierpricebreaks');
|
const table = useTable('supplierpricebreaks');
|
||||||
|
|
||||||
@ -142,7 +142,8 @@ export default function SupplierPriceBreakTable({
|
|||||||
title: t`Add Price Break`,
|
title: t`Add Price Break`,
|
||||||
fields: supplierPriceBreakFields,
|
fields: supplierPriceBreakFields,
|
||||||
initialData: {
|
initialData: {
|
||||||
part: supplierPartId
|
part: supplierPart.pk,
|
||||||
|
price_currency: supplierPart.supplier_detail.currency
|
||||||
},
|
},
|
||||||
table: table
|
table: table
|
||||||
});
|
});
|
||||||
@ -208,7 +209,7 @@ export default function SupplierPriceBreakTable({
|
|||||||
tableState={table}
|
tableState={table}
|
||||||
props={{
|
props={{
|
||||||
params: {
|
params: {
|
||||||
part: supplierPartId,
|
part: supplierPart.pk,
|
||||||
part_detail: true,
|
part_detail: true,
|
||||||
supplier_detail: true
|
supplier_detail: true
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user