Merged in feature/IO-3496-STOR-Job-Total-USA (pull request #2790)
IO-3496 Phase 1 for Job-Total-USA Fix Approved-by: Dave Richer
This commit is contained in:
@@ -381,7 +381,12 @@ async function CalculateRatesTotals({ job, client }) {
|
||||
|
||||
if (item.mod_lbr_ty) {
|
||||
//Check to see if it has 0 hours and a price instead.
|
||||
if (item.lbr_op === "OP14" && item.act_price > 0 && (!item.part_type || item.mod_lb_hrs === 0) && !IsAdditionalCost(item)) {
|
||||
if (
|
||||
item.lbr_op === "OP14" &&
|
||||
item.act_price > 0 &&
|
||||
(!item.part_type || item.mod_lb_hrs === 0) &&
|
||||
!IsAdditionalCost(item)
|
||||
) {
|
||||
//Scenario where SGI may pay out hours using a part price.
|
||||
if (!ret[item.mod_lbr_ty.toLowerCase()].total) {
|
||||
ret[item.mod_lbr_ty.toLowerCase()].base = Dinero();
|
||||
@@ -943,9 +948,10 @@ function CalculateTaxesTotals(job, otherTotals) {
|
||||
amount: Math.round(stlTowing.t_amt * 100)
|
||||
})
|
||||
);
|
||||
|
||||
if (stlStorage)
|
||||
taxableAmounts.TOW = taxableAmounts.TOW.add(
|
||||
(taxableAmounts.TOW = Dinero({
|
||||
taxableAmounts.STOR = taxableAmounts.STOR.add(
|
||||
(taxableAmounts.STOR = Dinero({
|
||||
amount: Math.round(stlStorage.t_amt * 100)
|
||||
}))
|
||||
);
|
||||
@@ -988,7 +994,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
||||
const pfo = job.cieca_pfo;
|
||||
Object.keys(taxableAmounts).map((key) => {
|
||||
try {
|
||||
if (key.startsWith("PA")) {
|
||||
if (key.startsWith("PA") && key !== "PAE") {
|
||||
const typeOfPart = key; // === "PAM" ? "PAC" : key;
|
||||
//At least one of these scenarios must be taxable.
|
||||
for (let tyCounter = 1; tyCounter <= 5; tyCounter++) {
|
||||
|
||||
Reference in New Issue
Block a user