Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function postDet($idx,$id)
- {
- $dats = $this->ino_logistic_instruction->getDetLI($idx,$id);
- $data = $this->ino_logistic_instruction->GetAll(['_id' => $id,'id_transfer' => $idx]);
- $transporter = $this->ino_contractor->GetAll(['_id' => $dats['issued_to']]);
- if(count($transporter) > 0){
- foreach($transporter as $idx => $contr){
- $data[$idx]['contractor'] = $contr['name'];
- }
- }
- $bill = $this->ino_logistic_instruction->getBillName($dats['issued_invoice_to']);
- if(count($bill) > 0){
- foreach($bill as $idx => $item){
- $data[$idx]['billing'] = $item['name'];
- }
- }
- $customer = $this->ino_client->GetAll(['_id' => $dats['customer']]);
- if(count($customer) > 0){
- foreach($customer as $idx => $cust){
- $data[$idx]['customer_name'] = $cust['name'];
- }
- }
- $from_yard = $this->ino_yard->GetAll(['_id' => $dats['from']]);
- if(count($from_yard) > 0){
- foreach($from_yard as $idx => $froms_y){
- $data[$idx]['from_name'] = $froms_y['name'];
- }
- }
- $to_yard = $this->ino_yard->GetAll(['_id' => $dats['to']]);
- if(count($to_yard) > 0){
- foreach($to_yard as $idx => $tos_y){
- $data[$idx]['to_name'] = $tos_y['name'];
- }
- }
- $from_port = $this->ino_port->GetAll(['_id' => $dats['from']]);
- if(count($from_port) > 0){
- foreach($from_port as $idx => $froms_p){
- $data[$idx]['from_name'] = $froms_p['name'];
- }
- }
- $to_port = $this->ino_port->GetAll(['_id' => $dats['to']]);
- if(count($to_port) > 0){
- foreach($to_port as $idx => $tos_p){
- $data[$idx]['to_name'] = $tos_p['name'];
- }
- }
- $this->setJson($data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement