Merge release & add time ticket calculations.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<babeledit_project be_version="2.7.1" version="1.2">
|
||||
<babeledit_project version="1.2" be_version="2.7.1">
|
||||
<!--
|
||||
|
||||
BabelEdit project file
|
||||
@@ -3683,6 +3683,69 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>itc_federal</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>itc_local</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>itc_state</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>mappingname</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -5819,27 +5882,6 @@
|
||||
<folder_node>
|
||||
<name>responsibilitycenters</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>LA4</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>ap</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -5987,6 +6029,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>la4</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>lab</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -17284,6 +17347,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>getmakes</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>post</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -120,7 +120,9 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
|
||||
{totals.totalSale.toFormat()}
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
{totals.totalCost.toFormat()}
|
||||
{
|
||||
// totals.totalCost.toFormat()
|
||||
}
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell></Table.Summary.Cell>
|
||||
<Table.Summary.Cell></Table.Summary.Cell>
|
||||
|
||||
@@ -13,6 +13,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CABCpvrtCalculator from "../ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component";
|
||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||
import JobsDetailRatesChangeButton from "../jobs-detail-rates-change-button/jobs-detail-rates-change-button.component";
|
||||
@@ -22,9 +23,10 @@ import JobsDetailRatesParts from "./jobs-detail-rates.parts.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
jobRO: selectJobReadOnly,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
export function JobsDetailRates({ jobRO, form, job }) {
|
||||
export function JobsDetailRates({ jobRO, form, job, bodyshop }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
@@ -77,7 +79,7 @@ export function JobsDetailRates({ jobRO, form, job }) {
|
||||
label={t("jobs.fields.adjustment_bottom_line")}
|
||||
name="adjustment_bottom_line"
|
||||
>
|
||||
<CurrencyInput disabled={jobRO} />
|
||||
<CurrencyInput disabled={jobRO || bodyshop.cdk_dealerid} />
|
||||
</Form.Item>
|
||||
<Space align="end">
|
||||
<Form.Item label={t("jobs.fields.ca_bc_pvrt")} name="ca_bc_pvrt">
|
||||
|
||||
@@ -121,6 +121,27 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.itc_federal")}
|
||||
valuePropName="checked"
|
||||
name={["cdk_configuration", "itc_federal"]}
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.itc_state")}
|
||||
valuePropName="checked"
|
||||
name={["cdk_configuration", "itc_state"]}
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.itc_local")}
|
||||
valuePropName="checked"
|
||||
name={["cdk_configuration", "itc_local"]}
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}>
|
||||
<Form.List name={["cdk_configuration", "payers"]}>
|
||||
@@ -471,6 +492,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item key={field.key}>
|
||||
<div>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.mappingname")}
|
||||
key={`${index}name`}
|
||||
@@ -484,7 +506,12 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
}}
|
||||
/>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow
|
||||
header={t("bodyshop.labels.defaultcostsmapping")}
|
||||
>
|
||||
@@ -1627,12 +1654,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
))}
|
||||
@@ -2717,7 +2738,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
</Form.Item>
|
||||
{bodyshop.cdk_dealerid && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.responsibilitycenter_dms_acctnumber")}
|
||||
label={t("bodyshop.fields.dms.dms_acctnumber")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
@@ -2815,7 +2836,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
</Form.Item>
|
||||
{bodyshop.cdk_dealerid && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.responsibilitycenter_dms_acctnumber")}
|
||||
label={t("bodyshop.fields.dms.dms_acctnumber")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
@@ -2911,21 +2932,9 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.responsibilitycenter_rate")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["md_responsibility_centers", "taxes", "local", "rate"]}
|
||||
>
|
||||
<InputNumber precision={2} />
|
||||
</Form.Item>
|
||||
{bodyshop.cdk_dealerid && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.responsibilitycenter_dms_acctnumber")}
|
||||
label={t("bodyshop.fields.dms.dms_acctnumber")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
@@ -2942,6 +2951,18 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
<Input />
|
||||
</Form.Item>
|
||||
)}
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.responsibilitycenter_rate")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["md_responsibility_centers", "taxes", "local", "rate"]}
|
||||
>
|
||||
<InputNumber precision={2} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow header={<div>AR</div>}>
|
||||
{/* <Form.Item
|
||||
|
||||
@@ -108,6 +108,8 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
});
|
||||
history.push("/manage/accounting/receivables");
|
||||
});
|
||||
|
||||
if (socket.disconnected) socket.connect();
|
||||
return () => {
|
||||
socket.removeAllListeners();
|
||||
socket.disconnect();
|
||||
|
||||
@@ -218,7 +218,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber disabled={jobRO} />
|
||||
<InputNumber precision={0} disabled={jobRO} />
|
||||
</Form.Item>
|
||||
)}
|
||||
{bodyshop.cdk_dealerid && (
|
||||
@@ -244,7 +244,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<InputNumber disabled={jobRO} />
|
||||
<InputNumber precision={0} disabled={jobRO} />
|
||||
</Form.Item>
|
||||
)}
|
||||
</LayoutFormRow>
|
||||
|
||||
@@ -237,6 +237,9 @@
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"dms_wip_acctnumber": "DMS W.I.P. Account #",
|
||||
"generic_customer_number": "Generic Customer Number",
|
||||
"itc_federal": "Federal Tax is ITC?",
|
||||
"itc_local": "Local Tax is ITC?",
|
||||
"itc_state": "State Tax is ITC?",
|
||||
"mappingname": "DMS Mapping Name",
|
||||
"srcco": "Source Company #/Dealer #"
|
||||
},
|
||||
@@ -381,7 +384,6 @@
|
||||
"responsibilitycenter_accountnumber": "Account Number",
|
||||
"responsibilitycenter_rate": "Rate",
|
||||
"responsibilitycenters": {
|
||||
"LA4": "LA4",
|
||||
"ap": "Accounts Payable",
|
||||
"ar": "Accounts Receivable",
|
||||
"ats": "ATS",
|
||||
@@ -389,6 +391,7 @@
|
||||
"la1": "LA1",
|
||||
"la2": "LA2",
|
||||
"la3": "LA3",
|
||||
"la4": "LA4",
|
||||
"lab": "Body",
|
||||
"lad": "Diagnostic",
|
||||
"lae": "Electrical",
|
||||
@@ -1082,6 +1085,7 @@
|
||||
"addpayer": "Add Payer",
|
||||
"createnewcustomer": "Create New Customer",
|
||||
"findmakemodelcode": "Find Make/Model Code",
|
||||
"getmakes": "",
|
||||
"post": "Post",
|
||||
"refetchmakesmodels": "Refetch Make and Model Codes",
|
||||
"usegeneric": "Use Generic Customer",
|
||||
|
||||
@@ -237,6 +237,9 @@
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"generic_customer_number": "",
|
||||
"itc_federal": "",
|
||||
"itc_local": "",
|
||||
"itc_state": "",
|
||||
"mappingname": "",
|
||||
"srcco": ""
|
||||
},
|
||||
@@ -381,7 +384,6 @@
|
||||
"responsibilitycenter_accountnumber": "",
|
||||
"responsibilitycenter_rate": "",
|
||||
"responsibilitycenters": {
|
||||
"LA4": "",
|
||||
"ap": "",
|
||||
"ar": "",
|
||||
"ats": "",
|
||||
@@ -389,6 +391,7 @@
|
||||
"la1": "",
|
||||
"la2": "",
|
||||
"la3": "",
|
||||
"la4": "",
|
||||
"lab": "",
|
||||
"lad": "",
|
||||
"lae": "",
|
||||
@@ -1082,6 +1085,7 @@
|
||||
"addpayer": "",
|
||||
"createnewcustomer": "",
|
||||
"findmakemodelcode": "",
|
||||
"getmakes": "",
|
||||
"post": "",
|
||||
"refetchmakesmodels": "",
|
||||
"usegeneric": "",
|
||||
|
||||
@@ -237,6 +237,9 @@
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"generic_customer_number": "",
|
||||
"itc_federal": "",
|
||||
"itc_local": "",
|
||||
"itc_state": "",
|
||||
"mappingname": "",
|
||||
"srcco": ""
|
||||
},
|
||||
@@ -381,7 +384,6 @@
|
||||
"responsibilitycenter_accountnumber": "",
|
||||
"responsibilitycenter_rate": "",
|
||||
"responsibilitycenters": {
|
||||
"LA4": "",
|
||||
"ap": "",
|
||||
"ar": "",
|
||||
"ats": "",
|
||||
@@ -389,6 +391,7 @@
|
||||
"la1": "",
|
||||
"la2": "",
|
||||
"la3": "",
|
||||
"la4": "",
|
||||
"lab": "",
|
||||
"lad": "",
|
||||
"lae": "",
|
||||
@@ -1082,6 +1085,7 @@
|
||||
"addpayer": "",
|
||||
"createnewcustomer": "",
|
||||
"findmakemodelcode": "",
|
||||
"getmakes": "",
|
||||
"post": "",
|
||||
"refetchmakesmodels": "",
|
||||
"usegeneric": "",
|
||||
|
||||
@@ -79,40 +79,78 @@ exports.default = async function (socket, jobid) {
|
||||
bill_val.billlines.map((line_val) => {
|
||||
if (!bill_acc[line_val.cost_center])
|
||||
bill_acc[line_val.cost_center] = Dinero();
|
||||
const lineDinero = Dinero({
|
||||
|
||||
let lineDinero = Dinero({
|
||||
amount: Math.round((line_val.actual_cost || 0) * 100),
|
||||
})
|
||||
.multiply(line_val.quantity)
|
||||
.multiply(bill_val.is_credit_memo ? -1 : 1);
|
||||
|
||||
bill_acc[line_val.cost_center] =
|
||||
bill_acc[line_val.cost_center].add(lineDinero);
|
||||
|
||||
//Add appropriate tax amounts.
|
||||
const {
|
||||
applicable_taxes: { local, state, federal },
|
||||
} = line_val;
|
||||
|
||||
if (local) {
|
||||
if (bodyshop.cdk_configuration.itc_local)
|
||||
taxAllocations.local.cost = taxAllocations.local.cost.add(
|
||||
lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||
);
|
||||
lineDinero = lineDinero.add(
|
||||
lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||
);
|
||||
}
|
||||
if (state) {
|
||||
if (bodyshop.cdk_configuration.itc_state)
|
||||
taxAllocations.state.cost = taxAllocations.state.cost.add(
|
||||
lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||
);
|
||||
lineDinero = lineDinero.add(
|
||||
lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||
);
|
||||
}
|
||||
if (federal) {
|
||||
//If it's an ITC, add it as a negative cost, otherwise add it to the item cost.
|
||||
if (bodyshop.cdk_configuration.itc_federal)
|
||||
taxAllocations.federal.cost = taxAllocations.federal.cost.add(
|
||||
lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
);
|
||||
|
||||
lineDinero = lineDinero.add(
|
||||
lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
);
|
||||
|
||||
// bill_acc[line_val.cost_center] = bill_acc[line_val.cost_center].add(
|
||||
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
// );
|
||||
}
|
||||
|
||||
bill_acc[line_val.cost_center] =
|
||||
bill_acc[line_val.cost_center].add(lineDinero);
|
||||
return null;
|
||||
});
|
||||
return bill_acc;
|
||||
}, {});
|
||||
|
||||
job.timetickets.forEach((ticket) => {
|
||||
//Get the total amount of the ticket.
|
||||
let TicketTotal = Dinero({
|
||||
amount: Math.round(
|
||||
ticket.rate *
|
||||
(ticket.employee && ticket.employee.flat_rate
|
||||
? ticket.productivehrs || 0
|
||||
: ticket.actualhrs || 0) *
|
||||
100
|
||||
),
|
||||
});
|
||||
//Add it to the right cost center.
|
||||
if (!costCenterHash[ticket.cost_center])
|
||||
costCenterHash[ticket.cost_center] = Dinero();
|
||||
|
||||
costCenterHash[ticket.cost_center] =
|
||||
costCenterHash[ticket.cost_center].add(TicketTotal);
|
||||
});
|
||||
|
||||
const jobAllocations = _.union(
|
||||
Object.keys(profitCenterHash),
|
||||
Object.keys(costCenterHash)
|
||||
|
||||
@@ -976,7 +976,7 @@ async function GenerateTransWips(socket) {
|
||||
const allocations = await CalcualteAllocations(socket, socket.JobData.id);
|
||||
const wips = [];
|
||||
allocations.forEach((alloc) => {
|
||||
//Add the sale item
|
||||
//Add the sale item from each allocation.
|
||||
if (alloc.sale.getAmount() > 0 && !alloc.tax) {
|
||||
const item = {
|
||||
acct: alloc.profitCenter.dms_acctnumber,
|
||||
@@ -993,6 +993,7 @@ async function GenerateTransWips(socket) {
|
||||
wips.push(item);
|
||||
}
|
||||
|
||||
//Add the cost Item.
|
||||
if (alloc.cost.getAmount() > 0 && !alloc.tax) {
|
||||
const item = {
|
||||
acct: alloc.costCenter.dms_acctnumber,
|
||||
@@ -1025,20 +1026,24 @@ async function GenerateTransWips(socket) {
|
||||
}
|
||||
|
||||
if (alloc.tax) {
|
||||
const item = {
|
||||
acct: alloc.costCenter.dms_acctnumber,
|
||||
cntl: socket.JobData.ro_number,
|
||||
cntl2: null,
|
||||
credtMemoNo: null,
|
||||
postAmt: alloc.cost.getAmount(),
|
||||
postDesc: null,
|
||||
prod: null,
|
||||
statCnt: 1,
|
||||
transID: socket.DMSTransHeader.transID,
|
||||
trgtCoID: socket.JobData.bodyshop.cdk_configuration.srcco,
|
||||
};
|
||||
// if (alloc.cost.getAmount() > 0) {
|
||||
// const item = {
|
||||
// acct: alloc.costCenter.dms_acctnumber,
|
||||
// cntl: socket.JobData.ro_number,
|
||||
// cntl2: null,
|
||||
// credtMemoNo: null,
|
||||
// postAmt: alloc.cost.getAmount(),
|
||||
// postDesc: null,
|
||||
// prod: null,
|
||||
// statCnt: 1,
|
||||
// transID: socket.DMSTransHeader.transID,
|
||||
// trgtCoID: socket.JobData.bodyshop.cdk_configuration.srcco,
|
||||
// };
|
||||
|
||||
wips.push(item);
|
||||
// wips.push(item);
|
||||
// }
|
||||
|
||||
if (alloc.sale.getAmount() > 0) {
|
||||
const item2 = {
|
||||
acct: alloc.profitCenter.dms_acctnumber,
|
||||
cntl: socket.JobData.ro_number,
|
||||
@@ -1053,6 +1058,7 @@ async function GenerateTransWips(socket) {
|
||||
};
|
||||
wips.push(item2);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
socket.txEnvelope.payers.forEach((payer) => {
|
||||
@@ -1076,7 +1082,11 @@ async function GenerateTransWips(socket) {
|
||||
|
||||
console.log(
|
||||
"WIPS TOTAL",
|
||||
wips.reduce((acc, val) => acc + val.postAmt, 0)
|
||||
wips.reduce((acc, val) => {
|
||||
console.log(val);
|
||||
console.log(acc + val.postAmt);
|
||||
return acc + val.postAmt;
|
||||
}, 0)
|
||||
);
|
||||
|
||||
return wips;
|
||||
|
||||
@@ -954,12 +954,12 @@ affected_rows
|
||||
|
||||
`;
|
||||
|
||||
exports.GET_CDK_ALLOCATIONS = `
|
||||
query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
|
||||
exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
bodyshop {
|
||||
id
|
||||
md_responsibility_centers
|
||||
cdk_configuration
|
||||
}
|
||||
ro_number
|
||||
invoice_allocation
|
||||
@@ -1016,7 +1016,17 @@ exports.GET_CDK_ALLOCATIONS = `
|
||||
actual_delivery
|
||||
scheduled_in
|
||||
actual_in
|
||||
bills {
|
||||
timetickets {
|
||||
id
|
||||
actualhrs
|
||||
cost_center
|
||||
productivehrs
|
||||
rate
|
||||
employee {
|
||||
flat_rate
|
||||
}
|
||||
}
|
||||
bills(where: {isinhouse: {_eq: false}}) {
|
||||
id
|
||||
federal_tax_rate
|
||||
local_tax_rate
|
||||
|
||||
@@ -50,7 +50,11 @@ io.on("connection", (socket) => {
|
||||
|
||||
socket.on("set-log-level", (level) => {
|
||||
socket.log_level = level;
|
||||
createLogEvent(socket, "DEBUG", `Updated log level to ${level}`);
|
||||
socket.emit("log-event", {
|
||||
timestamp: new Date(),
|
||||
level: "INFO",
|
||||
message: `Updated log level to ${level}`,
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("cdk-export-job", (jobid) => {
|
||||
|
||||
Reference in New Issue
Block a user