Ejemplo n.º 1
0
 function copy($id, $newSku)
 {
     global $db;
     if (parent::copy($id, $newSku)) {
         $result = $db->Execute("select * from " . TABLE_INVENTORY_MS_LIST . " where sku = '" . $this->old_sku . "'");
         $data_array = array('sku' => $this->sku, 'attr_0' => $result->fields['attr_0'], 'attr_name_0' => $result->fields['attr_name_0'], 'attr_1' => $result->fields['attr_1'], 'attr_name_1' => $result->fields['attr_name_1']);
         db_perform(TABLE_INVENTORY_MS_LIST, $data_array, 'insert');
         $this->get_ms_list();
         return true;
     } else {
         return false;
     }
 }
Ejemplo n.º 2
0
 function copy($id, $newSku)
 {
     global $db;
     if (parent::copy($id, $newSku)) {
         $result = $db->Execute("select * from " . TABLE_INVENTORY_ASSY_LIST . " where ref_id = '{$id}'");
         while (!$result->EOF) {
             $bom_list = array('ref_id' => $this->id, 'sku' => $result->fields['sku'], 'description' => $result->fields['description'], 'qty' => $result->fields['qty']);
             db_perform(TABLE_INVENTORY_ASSY_LIST, $bom_list, 'insert');
             $result->MoveNext();
         }
         $this->get_bom_list();
         return true;
     } else {
         return false;
     }
 }