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