Add department to QBO Payables.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -206,7 +206,14 @@ async function InsertVendorRecord(oauthClient, qbo_realmId, req, bill) {
|
||||
}
|
||||
}
|
||||
|
||||
async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop) {
|
||||
async function InsertBill(
|
||||
oauthClient,
|
||||
qbo_realmId,
|
||||
req,
|
||||
bill,
|
||||
vendor,
|
||||
bodyshop
|
||||
) {
|
||||
const { accounts, taxCodes, classes } = await QueryMetaData(
|
||||
oauthClient,
|
||||
qbo_realmId,
|
||||
@@ -243,8 +250,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
|
||||
AccountRef: {
|
||||
value:
|
||||
accounts[
|
||||
bodyshop.md_responsibility_centers.taxes.federal
|
||||
.accountdesc
|
||||
bodyshop.md_responsibility_centers.taxes.federal.accountdesc
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -286,7 +292,10 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
|
||||
)
|
||||
? { GlobalTaxCalculation: "TaxExcluded" }
|
||||
: {}),
|
||||
|
||||
...(bodyshop.accountingconfig.qbo_departmentid &&
|
||||
bodyshop.accountingconfig.qbo_departmentid.trim() !== "" && {
|
||||
DepartmentRef: { value: bodyshop.accountingconfig.qbo_departmentid },
|
||||
}),
|
||||
PrivateNote: `RO ${bill.job.ro_number || ""}`,
|
||||
Line: lines,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user