diff --git a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx index 6481a6737..e9c6b444f 100644 --- a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx +++ b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx @@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next"; import InstanceRenderMgr from "../../utils/instanceRenderMgr"; //To be used as a form element only. -const { Option } = Select; const BillLineSearchSelect = ({ options, disabled, allowRemoved, ...restProps }, ref) => { const { t } = useTranslation(); diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 4c534a1f1..7019097ed 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -2936,6 +2936,8 @@ "purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)", "purchases_by_date_range_detail": "Purchases by Date - Detail", "purchases_by_date_range_summary": "Purchases by Date - Summary", + "purchases_by_ro_detail_date": "Purchases by RO - Detail", + "purchases_by_ro_summary_date": "Purchases by RO - Summary", "purchases_by_vendor_detailed_date_range": "Purchases By Vendor - Detailed", "purchases_by_vendor_summary_date_range": "Purchases by Vendor - Summary", "purchases_grouped_by_vendor_detailed": "Purchases Grouped by Vendor - Detailed", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index d9d1accce..51a33bc0c 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -2936,6 +2936,8 @@ "purchases_by_cost_center_summary": "", "purchases_by_date_range_detail": "", "purchases_by_date_range_summary": "", + "purchases_by_ro_detail_date": "", + "purchases_by_ro_summary_date": "", "purchases_by_vendor_detailed_date_range": "", "purchases_by_vendor_summary_date_range": "", "purchases_grouped_by_vendor_detailed": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index b44021dd2..e3821ef9b 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -2936,6 +2936,8 @@ "purchases_by_cost_center_summary": "", "purchases_by_date_range_detail": "", "purchases_by_date_range_summary": "", + "purchases_by_ro_detail_date": "", + "purchases_by_ro_summary_date": "", "purchases_by_vendor_detailed_date_range": "", "purchases_by_vendor_summary_date_range": "", "purchases_grouped_by_vendor_detailed": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index 0296fc317..8fda63504 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -1081,6 +1081,32 @@ export const TemplateList = (type, context) => { }, group: "purchases" }, + purchases_by_ro_detail_date: { + title: i18n.t("reportcenter.templates.purchases_by_ro_detail_date"), + description: "", + subject: i18n.t("reportcenter.templates.purchases_by_ro_detail_date"), + key: "purchases_by_ro_detail_date", + //idtype: "vendor", + disabled: false, + rangeFilter: { + object: i18n.t("reportcenter.labels.objects.jobs"), + field: i18n.t("jobs.fields.date_invoiced") + }, + group: "purchases" + }, + purchases_by_ro_summary_date: { + title: i18n.t("reportcenter.templates.purchases_by_ro_summary_date"), + description: "", + subject: i18n.t("reportcenter.templates.purchases_by_ro_summary_date"), + key: "purchases_by_ro_summary_date", + //idtype: "vendor", + disabled: false, + rangeFilter: { + object: i18n.t("reportcenter.labels.objects.jobs"), + field: i18n.t("jobs.fields.date_invoiced") + }, + group: "purchases" + }, job_costing_ro_date_summary: { title: i18n.t("reportcenter.templates.job_costing_ro_date_summary"), description: "", diff --git a/server/accounting/qb-receivables-lines.js b/server/accounting/qb-receivables-lines.js index 631be177d..69818343e 100644 --- a/server/accounting/qb-receivables-lines.js +++ b/server/accounting/qb-receivables-lines.js @@ -897,19 +897,20 @@ function checkStateTax(jobline, jobs_by_pk) { (jobline.db_ref && jobline.db_ref.startsWith("90051"))) && !isPaintOrShopMat; - if (!jobline.part_type && isAdditionalCost) { - if (jobs_by_pk.tax_lbr_rt === 0) { - return false; - } else { - return true; - } + if (!jobline.part_type && isAdditionalCost) { + if (jobs_by_pk.tax_lbr_rt === 0) { + return false; + } else { + return true; } + } if (jobline.tax_part === false) { return false; } else { if (jobline.part_type) { if ( + !jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`] || jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_in === false || jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_rt === 0 ) { diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js index ed9441d9d..747c9e51a 100644 --- a/server/job/job-totals-USA.js +++ b/server/job/job-totals-USA.js @@ -643,7 +643,7 @@ function CalculateAdditional(job) { additionalCosts: null, additionalCostItems: [], adjustments: null, - towing: null, + towing: Dinero(), shipping: Dinero(), storage: null, pvrt: null, @@ -668,7 +668,7 @@ function CalculateAdditional(job) { } if (val.line_desc.toLowerCase().includes("towing")) { - ret.towing = lineValue; + ret.towing = ret.towing.add(lineValue); return acc; } else { ret.additionalCostItems.push({ key: val.line_desc, total: lineValue }); @@ -919,7 +919,7 @@ function CalculateTaxesTotals(job, otherTotals) { Object.keys(taxableAmountsByTier).forEach((taxTierKey) => { taxable_adjustment = taxableAmountsByTier[taxTierKey].multiply(percent_of_adjustment); - console.log("🚀 ~ taxableAmountsByTier ~ taxable_adjustment:", taxable_adjustment) + console.log("🚀 ~ taxableAmountsByTier ~ taxable_adjustment:", taxable_adjustment); if (job.adjustment_bottom_line > 0) { taxableAmountsByTier[taxTierKey] = taxableAmountsByTier[taxTierKey].add(taxable_adjustment); } else { diff --git a/server/job/job-totals.js b/server/job/job-totals.js index 0da291120..079f54cba 100644 --- a/server/job/job-totals.js +++ b/server/job/job-totals.js @@ -489,7 +489,7 @@ function CalculateAdditional(job) { additionalCosts: null, additionalCostItems: [], adjustments: null, - towing: null, + towing: Dinero(), shipping: Dinero(), storage: null, pvrt: null, @@ -512,7 +512,7 @@ function CalculateAdditional(job) { } if (val.line_desc.toLowerCase().includes("towing")) { - ret.towing = lineValue; + ret.towing = ret.towing.add(lineValue); return acc; } else { ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });