IO-1687 Add payable due date.
This commit is contained in:
@@ -158,7 +158,7 @@ export default function VendorsFormComponent({
|
|||||||
<InputNumber min={0} max={1} precision={2} step={0.01} />
|
<InputNumber min={0} max={1} precision={2} step={0.01} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
|
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
|
||||||
<InputNumber />
|
<InputNumber min={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{
|
{
|
||||||
// <Form.Item
|
// <Form.Item
|
||||||
|
|||||||
@@ -2591,7 +2591,7 @@
|
|||||||
"country": "Country",
|
"country": "Country",
|
||||||
"discount": "Discount % (as decimal)",
|
"discount": "Discount % (as decimal)",
|
||||||
"display_name": "Display Name",
|
"display_name": "Display Name",
|
||||||
"due_date": "Payment Due Date",
|
"due_date": "Payment Due Date (# of days)",
|
||||||
"email": "Contact Email",
|
"email": "Contact Email",
|
||||||
"favorite": "Favorite?",
|
"favorite": "Favorite?",
|
||||||
"lkq": "LKQ",
|
"lkq": "LKQ",
|
||||||
|
|||||||
@@ -181,7 +181,12 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor) {
|
|||||||
TxnDate: moment(bill.date)
|
TxnDate: moment(bill.date)
|
||||||
.tz(bill.job.bodyshop.timezone)
|
.tz(bill.job.bodyshop.timezone)
|
||||||
.format("YYYY-MM-DD"),
|
.format("YYYY-MM-DD"),
|
||||||
//DueDate: bill.due_date && moment(bill.due_date).format("YYYY-MM-DD"),
|
...(bill.vendor.due_date && {
|
||||||
|
DueDate: moment(bill.date)
|
||||||
|
.tz(bill.job.bodyshop.timezone)
|
||||||
|
.add(bill.vendor.due_date, "days")
|
||||||
|
.format("YYYY-MM-DD"),
|
||||||
|
}),
|
||||||
DocNumber: bill.invoice_number,
|
DocNumber: bill.invoice_number,
|
||||||
//...(bill.job.class ? { ClassRef: { Id: classes[bill.job.class] } } : {}),
|
//...(bill.job.class ? { ClassRef: { Id: classes[bill.job.class] } } : {}),
|
||||||
|
|
||||||
|
|||||||
@@ -75,11 +75,12 @@ const generateBill = (bill) => {
|
|||||||
TxnDate: moment(bill.date)
|
TxnDate: moment(bill.date)
|
||||||
.tz(bill.job.bodyshop.timezone)
|
.tz(bill.job.bodyshop.timezone)
|
||||||
.format("YYYY-MM-DD"),
|
.format("YYYY-MM-DD"),
|
||||||
DueDate:
|
...(bill.vendor.due_date && {
|
||||||
bill.due_date &&
|
DueDate: moment(bill.date)
|
||||||
moment(bill.due_date)
|
|
||||||
.tz(bill.job.bodyshop.timezone)
|
.tz(bill.job.bodyshop.timezone)
|
||||||
|
.add(bill.vendor.due_date, "days")
|
||||||
.format("YYYY-MM-DD"),
|
.format("YYYY-MM-DD"),
|
||||||
|
}),
|
||||||
RefNumber: bill.invoice_number,
|
RefNumber: bill.invoice_number,
|
||||||
Memo: `RO ${bill.job.ro_number || ""}`,
|
Memo: `RO ${bill.job.ro_number || ""}`,
|
||||||
ExpenseLineAdd: bill.billlines.map((il) =>
|
ExpenseLineAdd: bill.billlines.map((il) =>
|
||||||
|
|||||||
@@ -404,6 +404,7 @@ query QUERY_BILLS_FOR_PAYABLES_EXPORT($bills: [uuid!]!) {
|
|||||||
vendor{
|
vendor{
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
due_date
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user