$stock_movement = $stock_movement - $h['stock_add'] + $h['stock_reduce'];
             $bit = array();
             $bit['sort'] = $euh_count;
             $bit['date_add'] = date('d.m.Y', strtotime($h['transaction_date']));
             $bit['qty add'] = $h['stock_add'];
             $bit['qty reduce'] = $h['stock_reduce'];
             $bit['source'] = strval($stock_movement);
             $elup_table[] = $bit;
         }
         $article_stock .= tep_draw_table('spo sticky-tablehead', $elup_table);
     } else {
         $article_stock .= '<strong class="red">No update found</strong >';
     }
     $article_stock .= '</div>';
 } else {
     $euh_asc = $class_pm->stockRetrieveHistory($whid, $pid, $aid, $start_date);
     if (count($euh_asc) > 0) {
         $euh = array_reverse($euh_asc);
         //reverse asc sort
         $elup_table = array();
         $bit = array();
         $bit['sort'] = 'No';
         $bit['date_add'] = 'Date';
         $bit['qty'] = 'Transaction';
         $bit['name'] = 'Info';
         $bit['source'] = 'On Stock in DB<br />Before Transaction';
         $elup_table[] = $bit;
         $euh_count = 0;
         $stock_movement = $cs;
         foreach ($euh as $h) {
             $euh_count++;
예제 #2
0
             //        $st[$stk] = '<strong class="red">'.$stv.'</strong>';
             //    }
             //}
             $sourcing_table[] = $st;
         }
         $sourcing_info .= tep_draw_table('spo', $sourcing_table);
     } else {
         $sourcing_info .= '<strong class="red">No Elements Information found</strong>';
     }
     $sourcing_info .= '</div>';
 } else {
     $sourcing_info = '';
 }
 $status_show_bin_history = array('5', '6', '7', '8', '12');
 if (isset($itrans) && $itrans['stock_status'] == 'D' || in_array($do['status'], $status_show_bin_history)) {
     $bih = $class_pm->stockRetrieveHistory($whid_fg_hh, $do['products_id'], $do['articles_id'], $bih_start_date, $bih_end_date);
     $bih_start = date('d.m.Y', strtotime($bih_start_date));
     $bih_end = date('d.m.Y', is_null($bih_end_date) ? time() : strtotime($bih_end_date));
     $binin_history = '<div style="margin-top:20px;">';
     $binin_history .= '<h3>Bin In History (' . $bih_start . '-' . $bih_end . ')</h3>';
     if (count($bih) > 0) {
         $binin_table = array();
         $bit = array();
         $bit['sort'] = 'No';
         $bit['date_add'] = 'Date';
         $bit['qty'] = 'Transaction';
         $bit['desc'] = 'Info';
         $binin_table[] = $bit;
         $bih_count = 0;
         foreach ($bih as $h) {
             $bih_count++;