Merge branch 'master-AIO' into feature/IO-2520-Kaizen-Data-Pump
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -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: "",
|
||||
|
||||
@@ -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
|
||||
) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user