"jub" => {"acqcr" => {"type" => "left"}}
},
"where" =>{
- "+jub" => {"id" => $po_id},
+ "+jub" => {"purchase_order" => $po_id},
"-or" => [
- {"+jub" => {"state" => "received"}},
+ {"+jub" => {"state" => {"!=" => "received"}}},
{"+acqcr" => {"keep_debits" =>"t"}}
]
}
}
}
}
-
+
update_lineitem($mgr, $li) or return 0;
$result->{"li"} = {
$li_id => {
"cancel_reason" => $cancel_reason
}
};
+
+ # check to see if this cancelation should result in
+ # marking the purchase order "received"
+ my $po;
+ return 0 unless check_purchase_order_received($mgr, $li->purchase_order->id);
+
return $result;
}