From eca5bd21aede0280c8d34e31648fe5966dceefb1 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 31 Mar 2021 11:35:08 -0700 Subject: [PATCH] IO-829 Resolve Parts Order Calculations issues. --- client/.env.development2 | 13 +++++++++++++ .../job-bills-total/job-bills-total.component.jsx | 12 ++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 client/.env.development2 diff --git a/client/.env.development2 b/client/.env.development2 new file mode 100644 index 000000000..96ee2121d --- /dev/null +++ b/client/.env.development2 @@ -0,0 +1,13 @@ +FAST_REFRESH=false +REACT_APP_GRAPHQL_ENDPOINT=https://bodyshop-dev-db.herokuapp.com/v1/graphql +REACT_APP_GRAPHQL_ENDPOINT_WS=wss://bodyshop-dev-db.herokuapp.com/v1/graphql +REACT_APP_GA_CODE=231099835 +REACT_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc","authDomain":"imex-dev.firebaseapp.com","databaseURL":"https://imex-dev.firebaseio.com","projectId":"imex-dev","storageBucket":"imex-dev.appspot.com","messagingSenderId":"759548147434","appId":"1:759548147434:web:e8239868a48ceb36700993","measurementId":"G-K5XRBVVB4S"} +REACT_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop +REACT_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop +REACT_APP_CLOUDINARY_API_KEY=473322739956866 +REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,f_auto,h_250,w_250 +REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4' +REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g +REACT_APP_AXIOS_BASE_API_URL=https://api.imex.online/ +REACT_APP_REPORTS_SERVER_URL=https://reports.bodyshop.app \ No newline at end of file diff --git a/client/src/components/job-bills-total/job-bills-total.component.jsx b/client/src/components/job-bills-total/job-bills-total.component.jsx index ad659b9f6..3fd5e8c12 100644 --- a/client/src/components/job-bills-total/job-bills-total.component.jsx +++ b/client/src/components/job-bills-total/job-bills-total.component.jsx @@ -32,7 +32,7 @@ export default function JobBillsTotalComponent({ if (p.return) { totalReturns = totalReturns.add( Dinero({ - amount: Math.round((pol.cost || 0) * 100), + amount: Math.round((pol.act_price || 0) * 100), }).multiply(pol.quantity) ); } @@ -74,7 +74,7 @@ export default function JobBillsTotalComponent({ const discrepWithLbrAdj = discrepancy.add(lbrAdjustments); const discrepWithCms = discrepWithLbrAdj.subtract(billCms); - const creditsNotReceived = totalReturns.subtract(billCms); + const creditsNotReceived = totalReturns.add(billCms); //billCms is tracked as a negative number. return ( @@ -89,7 +89,7 @@ export default function JobBillsTotalComponent({ @@ -100,7 +100,7 @@ export default function JobBillsTotalComponent({ @@ -111,7 +111,7 @@ export default function JobBillsTotalComponent({ @@ -126,7 +126,7 @@ export default function JobBillsTotalComponent({