diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index fc7b463a..d34f53fd 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -1985,9 +1985,12 @@ public function filterSalesPDList_post() { $rand_name = $value['img_name'] == 'satellite' ? "satellite.png" : $value['img_name']."_".$randomString.".png"; $section_fields['data']['section9'][$k]['img_name'] = $value['img_name']; $section_fields['data']['section9'][$k]['img'] = $rand_name; - - $CET_response = cet_salespd::repushwithcetphotographapi($section_fields); + $photograph_data[$k]['rand_name'] = $rand_name;$k++; + } + $CET_response = cet_salespd::repushwithcetphotographapi($section_fields); + foreach ($photograph_data as $key => $value){ if(isset($CET_response->status) && $CET_response->status == 200){ + $rand_name = $value['rand_name']; $source=$value['img_name'] == 'satellite' ? 'data:image/png;base64,'.$value['img'] : $value['img']; //Google Library - GCP $gcpBucketName = GCP_BUCKET_NAME;