Compare commits

...

17 Commits

Author SHA1 Message Date
Allan Carr
1f281e8439 IO-2874 InsertBill Full Error Log
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-13 11:03:15 -07:00
Allan Carr
547e279693 Merged in hotfix/2024-08-06 (pull request #1579)
IO-2865 Job Total Labor InstanceManger
2024-08-06 19:32:32 +00:00
Allan Carr
b9bdefe898 Merged in feature/IO-2865-Job-Total-Labor-InstanceManager (pull request #1578)
IO-2865 Job Total Labor InstanceManger
2024-08-06 19:31:53 +00:00
Allan Carr
c963cb6fcc IO-2865 Job Total Labor InstanceManger
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-06 12:22:55 -07:00
Dave Richer
190b2e5b5c Merged in release/2024-08-02 (pull request #1573)
- Show default stats instead of no stats if statisticsOrder object is not yet valid.
2024-08-02 23:55:03 +00:00
Dave Richer
3e2a517272 Merged in feature/IO-2743-Production-Board-GridDND (pull request #1572)
- Show default stats instead of no stats if statisticsOrder object is not yet valid.
2024-08-02 23:54:16 +00:00
Dave Richer
ba3032e553 Merged in release/2024-08-02 (pull request #1571)
- Fix bug
2024-08-02 23:39:35 +00:00
Dave Richer
20fd452335 Merged in feature/IO-2743-Production-Board-GridDND (pull request #1569)
- Fix bug
2024-08-02 23:35:26 +00:00
Dave Richer
4e417d1b10 Merged in release/2024-08-02 (pull request #1568)
Release/2024 08 02
2024-08-02 22:28:13 +00:00
Allan Carr
3ee63a503a Merged in feature/IO-2854-ProManager-Profile-Discounts (pull request #1567)
Dinero Object
2024-08-02 22:10:16 +00:00
Allan Carr
8dd0e12398 Dinero Object
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-02 15:12:51 -07:00
Allan Carr
253b4d0ddc Merged in feature/IO-2854-ProManager-Profile-Discounts (pull request #1566)
Correct for Dinero type
2024-08-02 21:54:24 +00:00
Allan Carr
a8b0931659 Correct for Dinero type
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-02 14:49:20 -07:00
Allan Carr
11a182c68a Correct query and object call
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-02 14:19:58 -07:00
Allan Carr
2583d21cf1 Merged in feature/IO-2854-ProManager-Profile-Discounts (pull request #1564)
Correct query and object call
2024-08-02 21:17:49 +00:00
Dave Richer
aa6032d74f Merged in feature/IO-2743-Production-Board-GridDND (pull request #1563)
Feature/IO-2743 Production Board GridDND
2024-08-02 20:37:59 +00:00
Dave Richer
0c74848c54 Merged in feature/IO-2743-Production-Board-GridDND (pull request #1561)
Feature/IO-2743 Production Board GridDND
2024-08-02 20:34:33 +00:00
5 changed files with 24 additions and 17 deletions

View File

@@ -57,15 +57,17 @@ export default function JobTotalsTableLabor({ job }) {
render: (text, record) => record.hours.toFixed(1)
},
...InstanceRenderManager({
imex: {
title: t("joblines.fields.total"),
dataIndex: "total",
key: "total",
align: "right",
sorter: (a, b) => a.total.amount - b.total.amount,
sortOrder: state.sortedInfo.columnKey === "total" && state.sortedInfo.order,
render: (text, record) => Dinero(record.total).toFormat()
},
imex: [
{
title: t("joblines.fields.total"),
dataIndex: "total",
key: "total",
align: "right",
sorter: (a, b) => a.total.amount - b.total.amount,
sortOrder: state.sortedInfo.columnKey === "total" && state.sortedInfo.order,
render: (text, record) => Dinero(record.total).toFormat()
}
],
rome: [
{
title: t("joblines.fields.amount"),

View File

@@ -719,11 +719,11 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
});
//Handle insurance profile adjustments for Labor and Materials
Object.keys(job_totals.rate).forEach((key) => {
Object.keys(job_totals.rates).forEach((key) => {
if (
job_totals.rate[key] &&
job_totals.rate[key].adjustment &&
job_totals.rate[key].adjustment.isZero() === false
job_totals.rates[key] &&
job_totals.rates[key].adjustment &&
Dinero(job_totals.rates[key].adjustment).isZero() === false
) {
if (qbo) {
//Going to always assume that we need to apply GST and PST for labor.
@@ -748,7 +748,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
: taxCodes[taxAccountCode];
InvoiceLineAdd.push({
DetailType: "SalesItemLineDetail",
Amount: Dinero(job_totals.rate[key]).adjustment.toFormat(DineroQbFormat),
Amount: Dinero(job_totals.rates[key].adjustment).toFormat(DineroQbFormat),
Description: `${account.accountdesc} - Adjustment`,
SalesItemLineDetail: {
...(jobs_by_pk.class ? { ClassRef: { value: classes[jobs_by_pk.class] } } : {}),
@@ -770,7 +770,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
},
Desc: "Storage",
Quantity: 1,
Amount: Dinero(job_totals.rate[key]).adjustment.toFormat(DineroQbFormat),
Amount: Dinero(job_totals.rates[key].adjustment).toFormat(DineroQbFormat),
SalesTaxCodeRef: {
FullName: bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON"
}

View File

@@ -273,7 +273,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
return result && result.json && result.json.Bill;
} catch (error) {
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
error: (error && error.authResponse && error.authResponse.body) || (error && error.message),
error: error, //(error && error.authResponse && error.authResponse.body) || (error && error.message),
method: "InsertBill"
});
throw error;

View File

@@ -380,7 +380,7 @@ function calculateAllocations(connectionData, job) {
});
//profile level adjustments for labor and materials
Object.keys(job.job_totals.rates).forEach((key) => {
if (job.job_totals.rate[key] && job.job_totals.rate[key].adjustment && job.job_totals.rate[key].adjustment.isZero() === false) {
if (job.job_totals.rates[key] && job.job_totals.rates[key].adjustment && Dinero(job.job_totals.rates[key].adjustment).isZero() === false) {
const accountName = selectedDmsAllocationConfig.profits[key.toUpperCase()];
const otherAccount = bodyshop.md_responsibility_centers.profits.find((c) => c.name === accountName);
if (otherAccount) {

View File

@@ -1528,6 +1528,7 @@ exports.QUERY_JOB_COSTING_DETAILS = ` query QUERY_JOB_COSTING_DETAILS($id: uuid!
ca_customer_gst
dms_allocation
cieca_pfl
materials
joblines(where: { removed: { _eq: false } }) {
id
db_ref
@@ -1642,6 +1643,8 @@ exports.QUERY_JOB_COSTING_DETAILS_MULTI = ` query QUERY_JOB_COSTING_DETAILS_MULT
ca_bc_pvrt
ca_customer_gst
dms_allocation
cieca_pfl
materials
joblines(where: {removed: {_eq: false}}) {
id
db_ref
@@ -1867,6 +1870,8 @@ exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
scheduled_in
actual_in
ca_bc_pvrt
cieca_pfl
materials
timetickets {
id
actualhrs