Revert all package upgrades to unblock testing.

This commit is contained in:
Patrick Fic
2023-01-25 11:20:51 -08:00
parent d8cc25a54f
commit 66a80e439f
131 changed files with 18482 additions and 10892 deletions

View File

@@ -623,8 +623,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
.add(Dinero(job.job_totals.rates.lau.total))
.subtract(detailAdjustments.amount)
.toFormat(AHDineroFormat),
LaborMiscTotalCost:
repairCosts.LaborMiscTotalCost.toFormat(AHDineroFormat),
LaborMiscTotalCost: 0,
MiscellaneousChargeTotal: 0,
MiscellaneousChargeTotalCost: 0,
PMTotal: Dinero(job.job_totals.rates.mapa.total).toFormat(

View File

@@ -9,40 +9,39 @@ require("dotenv").config({
`.env.${process.env.NODE_ENV || "development"}`
),
});
//const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
exports.payment = async (req, res) => {
res.sendStatus(404);
// const { amount, stripe_acct_id } = req.body;
const { amount, stripe_acct_id } = req.body;
// try {
// await stripe.paymentIntents
// .create(
// {
// payment_method_types: ["card"],
// amount: amount,
// currency: "cad",
// application_fee_amount: 50,
// },
// {
// stripeAccount: stripe_acct_id,
// }
// )
// .then(function (paymentIntent) {
// try {
// return res.send({
// clientSecret: paymentIntent.client_secret,
// });
// } catch (err) {
// return res.status(500).send({
// error: err.message,
// });
// }
// });
// } catch (error) {
// console.log("error", error);
// res.status(400).send(error);
// }
try {
await stripe.paymentIntents
.create(
{
payment_method_types: ["card"],
amount: amount,
currency: "cad",
application_fee_amount: 50,
},
{
stripeAccount: stripe_acct_id,
}
)
.then(function (paymentIntent) {
try {
return res.send({
clientSecret: paymentIntent.client_secret,
});
} catch (err) {
return res.status(500).send({
error: err.message,
});
}
});
} catch (error) {
console.log("error", error);
res.status(400).send(error);
}
};
exports.mobile_payment = async (req, res) => {