Changeset 452 for trunk/temp/product.php


Ignore:
Timestamp:
Oct 28, 2012, 10:20:32 AM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazování odkazů v aktualitách.
  • Upraveno: Tabulka Product rozdělena na Product a StockItem. Upravena struktura.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/temp/product.php

    r451 r452  
    1212  echo($DbRow['Name'].', ');
    1313 
    14   $System->Database->insert('Product', array('Name' => $DbRow['Name'], 'SellPrice' => $DbRow['Price'],
    15     'BuyPrice' => $DbRow['Price'],
     14  $System->Database->insert('Product', array('Name' => $DbRow['Name'],
     15    'SellPrice' => $DbRow['Price'], 'BuyPrice' => $DbRow['Price'],
    1616    'Consumption' => $DbRow['Consumption'], 'UnitOfMeasure' => 1, 'VAT' => 20));
    1717  $ProductId = $System->Database->insert_id;
     18  if($DbRow['Used'] == 1) $Elimination = 'NULL';
     19    else $Elimination = $DbRow['TimeElimination'];
    1820  $Database->insert('StockItem', array('Stock' => 1, 'Product' => $ProductId, 'Amount' => $DbRow['Count'],
    19     'Segment' => $DbRow['Segment'], 'TimeEnlistment' => $DbRow['Date'], 'SerialNumber' => $DbRow['DeviceId'],
     21    'Segment' => $DbRow['Segment'], 'TimeEnlistment' => $DbRow['Date'], 'TimeElimination' => $Elimination,
     22    'SerialNumber' => $DbRow['DeviceId'], 'BuyPrice' => $DbRow['Price'], 'SellPrice' => $DbRow['Price'],
    2023    'Location' => $DbRow['User'], 'Info' => $DbRow['Info']));
    2124}
Note: See TracChangeset for help on using the changeset viewer.