[Weberp-svn] SF.net SVN: weberp:[4644] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-03-02 11:07:33
|
Revision: 4644 http://weberp.svn.sourceforge.net/weberp/?rev=4644&view=rev Author: tim_schofield Date: 2011-03-02 11:07:27 +0000 (Wed, 02 Mar 2011) Log Message: ----------- New database fields for conversion factor and unit of measure in the sales order details table Modified Paths: -------------- trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/66.php Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-03-02 10:32:15 UTC (rev 4643) +++ trunk/includes/session.inc 2011-03-02 11:07:27 UTC (rev 4644) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=65; +$DBVersion=66; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/66.php =================================================================== --- trunk/sql/mysql/updates/66.php (rev 0) +++ trunk/sql/mysql/updates/66.php 2011-03-02 11:07:27 UTC (rev 4644) @@ -0,0 +1,17 @@ +<?php + +/* Add extra field into prices table for unit of measure + */ + +AddColumn('units', 'salesorderdetails', 'varchar(20)', 'NOT NULL', 'each', 'unitprice', $db); +AddColumn('conversionfactor', 'salesorderdetails', 'double', 'NOT NULL', '1', 'units', $db); + +$sql="UPDATE salesorderdetails SET conversionfactor=1"; +$result=DB_query($sql, $db); + +$sql="UPDATE salesorderdetails SET units=(SELECT units FROM stockmaster WHERE salesorderdetails.stkcode=stockmaster.stockid)"; +$result=DB_query($sql, $db); + +UpdateDBNo(66, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |