@@ -0,0 +1,3 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- CREATE INDEX idx_associations_active_true ON associations(active) WHERE active = true;
|
||||
1
hasura/migrations/1682703406197_run_sql_migration/up.sql
Normal file
1
hasura/migrations/1682703406197_run_sql_migration/up.sql
Normal file
@@ -0,0 +1 @@
|
||||
CREATE INDEX idx_associations_active_true ON associations(active) WHERE active = true;
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_associations_shopid_user";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_associations_shopid_user" on
|
||||
"public"."associations" using btree ("shopid", "useremail", "active");
|
||||
@@ -164,7 +164,7 @@ async function PbsCalculateAllocationsAp(socket, billids) {
|
||||
|
||||
let APAmount = Dinero();
|
||||
Object.keys(billHash).map((key) => {
|
||||
if (billHash[key].Amount.getAmount() > 0) {
|
||||
if (billHash[key].Amount.getAmount() > 0 || billHash[key].Amount.getAmount() < 0) {
|
||||
transactionObject.Posting.Lines.push({
|
||||
...billHash[key],
|
||||
Amount: billHash[key].Amount.toFormat("0.00"),
|
||||
|
||||
@@ -772,7 +772,7 @@ const CreateCosts = (job) => {
|
||||
billTotalsByCostCenters[
|
||||
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
||||
] = Dinero({
|
||||
amount: (job.mixdata[0] && job.mixdata[0].totalliquidcost * 100) || 0,
|
||||
amount: Math.round((job.mixdata[0] && job.mixdata[0].totalliquidcost || 0) * 100)
|
||||
});
|
||||
} else {
|
||||
billTotalsByCostCenters[
|
||||
@@ -799,7 +799,7 @@ const CreateCosts = (job) => {
|
||||
(job.bodyshop.jc_hourly_rates &&
|
||||
job.bodyshop.jc_hourly_rates.mapa * 100) ||
|
||||
0,
|
||||
}).multiply(materialsHours.mapaHrs)
|
||||
}).multiply(job.job_totals.rates.mapa.hours)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ exports.sendServerEmail = async function ({ subject, text }) {
|
||||
transporter.sendMail(
|
||||
{
|
||||
from: `ImEX Online API - ${process.env.NODE_ENV} <noreply@imex.online>`,
|
||||
to: ["patrick@imexsystems.ca"],
|
||||
to: ["patrick@imexsystems.ca", "support@thinkimex.com"],
|
||||
subject: subject,
|
||||
text: text,
|
||||
ses: {
|
||||
|
||||
@@ -626,7 +626,7 @@ function GenerateCostingData(job) {
|
||||
billTotalsByCostCenters.additionalCosts[
|
||||
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
||||
] = Dinero({
|
||||
amount: (job.mixdata[0] && job.mixdata[0].totalliquidcost * 100) || 0,
|
||||
amount: Math.round((job.mixdata[0] && job.mixdata[0].totalliquidcost || 0) * 100)
|
||||
});
|
||||
} else {
|
||||
billTotalsByCostCenters.additionalCosts[
|
||||
|
||||
Reference in New Issue
Block a user