Added scheduling routes for smart scheduling BOD-4
This commit is contained in:
@@ -32,6 +32,8 @@ exports.default = async (req, res) => {
|
||||
|
||||
//Is this a two tier, or 3 tier setup?
|
||||
const isThreeTier = bodyshop.accountingconfig.tiers === 3;
|
||||
const twoTierPref = bodyshop.accountingconfig.twotierpref;
|
||||
|
||||
if (isThreeTier) {
|
||||
QbXmlToExecute.push({
|
||||
id: jobId,
|
||||
@@ -43,13 +45,25 @@ exports.default = async (req, res) => {
|
||||
QbXmlToExecute.push({
|
||||
id: jobId,
|
||||
okStatusCodes: ["0", "3100"],
|
||||
qbxml: generateJobQbxml(jobs_by_pk, bodyshop, isThreeTier, 2),
|
||||
qbxml: generateJobQbxml(
|
||||
jobs_by_pk,
|
||||
bodyshop,
|
||||
isThreeTier,
|
||||
2,
|
||||
twoTierPref
|
||||
),
|
||||
});
|
||||
|
||||
QbXmlToExecute.push({
|
||||
id: jobId,
|
||||
okStatusCodes: ["0", "3100"],
|
||||
qbxml: generateJobQbxml(jobs_by_pk, bodyshop, isThreeTier, 3),
|
||||
qbxml: generateJobQbxml(
|
||||
jobs_by_pk,
|
||||
bodyshop,
|
||||
isThreeTier,
|
||||
3,
|
||||
twoTierPref
|
||||
),
|
||||
});
|
||||
//Generate the actual invoice.
|
||||
QbXmlToExecute.push({
|
||||
@@ -115,7 +129,7 @@ const generateOwnerTier = (jobs_by_pk) => {
|
||||
}`;
|
||||
};
|
||||
|
||||
const generateJobQbxml = (jobs_by_pk, bodyshop, isThreeTier, tierLevel) => {
|
||||
const generateJobQbxml = (jobs_by_pk, bodyshop, isThreeTier, tierLevel, twoTierPref) => {
|
||||
let Name;
|
||||
let ParentRefName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user