From f88999067e33bc170eced688dba35ed0de732f4d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 26 Aug 2013 20:31:02 +0000 Subject: [PATCH] correct stock --- include/ajax_view_mod_stock.php | 2 +- include/class_stock_goods.php | 2 +- include/stock_histo.inc.php | 2 +- include/stock_inv.inc.php | 4 ++-- include/stock_state.inc.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ajax_view_mod_stock.php b/include/ajax_view_mod_stock.php index 7e1ddf75d..5c4ba9630 100644 --- a/include/ajax_view_mod_stock.php +++ b/include/ajax_view_mod_stock.php @@ -28,7 +28,7 @@ */ require_once 'class_stock_goods.php'; -$st=new Stock_Goods(); +$st=new Stock_Goods($cn); $array=$cn->get_array("select * from stock_goods where c_id=$1",array($_GET['c_id'])); echo HtmlInput::title_box("Détail changement",$_GET['ctl']); $p_array=array(); diff --git a/include/class_stock_goods.php b/include/class_stock_goods.php index 7cb914216..a5cd788e2 100644 --- a/include/class_stock_goods.php +++ b/include/class_stock_goods.php @@ -101,7 +101,7 @@ class Stock_Goods extends Stock_Goods_Sql require_once 'template/stock_inv.php'; } - function save($p_array) + function record_save($p_array) { global $cn; try diff --git a/include/stock_histo.inc.php b/include/stock_histo.inc.php index f1980fdd6..1505def0b 100644 --- a/include/stock_histo.inc.php +++ b/include/stock_histo.inc.php @@ -30,7 +30,7 @@ global $g_user,$cn,$g_parameter; require_once 'class_stock.php'; require_once 'class_periode.php'; -$stock=new Stock(); +$stock=new Stock($cn); $array=$_GET; if ( ! isset ($array['wdate_start']) || ! isset ($array['wdate_end'])) { diff --git a/include/stock_inv.inc.php b/include/stock_inv.inc.php index 023ebf00f..bb140328f 100644 --- a/include/stock_inv.inc.php +++ b/include/stock_inv.inc.php @@ -29,12 +29,12 @@ require_once 'class_stock_goods.php'; global $cn; -$inv=new Stock_Goods(); +$inv=new Stock_Goods($cn); if ( isset ($_POST['save'])) { try { - $inv->save($_POST); + $inv->record_save($_POST); echo h2info("Opération sauvée"); $inv->input($_POST,true); diff --git a/include/stock_state.inc.php b/include/stock_state.inc.php index 428588b87..8dc8de6f9 100644 --- a/include/stock_state.inc.php +++ b/include/stock_state.inc.php @@ -44,7 +44,7 @@ $presentation->value=array ( $presentation->selected=(isset($_GET['present']))?$_GET['present']:"T"; require_once 'template/stock_state_search.php'; -$stock=new Stock(); +$stock=new Stock($cn); $stock->summary($_GET);