|
From: <dai...@us...> - 2014-05-17 02:53:58
|
Revision: 6713
http://sourceforge.net/p/web-erp/reponame/6713
Author: daintree
Date: 2014-05-17 02:53:54 +0000 (Sat, 17 May 2014)
Log Message:
-----------
remove db from GetPrice calls
Modified Paths:
--------------
trunk/SelectCreditItems.php
trunk/StockDispatch.php
trunk/api/api_php.php
trunk/includes/GetPrice.inc
trunk/includes/SelectOrderItems_IntoCart.inc
Modified: trunk/SelectCreditItems.php
===================================================================
--- trunk/SelectCreditItems.php 2014-05-16 23:00:34 UTC (rev 6712)
+++ trunk/SelectCreditItems.php 2014-05-17 02:53:54 UTC (rev 6713)
@@ -478,7 +478,7 @@
$myrow['longdescription'],
GetPrice ($_POST['NewItem'],
$_SESSION['CreditItems'.$identifier]->DebtorNo,
- $_SESSION['CreditItems'.$identifier]->Branch, $db),
+ $_SESSION['CreditItems'.$identifier]->Branch),
0,
$myrow['units'],
$myrow['volume'],
@@ -646,8 +646,7 @@
$myrow['longdescription'],
GetPrice($_POST['NewItem'],
$_SESSION['CreditItems'.$identifier]->DebtorNo,
- $_SESSION['CreditItems'.$identifier]->Branch,
- $db),
+ $_SESSION['CreditItems'.$identifier]->Branch),
0,
$myrow['units'],
$myrow['volume'],
Modified: trunk/StockDispatch.php
===================================================================
--- trunk/StockDispatch.php 2014-05-16 23:00:34 UTC (rev 6712)
+++ trunk/StockDispatch.php 2014-05-17 02:53:54 UTC (rev 6713)
@@ -233,7 +233,7 @@
$pdf->addTextWrap(510,$YPos,40,$FontSize,'_________','right',0,$fill);
if($template=='fullprices'){
// looking for price info
- $DefaultPrice = GetPrice($myrow['stockid'],$ToCustomer, $ToBranch, $db,$ShipQty, false);
+ $DefaultPrice = GetPrice($myrow['stockid'],$ToCustomer, $ToBranch, $ShipQty, false);
if ($myrow['discountcategory'] != "")
{
$DiscountLine = ' -> ' . _('Discount Category') . ':' . $myrow['discountcategory'];
Modified: trunk/api/api_php.php
===================================================================
--- trunk/api/api_php.php 2014-05-16 23:00:34 UTC (rev 6712)
+++ trunk/api/api_php.php 2014-05-17 02:53:54 UTC (rev 6713)
@@ -15,7 +15,6 @@
/* Required for creating invoices/credits */
include($PathPrefix . 'includes/GetSalesTransGLCodes.inc');
include($PathPrefix . 'includes/Z_POSDataCreation.php');
- include($PathPrefix . 'includes/GetPrice.inc');
/* Get weberp authentication, and return a valid database
connection */
Modified: trunk/includes/GetPrice.inc
===================================================================
--- trunk/includes/GetPrice.inc 2014-05-16 23:00:34 UTC (rev 6712)
+++ trunk/includes/GetPrice.inc 2014-05-17 02:53:54 UTC (rev 6713)
@@ -1,7 +1,7 @@
<?php
/* $Id$*/
-function GetPrice ($StockID, $DebtorNo, $BranchCode, $db, $OrderLineQty,$ReportZeroPrice=1){
-
+function GetPrice ($StockID, $DebtorNo, $BranchCode, $OrderLineQty=1,$ReportZeroPrice=1){
+ global $db;
$Price = 0;
/*Search by branch and customer for a date specified price */
Modified: trunk/includes/SelectOrderItems_IntoCart.inc
===================================================================
--- trunk/includes/SelectOrderItems_IntoCart.inc 2014-05-16 23:00:34 UTC (rev 6712)
+++ trunk/includes/SelectOrderItems_IntoCart.inc 2014-05-17 02:53:54 UTC (rev 6713)
@@ -109,7 +109,7 @@
$Discount = 0;
}
- $Price = GetPrice($NewItem, $_SESSION['Items'.$identifier]->DebtorNo,$_SESSION['Items'.$identifier]->Branch, $db,$NewItemQty);
+ $Price = GetPrice($NewItem, $_SESSION['Items'.$identifier]->DebtorNo,$_SESSION['Items'.$identifier]->Branch, $NewItemQty);
/* Need to check for sell through support deals */
|