SMC status for vendor : ps

This commit is contained in:
VE10-Sanjeev 2023-06-28 18:14:21 +05:30
parent 93ef5ca7fe
commit 996daa9285

View File

@ -1063,12 +1063,12 @@ class PD_Controller extends REST_Controller
}
# status cancelled means pd_agency_id set to null if smc vendor officer and manager role only
if (isset($pd_details['pd_status']) && ($pd_details['pd_status'] == "CANCELLED") && ($role == 28 || $role == 29)) {
if (isset($pd_details['pd_status']) && $pd_details['pd_status'] == ALLOCATED_TO_FIA && ($pd_details['vendor_status'] == "CANCELLED") && ($role == 28 || $role == 29)) {
$pd_details['pd_agency_id'] = null;
}
# status rejected/bounced means fk_pd_allocated_to set to null if smc vendor officer and manager role only
if (isset($pd_details['pd_status']) && ($pd_details['pd_status'] == "BOUNCED") && ($role == 28 || $role == 29)) {
if (isset($pd_details['pd_status']) && $pd_details['pd_status'] == ALLOCATED_TO_FIA && ($pd_details['vendor_status'] == "BOUNCED") && ($role == 28 || $role == 29)) {
$pd_details['fk_pd_allocated_to'] = null;
}
@ -9917,7 +9917,13 @@ class PD_Controller extends REST_Controller
// {
// $fields_to_update['start_location'] = $records['link'];
// }
# status cancelled means pd_agency_id set to null if smc vendor officer and manager role only
if (isset($records['vendor_status']) && ($records['vendor_status'] == CANCELLED)) {
$fields_to_update['pd_agency_id'] = null;
}
# status rejected/bounced means fk_pd_allocated_to set to null.
if (isset($records['vendor_status']) && ($records['vendor_status'] == BOUNCED)) {
$fields_to_update['fk_pd_allocated_to'] = null;
unset($records['bounce_reason']);
unset($records['bounce_reason_others']);
}