mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 03:26:45 +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`,
|
||||
icon: <IconCurrencyDollar />,
|
||||
content: supplierPart?.pk ? (
|
||||
<SupplierPriceBreakTable supplierPartId={supplierPart.pk} />
|
||||
<SupplierPriceBreakTable supplierPart={supplierPart} />
|
||||
) : (
|
||||
<Skeleton />
|
||||
)
|
||||
|
@ -111,9 +111,9 @@ export function SupplierPriceBreakColumns(): TableColumn[] {
|
||||
}
|
||||
|
||||
export default function SupplierPriceBreakTable({
|
||||
supplierPartId
|
||||
supplierPart
|
||||
}: Readonly<{
|
||||
supplierPartId: number;
|
||||
supplierPart: any;
|
||||
}>) {
|
||||
const table = useTable('supplierpricebreaks');
|
||||
|
||||
@ -142,7 +142,8 @@ export default function SupplierPriceBreakTable({
|
||||
title: t`Add Price Break`,
|
||||
fields: supplierPriceBreakFields,
|
||||
initialData: {
|
||||
part: supplierPartId
|
||||
part: supplierPart.pk,
|
||||
price_currency: supplierPart.supplier_detail.currency
|
||||
},
|
||||
table: table
|
||||
});
|
||||
@ -208,7 +209,7 @@ export default function SupplierPriceBreakTable({
|
||||
tableState={table}
|
||||
props={{
|
||||
params: {
|
||||
part: supplierPartId,
|
||||
part: supplierPart.pk,
|
||||
part_detail: true,
|
||||
supplier_detail: true
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user