Compare commits
17 Commits
feature/IO
...
feature/IO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f281e8439 | ||
|
|
547e279693 | ||
|
|
b9bdefe898 | ||
|
|
c963cb6fcc | ||
|
|
190b2e5b5c | ||
|
|
3e2a517272 | ||
|
|
ba3032e553 | ||
|
|
20fd452335 | ||
|
|
4e417d1b10 | ||
|
|
3ee63a503a | ||
|
|
8dd0e12398 | ||
|
|
253b4d0ddc | ||
|
|
a8b0931659 | ||
|
|
11a182c68a | ||
|
|
2583d21cf1 | ||
|
|
aa6032d74f | ||
|
|
0c74848c54 |
@@ -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"),
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user