Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #256 from karrioapi/patch-2023.3.4
Browse files Browse the repository at this point in the history
[patch] 2023.3.4
  • Loading branch information
danh91 authored Mar 29, 2023
2 parents c00f2e9 + 0b9ede5 commit e0a6106
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/context/label-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ export function useLabelDataMutation(id: string) {
try {
const invalidCustoms = (
"customs" in changes && [
...(changes.customs?.commodities, []),
...(state.shipment.customs?.commodities, [])
...(changes.customs?.commodities || []),
...(state.shipment.customs?.commodities || [])
].length === 0
);
if (invalidCustoms) {
Expand Down
13 changes: 12 additions & 1 deletion src/modules/Shipments/create_label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,16 @@ export default function CreateLabelPage(pageProps: any) {

</div>


{/* paperless trade */}
<CheckBoxField name="paperless_trade"
fieldClass="column mb-0 is-12 px-0 py-2"
defaultChecked={shipment.options?.paperless_trade}
onChange={e => onChange({ options: { ...shipment.options, paperless_trade: e.target.checked } })}
>
<span>Paperless trade</span>
</CheckBoxField>

</div>

<hr className='my-1' style={{ height: '1px' }} />
Expand Down Expand Up @@ -660,7 +670,8 @@ export default function CreateLabelPage(pageProps: any) {
...DEFAULT_CUSTOMS_CONTENT.duty,
currency: shipment.options?.currency,
paid_by: shipment.payment?.paid_by,
account_number: shipment.payment?.account_number
account_number: shipment.payment?.account_number,
declared_value: shipment.options?.declared_value,
},
duty_billing_address: shipment.billing_address,
commodities: getShipmentCommodities(shipment),
Expand Down

1 comment on commit e0a6106

@vercel
Copy link

@vercel vercel bot commented on e0a6106 Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.