Changeset 456 for trunk/temp/product.php
- Timestamp:
- Oct 31, 2012, 4:52:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/temp/product.php
r453 r456 16 16 'Consumption' => $DbRow['Consumption'], 'UnitOfMeasure' => 1, 'VAT' => 20)); 17 17 $ProductId = $System->Database->insert_id; 18 if($DbRow['Used'] == 0) $Elimination = 'NULL'; 19 else $Elimination = $DbRow['TimeElimination']; 18 //print_r($DbRow); 19 switch($DbRow['Used']) 20 { 21 case 0: $Elimination = '0000-00-00'; break; 22 case 1: $Elimination = NULL; break; 23 case 2: $Elimination = NULL; break; 24 } 25 26 // else $Elimination = $DbRow['TimeElimination']; 27 if($DbRow['Used'] == 2) $DbRow['User'] = NULL; 28 echo($DbRow['Used'].'"'.$Elimination.'"<br/>'); 29 // print_r(array('Stock' => 1, 'Product' => $ProductId, 'Amount' => $DbRow['Count'], 30 // 'Segment' => $DbRow['Segment'], 'TimeEnlistment' => $DbRow['Date'], 'TimeElimination' => $Elimination, 31 // 'SerialNumber' => $DbRow['DeviceId'], 'BuyPrice' => $DbRow['Price'], 'SellPrice' => $DbRow['Price'], 32 // 'Location' => $DbRow['User'], 'Info' => $DbRow['Info'])); 20 33 $Database->insert('StockItem', array('Stock' => 1, 'Product' => $ProductId, 'Amount' => $DbRow['Count'], 21 34 'Segment' => $DbRow['Segment'], 'TimeEnlistment' => $DbRow['Date'], 'TimeElimination' => $Elimination,
Note:
See TracChangeset
for help on using the changeset viewer.