From f5533075870084d06fb0d65c9983a2cb8450665b Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 17 May 2023 10:11:27 -0700 Subject: [PATCH 1/6] Added rounding to job costing for adjustments. --- server/job/job-costing.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/job/job-costing.js b/server/job/job-costing.js index 33ae5722b..2096ac7d1 100644 --- a/server/job/job-costing.js +++ b/server/job/job-costing.js @@ -840,7 +840,9 @@ function GenerateCostingData(job) { //Push adjustments to bottom line. if (job.adjustment_bottom_line) { //Add to totals. - const Adjustment = Dinero({ amount: job.adjustment_bottom_line * 100 }); //Need to invert, since this is being assigned as a cost. + const Adjustment = Dinero({ + amount: Math.round(job.adjustment_bottom_line * 100), + }); //Need to invert, since this is being assigned as a cost. summaryData.totalLaborSales = summaryData.totalLaborSales.add(Adjustment); summaryData.totalSales = summaryData.totalSales.add(Adjustment); //Add to lines. From 5e36a4ae89e751b0ce725efe30a79386c06f362c Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 17 May 2023 12:09:21 -0700 Subject: [PATCH 2/6] IO-2275 Remove PVRT and GST References in USA App. --- .../jobs-convert-button.component.jsx | 16 +++-- .../jobs-create-jobs-info.component.jsx | 16 +++-- .../jobs-detail-rates.component.jsx | 68 ++++++++++--------- 3 files changed, 55 insertions(+), 45 deletions(-) diff --git a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx index 108a3e89f..b48deb3b5 100644 --- a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx +++ b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx @@ -219,13 +219,15 @@ export function JobsConvertButton({ )} - - - + {bodyshop.region_config.toLowerCase().startsWith("ca") && ( + + + + )} - - - + {bodyshop.region_config.toLowerCase().startsWith("ca") && ( + + + + )} - - - - - + {bodyshop.region_config.toLowerCase().startsWith("ca") && ( + + + + + + )} - - - - - - + {bodyshop.region_config === "CA_BC" && ( + + + + + + + )} - - - + {bodyshop.region_config.toLowerCase().startsWith("ca") && ( + + + + )} Date: Wed, 17 May 2023 12:27:27 -0700 Subject: [PATCH 3/6] Resolve missing intellipay translations. --- bodyshop_translations.babel | 466 ++++++++++++++++++++++ client/src/translations/en_us/common.json | 40 +- client/src/translations/es/common.json | 31 ++ client/src/translations/fr/common.json | 31 ++ 4 files changed, 562 insertions(+), 6 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 970bef3ff..c55a71ccb 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1009,6 +1009,27 @@ + + smspaymentreminder + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + suggesteddates false @@ -1516,6 +1537,27 @@ + + failedpayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + jobassignmentchange false @@ -8389,6 +8431,27 @@ ssbuckets + + color + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + gte false @@ -18947,6 +19010,325 @@ + + job_payments + + + buttons + + + goback + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + proceedtopayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + refundpayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + notifications + + + error + + + description + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + title + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + + + titles + + + amount + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + dateOfPayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + descriptions + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + payer + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + payername + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + paymentid + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + paymenttype + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + refundamount + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + transactionid + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + joblines @@ -32119,6 +32501,27 @@ + + entercardpayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + enterpayment false @@ -32350,6 +32753,27 @@ + + paymentremindersms + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + phonebook false @@ -40461,6 +40885,27 @@ + + cardcolor + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + cardsettings false @@ -40671,6 +41116,27 @@ + + legend + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + note false diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 0c40ef566..fbbc00196 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -63,6 +63,7 @@ "scheduledfor": "Scheduled appointment for: ", "severalerrorsfound": "Several jobs have issues which may prevent accurate smart scheduling. Click to expand.", "smartscheduling": "Smart Scheduling", + "smspaymentreminder": "This is {{shopname}} reminding you about your remaining balance of {{amount}}. To pay for the said balance click the link {{payment_link}}.", "suggesteddates": "Suggested Dates" }, "successes": { @@ -103,6 +104,7 @@ "admin_jobunvoid": "ADMIN: Job has been unvoided.", "billposted": "Bill with invoice number {{invoice_number}} posted.", "billupdated": "Bill with invoice number {{invoice_number}} updated.", + "failedpayment": "Failed payment attempt.", "jobassignmentchange": "Employee {{name}} assigned to {{operation}}", "jobassignmentremoved": "Employee assignment removed for {{operation}}", "jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.", @@ -521,12 +523,12 @@ "dailyhrslimit": "Daily Incoming Hours Limit" }, "ssbuckets": { + "color": "Job Color", "gte": "Greater Than/Equal to (hrs)", "id": "ID", "label": "Label", "lt": "Less than (hrs)", - "target": "Target (count)", - "color": "Job Color" + "target": "Target (count)" }, "state": "Province/State", "state_tax_id": "Provincial/State Tax ID (PST, QST)", @@ -1179,6 +1181,30 @@ "updated": "Inventory line updated." } }, + "job_payments": { + "buttons": { + "goback": "Cancel", + "proceedtopayment": "Proceed to Payment", + "refundpayment": "Refund Payment" + }, + "notifications": { + "error": { + "description": "Please try again. Make sure the refund amount does not exceeds the payment amount.", + "title": "Error Refunding Payment" + } + }, + "titles": { + "amount": "Amount", + "dateOfPayment": "Date", + "descriptions": "Description", + "payer": "Payer", + "payername": "Payer Name", + "paymentid": "Payment ID", + "paymenttype": "Type", + "refundamount": "Refund Amount", + "transactionid": "Transaction ID" + } + }, "joblines": { "actions": { "converttolabor": "Convert amount to Labor.", @@ -1289,7 +1315,7 @@ "addpayer": "Add Payer", "createnewcustomer": "Create New Customer", "findmakemodelcode": "Find Make/Model Code", - "getmakes": "", + "getmakes": "Get Makes", "labels": { "refreshallocations": "Refresh this component to see the DMS allocations." }, @@ -1889,6 +1915,7 @@ "customers": "Customers", "dashboard": "Dashboard", "enterbills": "Enter Bills", + "entercardpayment": "Enter Card Payments", "enterpayment": "Enter Payments", "entertimeticket": "Enter Time Tickets", "export": "Export", @@ -1900,6 +1927,7 @@ "newjob": "Create New Job", "owners": "Owners", "parts-queue": "Parts Queue", + "paymentremindersms": "Send Payment Reminder via SMS", "phonebook": "Phonebook", "productionboard": "Production Board - Visual", "productionlist": "Production Board - List", @@ -2399,6 +2427,7 @@ "qbo_usa": "QBO USA" } }, + "cardcolor": "Card Colors", "cardsettings": "Card Settings", "clm_no": "Claim Number", "comment": "Comment", @@ -2409,6 +2438,7 @@ "ins_co_nm": "Insurance Company Name", "jobdetail": "Job Details", "laborhrs": "Labor Hours", + "legend": "Legend:", "note": "Production Note", "ownr_nm": "Owner Name", "paintpriority": "P/P", @@ -2421,9 +2451,7 @@ "sublets": "Sublets", "totalhours": "Total Hrs ", "touchtime": "T/T", - "viewname": "View Name", - "legend": "Legend:", - "cardcolor": "Card Colors" + "viewname": "View Name" }, "successes": { "removed": "Job removed from production." diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index a8aff8e9d..5bc8d52ea 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -63,6 +63,7 @@ "scheduledfor": "Cita programada para:", "severalerrorsfound": "", "smartscheduling": "", + "smspaymentreminder": "", "suggesteddates": "" }, "successes": { @@ -103,6 +104,7 @@ "admin_jobunvoid": "", "billposted": "", "billupdated": "", + "failedpayment": "", "jobassignmentchange": "", "jobassignmentremoved": "", "jobchecklist": "", @@ -521,6 +523,7 @@ "dailyhrslimit": "" }, "ssbuckets": { + "color": "", "gte": "", "id": "", "label": "", @@ -1178,6 +1181,30 @@ "updated": "" } }, + "job_payments": { + "buttons": { + "goback": "", + "proceedtopayment": "", + "refundpayment": "" + }, + "notifications": { + "error": { + "description": "", + "title": "" + } + }, + "titles": { + "amount": "", + "dateOfPayment": "", + "descriptions": "", + "payer": "", + "payername": "", + "paymentid": "", + "paymenttype": "", + "refundamount": "", + "transactionid": "" + } + }, "joblines": { "actions": { "converttolabor": "", @@ -1888,6 +1915,7 @@ "customers": "Clientes", "dashboard": "", "enterbills": "", + "entercardpayment": "", "enterpayment": "", "entertimeticket": "", "export": "", @@ -1899,6 +1927,7 @@ "newjob": "", "owners": "propietarios", "parts-queue": "", + "paymentremindersms": "", "phonebook": "", "productionboard": "", "productionlist": "", @@ -2398,6 +2427,7 @@ "qbo_usa": "" } }, + "cardcolor": "", "cardsettings": "", "clm_no": "", "comment": "", @@ -2408,6 +2438,7 @@ "ins_co_nm": "", "jobdetail": "", "laborhrs": "", + "legend": "", "note": "", "ownr_nm": "", "paintpriority": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 7b55857a9..343903104 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -63,6 +63,7 @@ "scheduledfor": "Rendez-vous prévu pour:", "severalerrorsfound": "", "smartscheduling": "", + "smspaymentreminder": "", "suggesteddates": "" }, "successes": { @@ -103,6 +104,7 @@ "admin_jobunvoid": "", "billposted": "", "billupdated": "", + "failedpayment": "", "jobassignmentchange": "", "jobassignmentremoved": "", "jobchecklist": "", @@ -521,6 +523,7 @@ "dailyhrslimit": "" }, "ssbuckets": { + "color": "", "gte": "", "id": "", "label": "", @@ -1178,6 +1181,30 @@ "updated": "" } }, + "job_payments": { + "buttons": { + "goback": "", + "proceedtopayment": "", + "refundpayment": "" + }, + "notifications": { + "error": { + "description": "", + "title": "" + } + }, + "titles": { + "amount": "", + "dateOfPayment": "", + "descriptions": "", + "payer": "", + "payername": "", + "paymentid": "", + "paymenttype": "", + "refundamount": "", + "transactionid": "" + } + }, "joblines": { "actions": { "converttolabor": "", @@ -1888,6 +1915,7 @@ "customers": "Les clients", "dashboard": "", "enterbills": "", + "entercardpayment": "", "enterpayment": "", "entertimeticket": "", "export": "", @@ -1899,6 +1927,7 @@ "newjob": "", "owners": "Propriétaires", "parts-queue": "", + "paymentremindersms": "", "phonebook": "", "productionboard": "", "productionlist": "", @@ -2398,6 +2427,7 @@ "qbo_usa": "" } }, + "cardcolor": "", "cardsettings": "", "clm_no": "", "comment": "", @@ -2408,6 +2438,7 @@ "ins_co_nm": "", "jobdetail": "", "laborhrs": "", + "legend": "", "note": "", "ownr_nm": "", "paintpriority": "", From 1c89d120344504fc69f621879590d16f7d5d14dd Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 17 May 2023 12:36:15 -0700 Subject: [PATCH 4/6] IO-2286 Resolve duplication of cost centers when sorting labor allocations. --- .../labor-allocations-table.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx index 88cd67a45..3c264dafc 100644 --- a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx +++ b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx @@ -207,7 +207,7 @@ export function LaborAllocationsTable({ `${record.cost_center} ${record.mod_lbr_ty}`} pagination={false} onChange={handleTableChange} dataSource={totals} From e36904794b53b8018d427ccd0985a3b2015e967b Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 17 May 2023 13:31:15 -0700 Subject: [PATCH 5/6] IO-2274 Add typing to notes. --- bodyshop_translations.babel | 1290 ++++++++++++++++- .../jobs-notes/jobs.notes.component.jsx | 23 +- .../note-upsert-modal.component.jsx | 34 +- client/src/graphql/notes.queries.js | 3 + client/src/translations/en_us/common.json | 93 +- client/src/translations/es/common.json | 86 ++ client/src/translations/fr/common.json | 86 ++ hasura/metadata/tables.yaml | 3 + .../down.sql | 4 + .../up.sql | 2 + 10 files changed, 1616 insertions(+), 8 deletions(-) create mode 100644 hasura/migrations/1684353031975_alter_table_public_notes_add_column_type/down.sql create mode 100644 hasura/migrations/1684353031975_alter_table_public_notes_add_column_type/up.sql diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 1d299f13f..b52de475e 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1,4 +1,4 @@ - +