noalyss Version-9
|
Manage the goods. More...
Public Member Functions | |
input ($p_array=null, $p_readonly=false) | |
if an array if receive the keys are p_date p_depot f_idX f_id sg_codeX sg_type0 More... | |
record_save ($p_array) | |
take_last_inventory ($p_array) | |
Return an array, used by Stock_Goods::input. More... | |
Public Member Functions inherited from Stock_Goods_Sql | |
__construct ($cn, $p_id=-1) | |
Public Member Functions inherited from Table_Data_SQL | |
__construct ($p_cn, $p_id=-1) | |
build_query () | |
Build the SQL select statement for querying the object and returns it. More... | |
column_update ($column_expr, $value) | |
update the value of a column with an expression for $value for the current record More... | |
count ($p_where="", $p_array=null) | |
return the number of count in the table corresponding to the where condition More... | |
delete () | |
exist () | |
Count the number of record with the id ,. More... | |
get_all_to_array ($p_key_col, $p_cond="", $p_array=NULL) | |
Get all the row and use the p_key_code are the key value of array. More... | |
insert () | |
load () | |
Load the current row return false if not found. More... | |
seek ($cond='', $p_array=null) | |
retrieve array of object thanks a condition More... | |
update () | |
Public Member Functions inherited from Data_SQL | |
__construct (DatabaseCore $p_cn, $p_id=-1) | |
__toString () | |
collect_objects ($cond='', $p_array=null) | |
return an array of objects. More... | |
count ($p_where="", $p_array=null) | |
delete () | |
exist () | |
Count the number of record with the id ,. More... | |
from_array ($p_array) | |
Transform an array into object. More... | |
get ($p_string) | |
get the value thanks the colum name and not the alias (name). More... | |
get_cn () | |
get_info () | |
get_name () | |
get_object ($p_ret, $idx) | |
get_pk_value () | |
get_primary_key () | |
get_type () | |
getp ($p_string) | |
set the value thanks the alias name instead of the colum name More... | |
insert () | |
load () | |
Load the current row return false if not found. More... | |
next ($ret, $i) | |
get_seek return the next object, the return of the query must have all the column of the object More... | |
save () | |
Insert or update : if the row already exists, update otherwise insert. More... | |
seek ($cond='', $p_array=null) | |
retrieve array of object thanks a condition More... | |
set ($p_string, $p_value) | |
set the value thanks the colum name and not the alias (name) More... | |
set_cn ($cn) | |
set_name ($name) | |
set_pk_value ($p_value) | |
set_primary_key ($primary_key) | |
set_type ($type) | |
setp ($p_string, $p_value) | |
set the value thanks the alias name instead of the colum name More... | |
to_array ($prefix="") | |
Turn an object (row) into an array, and the key could be prefixed with $prefix. More... | |
to_row ($p_array) | |
turns a row fetched from the DB into a SQL object in updating all his attribute More... | |
update () | |
verify () | |
Static Public Member Functions | |
static | insert_goods (&$p_cn, $p_array) |
Insert into stock_goods from ACH and VEN. More... | |
Additional Inherited Members | |
Data Fields inherited from Data_SQL | |
$cn | |
$date_format | |
Type of the data. More... | |
$default | |
defaullt date format More... | |
$name | |
Database connection. More... | |
$primary_key | |
Array of logical and real name. More... | |
$table | |
$type | |
Column name of the primary key. More... | |
Manage the goods.
Definition at line 36 of file stock_goods.class.php.
Stock_Goods::input | ( | $p_array = null , |
|
$p_readonly = false |
|||
) |
if an array if receive the keys are p_date p_depot f_idX f_id sg_codeX sg_type0
$p_array | if an array if receive the keys are p_date p_depot f_idX f_id sg_codeX sg_type0 |
$p_readonly | true or false |
Definition at line 56 of file stock_goods.class.php.
References Data_SQL\$cn, $date, $e, $fiche, $label, $nb, $p_array, $p_date, $p_readonly, $row, cn, echo_warning(), extra, MAX_ARTICLE_STOCK, HtmlInput\select_stock(), and value.
|
static |
Insert into stock_goods from ACH and VEN.
type | $p_array | KEY : db => database conx, j_id => jrnx.j_id,goods=> f_id of the goods 'quant' => quantity ,'dir'=> d or c (c for sales OUT and d for purchase IN),'repo'=>r_id of the repository (stock_repository.r_id |
Definition at line 186 of file stock_goods.class.php.
References $code, $exercice, $g_user, $p_array, $repo, $Res, ATTR_DEF_STOCK, and NOTFOUND.
Referenced by Acc_Ledger_Purchase\insert(), and Acc_Ledger_Sale\insert().
Stock_Goods::record_save | ( | $p_array | ) |
Definition at line 123 of file stock_goods.class.php.
References $a, Data_SQL\$cn, $count, $exercice, $fiche, $i, $nb, $p_array, $per, $periode, $stock, ATTR_DEF_STOCK, h, isDate(), and record_log().
Stock_Goods::take_last_inventory | ( | $p_array | ) |
Return an array, used by Stock_Goods::input.
type | $p_array |
Exception |
Definition at line 228 of file stock_goods.class.php.
References $array, Data_SQL\$cn, $e, $first_day, $p_array, $periode, $result, $stock, $year, Table_Data_SQL\count(), and HtmlInput\default_value().