本文整理汇总了PHP中gaz_dbi_fetch_array函数的典型用法代码示例。如果您正苦于以下问题:PHP gaz_dbi_fetch_array函数的具体用法?PHP gaz_dbi_fetch_array怎么用?PHP gaz_dbi_fetch_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gaz_dbi_fetch_array函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getMovements
function getMovements($account_ini,$account_fin,$date_ini,$date_fin)
{
global $gTables;
if ($account_ini==$account_fin || $account_fin==0 ) {
if ($account_fin==0) {
$account_fin=$account_ini;
}
$where = " codcon = $account_ini AND datreg BETWEEN $date_ini AND $date_fin";
$orderby = " datreg, id_tes ASC ";
$select = $gTables['tesmov'].".id_tes,".$gTables['tesmov'].".descri AS tesdes,datreg,codice,protoc,numdoc,datdoc,".$gTables['clfoco'].".descri,import*(darave='D') AS dare,import*(darave='A') AS avere";
} else {
$where = $gTables['clfoco'].".codice BETWEEN $account_ini AND $account_fin AND datreg BETWEEN $date_ini AND $date_fin GROUP BY ".$gTables['clfoco'].".codice";
$orderby = " codice ASC ";
$select = "codice,".$gTables['clfoco'].".descri AS tesdes, COUNT(id_rig) AS rows, SUM(import*(darave='D')) AS dare, SUM(import*(darave='A')) AS avere";
}
$table = $gTables['clfoco']." LEFT JOIN ".$gTables['rigmoc']." ON ".$gTables['clfoco'].".codice = ".$gTables['rigmoc'].".codcon "
."LEFT JOIN ".$gTables['tesmov']." ON ".$gTables['rigmoc'].".id_tes = ".$gTables['tesmov'].".id_tes ";
$m=array();
$rs=gaz_dbi_dyn_query ($select, $table, $where, $orderby);
while ($r = gaz_dbi_fetch_array($rs)) {
$m[] = $r;
}
return $m;
}
开发者ID:andreabia,项目名称:gazie,代码行数:25,代码来源:select_partit.php
示例2: createNewTable
function createNewTable($table,$new_id)
{
global $table_prefix;
$results = gaz_dbi_query ("SHOW CREATE TABLE ".$table);
$row = gaz_dbi_fetch_array($results);
return(preg_replace("/$table_prefix\_[0-9]{3}/",$table_prefix.sprintf('_%03d',$new_id),$row['Create Table']).";\n\n");
}
开发者ID:andreabia,项目名称:gazie,代码行数:7,代码来源:create_new_enterprise.php
示例3: getDocRef
function getDocRef($data){
global $gTables;
$r='';
switch ($data['caucon']) {
case "FAI":
case "FND":
case "FNC":
$tesdoc_result = gaz_dbi_dyn_query ('*',$gTables['tesdoc'],
"id_con = ".$data["id_tes"],
'id_tes DESC',0,1);
$tesdoc_r = gaz_dbi_fetch_array ($tesdoc_result);
if ($tesdoc_r) {
$r="../vendit/stampa_docven.php?id_tes=".$tesdoc_r["id_tes"];
}
break;
case "FAD":
$tesdoc_result = gaz_dbi_dyn_query ('*',$gTables['tesdoc'],
"tipdoc = \"".$data["caucon"]."\" AND seziva = ".$data["seziva"]." AND protoc = ".$data["protoc"]." AND numfat = '".$data["numdoc"]."' AND datfat = \"".$data["datdoc"]."\"",
'id_tes DESC');
$tesdoc_r = gaz_dbi_fetch_array ($tesdoc_result);
if ($tesdoc_r) {
$r="../vendit/stampa_docven.php?td=2&si=".$tesdoc_r["seziva"]."&pi=".$tesdoc_r['protoc']."&pf=".$tesdoc_r['protoc']."&di=".$tesdoc_r["datfat"]."&df=".$tesdoc_r["datfat"] ;
}
break;
case "RIB":
case "TRA":
$effett_result = gaz_dbi_dyn_query ('*',$gTables['effett'],"id_con = ".$data["id_tes"],'id_tes',0,1);
$effett_r = gaz_dbi_fetch_array ($effett_result);
if ($effett_r) {
$r="../vendit/stampa_effett.php?id_tes=".$effett_r["id_tes"];
}
break;
}
return $r;
}
开发者ID:andreabia,项目名称:gazie,代码行数:35,代码来源:report_movcon.php
示例4: getConfig
function getConfig($var)
{
global $table_prefix;
$query = "SELECT * FROM `".$gTables['company_config']."` WHERE var = '$var'";
$result = gaz_dbi_query ($query);
$data = gaz_dbi_fetch_array($result);
return $data;
}
开发者ID:andreabia,项目名称:gazie,代码行数:8,代码来源:gaziecart_update.php
示例5: getLastDoc
function getLastDoc($item_code)
{
global $gTables;
$rs=false;
$rs_last_doc = gaz_dbi_dyn_query("*", $gTables['files'], " item_ref ='".$item_code."'",'id_doc DESC',0,1);
$last_doc = gaz_dbi_fetch_array($rs_last_doc);
// se e' il primo documento dell'anno, resetto il contatore
if ($last_doc) {
$rs=$last_doc;
}
return $rs;
}
开发者ID:andreabia,项目名称:gazie,代码行数:12,代码来源:report_artico.php
示例6: getLastId
function getLastId($date,$seziva)
{
global $gTables;
// ricavo l'ultimo id del giorno
$rs_last = gaz_dbi_dyn_query("id_tes", $gTables['tesdoc'], "tipdoc = 'VCO' AND datemi = '".$date."' AND seziva = ".intval($seziva),'numdoc DESC',0,1);
$last = gaz_dbi_fetch_array($rs_last);
$id = 0;
if ($last) {
$id = $last['id_tes'];
}
return $id;
}
开发者ID:andreabia,项目名称:gazie,代码行数:12,代码来源:report_scontr.php
示例7: getMovements
function getMovements($date_ini,$date_fin)
{
global $gTables,$admin_aziend;
$m=array();
$where="datreg BETWEEN $date_ini AND $date_fin";
$what=$gTables['movmag'].".*, ".
$gTables['caumag'].".codice, ".$gTables['caumag'].".descri, ".
$gTables['artico'].".codice, ".$gTables['artico'].".descri AS desart, ".$gTables['artico'].".unimis, ".$gTables['artico'].".scorta, ".$gTables['artico'].".catmer ";
$table=$gTables['movmag']." LEFT JOIN ".$gTables['caumag']." ON (".$gTables['movmag'].".caumag = ".$gTables['caumag'].".codice)
LEFT JOIN ".$gTables['artico']." ON (".$gTables['movmag'].".artico = ".$gTables['artico'].".codice)";
$rs=gaz_dbi_dyn_query ($what,$table,$where, 'datreg ASC, clfoco ASC');
while ($r = gaz_dbi_fetch_array($rs)) {
$m[] = $r;
}
return $m;
}
开发者ID:andreabia,项目名称:gazie,代码行数:16,代码来源:stampa_giomag.php
示例8: getMovements
function getMovements($date_ini,$date_fin,$num_ini=1,$num_fin=999999999)
{
global $gTables,$admin_aziend;
$m=array();
$where="scaden BETWEEN ".$date_ini." AND ".$date_fin." AND
progre BETWEEN ".$num_ini." AND ".$num_fin;
$what=$gTables['effett'].".*, ".
$gTables['clfoco'].".codice, ".
$gTables['banapp'].".descri AS desban, ".
$gTables['anagra'].".ragso1, ".$gTables['anagra'].".ragso2 ";
$table=$gTables['effett']." LEFT JOIN ".$gTables['clfoco']." ON ".$gTables['effett'].".clfoco = ".$gTables['clfoco'].".codice
LEFT JOIN ".$gTables['anagra']." ON ".$gTables['anagra'].".id = ".$gTables['clfoco'].".id_anagra
LEFT JOIN ".$gTables['banapp']." ON ".$gTables['banapp'].".codice = ".$gTables['effett'].".banapp";
$rs=gaz_dbi_dyn_query ($what,$table,$where,"tipeff ASC, scaden ASC, progre ASC");
while ($r = gaz_dbi_fetch_array($rs)) {
$m[] = $r;
}
return $m;
}
开发者ID:andreabia,项目名称:gazie,代码行数:19,代码来源:select_effett.php
示例9: accountValue
function accountValue($last_closing,$date_closing) //funzione per la creazione dell'array dei conti con saldo diverso da 0 e ordinati per tipo e numero di conto
{
global $gTables;
$where = "datreg BETWEEN $last_closing AND $date_closing GROUP BY codcon";
$orderby = " codcon ASC ";
$select = $gTables['clfoco'].".descri AS name,codcon,(SUM(import*(darave='D')) - SUM(import*(darave='A'))) AS val";
$table = $gTables['clfoco']." LEFT JOIN ".$gTables['rigmoc']." ON ".$gTables['clfoco'].".codice = ".$gTables['rigmoc'].".codcon "
."LEFT JOIN ".$gTables['tesmov']." ON ".$gTables['rigmoc'].".id_tes = ".$gTables['tesmov'].".id_tes ";
$rs=gaz_dbi_dyn_query($select, $table, $where, $orderby);
$result=array();
$result['att']=array();
$result['pas']=array();
$result['cos']=array();
$result['ric']=array();
$result['tot']['cos']=0;
$result['tot']['ric']=0;
$result['tot']['att']=0;
$result['tot']['pas']=0;
while ($r = gaz_dbi_fetch_array($rs)) {
if ($r['val'] <> 0) {
$type='pas';
switch (substr($r['codcon'],0,1)) {
case 4: //economici
case 3:
if ($r['val'] > 0) {
$type='cos';
} else {
$type='ric';
}
break;
default: //patrimoniali
if ($r['val'] > 0) {
$type='att';
}
break;
}
$result[$type][$r['codcon']]=$r;
$result['tot'][$type]+=$r['val'];
}
}
return $result;
}
开发者ID:andreabia,项目名称:gazie,代码行数:42,代码来源:select_chiape.php
示例10: getErrors
function getErrors($year)
{
global $gTables,$admin_aziend;
$e=array();
$where="regiva > 0 and YEAR(datreg) = ".$year;
$orderby="seziva, regiva, datreg, protoc ";
$rs=gaz_dbi_dyn_query("*,(seziva*10+regiva) AS ctrl_sr, DATE_FORMAT(datdoc,'%d-%m-%Y') AS dd, DATE_FORMAT(datreg,'%d-%m-%Y') AS dr", $gTables['tesmov'],$where,$orderby);
$c_sr=0;
$c_p=0;
$c_ndoc=array();
while ($r=gaz_dbi_fetch_array($rs)) {
if ($c_sr!=($r['ctrl_sr'])){ // devo azzerare tutto perchè è cambiata la sezione o il registro
$c_sr=0;
$c_p=0;
$c_ndoc=array();
if ($r['protoc']<>1){ // errore: il protocollo non è 1
$e[]=array('err'=>'P','id'=>$r['id_tes'],'rg'=>$r['regiva'],'pr'=>$r['protoc'],'nd'=>$r['numdoc'],'dd'=>$r['dd'],'sz'=>$r['seziva'],'ty'=>$r['caucon'],'ex'=>1,'de'=>$r['descri'],'dr'=>$r['dr']);
}
} else {
$ex=$c_p+1;
if ($r['protoc']<>$ex){ // errore: il protocollo non è consecutivo
$e[]=array('err'=>'P','id'=>$r['id_tes'],'rg'=>$r['regiva'],'pr'=>$r['protoc'],'nd'=>$r['numdoc'],'dd'=>$r['dd'],'sz'=>$r['seziva'],'ty'=>$r['caucon'],'ex'=>$ex,'de'=>$r['descri'],'dr'=>$r['dr']);
}
}
if ($r['regiva']<4){ // il controllo sul numero solo per i registri delle fatture
if (isset($c_ndoc[$r['caucon']])){ // controllo se il numero precedente è questo-1
$ex=$c_ndoc[$r['caucon']]+1;
if ($r['numdoc']<>$ex){ // errore: il numero non è consecutivo
$e[]=array('err'=>'N','id'=>$r['id_tes'],'rg'=>$r['regiva'],'pr'=>$r['protoc'],'nd'=>$r['numdoc'],'dd'=>$r['dd'],'sz'=>$r['seziva'],'ty'=>$r['caucon'],'ex'=>$ex,'de'=>$r['descri'],'dr'=>$r['dr']);
}
} else { // dal primo documento di questo tipo ci si aspetta il n.1
if ($r['numdoc']<>1){ // errore: il numero non è 1
$e[]=array('err'=>'N','id'=>$r['id_tes'],'rg'=>$r['regiva'],'pr'=>$r['protoc'],'nd'=>$r['numdoc'],'dd'=>$r['dd'],'sz'=>$r['seziva'],'ty'=>$r['caucon'],'ex'=>1,'de'=>$r['descri'],'dr'=>$r['dr']);
}
}
}
$c_ndoc[$r['caucon']]=$r['numdoc'];
$c_sr=$r['ctrl_sr'];
$c_p=$r['protoc'];
}
return $e;
}
开发者ID:andreabia,项目名称:gazie,代码行数:42,代码来源:error_protoc.php
示例11: getMovements
function getMovements($date_ini,$date_fin)
{
global $gTables,$admin_aziend;
$where = "datreg BETWEEN $date_ini AND $date_fin GROUP BY seziva,regiva,codiva";
$orderby="seziva, regiva, datreg, protoc";
$rs=gaz_dbi_dyn_query("seziva,regiva,codiva,periva,operat,
SUM((imponi*(operat = 1) - imponi*(operat = 2))*(-2*(regiva > 5)+1)) AS imp,
SUM((impost*(operat = 1) - impost*(operat = 2))*(-2*(regiva > 5)+1)) AS iva,
".$gTables['aliiva'].".descri AS desvat,
".$gTables['aliiva'].".tipiva AS tipiva",
$gTables['rigmoi']." LEFT JOIN ".$gTables['tesmov']." ON ".$gTables['rigmoi'].".id_tes = ".$gTables['tesmov'].".id_tes
LEFT JOIN ".$gTables['aliiva']." ON ".$gTables['rigmoi'].".codiva = ".$gTables['aliiva'].".codice",$where,$orderby);
$m=array();
$m['tot']=0;
while ($r=gaz_dbi_fetch_array($rs)) {
if ($r['tipiva']=='D'){ // iva indetraibile
$r['isp']=0;
$r['ind']=$r['iva'];
$r['iva']=0;
} elseif ($r['tipiva']=='T'){ // iva split payment
$r['isp']=$r['iva'];
$r['ind']=0;
$r['iva']=0;
} else { // iva normale
$r['ind']=0;
$r['isp']=0;
}
$m['data'][]=$r;
if (!isset($m['tot_rate'][$r['codiva']])) {
$m['tot_rate'][$r['codiva']]=$r;
} else {
$m['tot_rate'][$r['codiva']]['imp']+=$r['imp'];
$m['tot_rate'][$r['codiva']]['iva']+=$r['iva'];
$m['tot_rate'][$r['codiva']]['ind']+=$r['ind'];
$m['tot_rate'][$r['codiva']]['isp']+=$r['isp'];
}
$m['tot']+=$r['iva'];
}
return $m;
}
开发者ID:andreabia,项目名称:gazie,代码行数:40,代码来源:select_liqiva.php
示例12: selectCompany
function selectCompany($name,$val,$strSearch='',$val_hiddenReq='',$mesg,$class='FacetSelect')
{
global $gTables,$admin_aziend;
$table=$gTables['aziend'].' LEFT JOIN '. $gTables['admin_module'].' ON '.$gTables['admin_module'].'.enterprise_id = '.$gTables['aziend'].'.codice';
$where=$gTables['admin_module'].'.adminid=\''.$admin_aziend['Login'].'\' GROUP BY enterprise_id';
if ($val>0 && $val<1000) { // vengo da una modifica della precedente select case quindi non serve la ricerca
$co_rs=gaz_dbi_dyn_query("*",$table,'enterprise_id = '.$val.' AND '.$where,"ragso1 ASC");
$co=gaz_dbi_fetch_array($co_rs);
changeEnterprise(intval($val));
echo "\t<input type=\"hidden\" name=\"$name\" value=\"$val\">\n";
echo "\t<input type=\"hidden\" name=\"search[$name]\" value=\"%%\">\n";
echo "\t<input type=\"submit\" value=\"".$co['ragso1']."\" name=\"change\" onclick=\"this.form.$name.value='0'; this.form.hidden_req.value='change';\" title=\"$mesg[2]\">\n";
} else {
if (strlen($strSearch) >= 2) { //sto ricercando un nuovo partner
echo "\t<select name=\"$name\" class=\"FacetSelect\" onchange=\"this.form.hidden_req.value='$name'; this.form.submit();\">\n";
$co_rs=gaz_dbi_dyn_query("*",$table,"ragso1 LIKE '".addslashes($strSearch)."%' AND ". $where,"ragso1 ASC");
if ($co_rs){
echo "<option value=\"0\"> ---------- </option>";
while ($r = gaz_dbi_fetch_array($co_rs)) {
$selected = '';
if ($r['enterprise_id'] == $val) {
$selected = "selected";
}
echo "\t\t <option value=\"".$r['enterprise_id']."\" $selected >".intval($r['enterprise_id'])."-".$r["ragso1"]."</option>\n";
}
echo "\t </select>\n";
} else {
$msg = $mesg[0];
}
} else {
$msg = $mesg[1];
echo "\t<input type=\"hidden\" name=\"$name\" value=\"$val\">\n";
}
echo "\t<input type=\"text\" name=\"search[$name]\" value=\"".$strSearch."\" maxlength=\"15\" size=\"6\" class=\"FacetInput\">\n";
if (isset($msg)) {
echo "<input type=\"text\" style=\"color: red; font-weight: bold;\" size=\"".strlen($msg)."\" disabled value=\"$msg\">";
}
echo "\t<input type=\"image\" align=\"middle\" name=\"search_str\" src=\"../../library/images/cerbut.gif\">\n";
}
}
开发者ID:andreabia,项目名称:gazie,代码行数:40,代码来源:admin.php
示例13: getData
function getData($id_rig)
{
/*
* restituisce tutti i dati relativi al rigo contabile del pagamento
*/
global $gTables;
$anagrafica = new Anagrafica();
$paymov = new Schedule;
$sqlquery= "SELECT ".$gTables['tesmov'].".*, ".$gTables['paymov'].".*, ".$gTables['rigmoc'].".import
FROM ".$gTables['rigmoc']." LEFT JOIN ".$gTables['paymov']." ON ".$gTables['paymov'].".id_rigmoc_pay = ".$gTables['rigmoc'].".id_rig
LEFT JOIN ".$gTables['tesmov']." ON ".$gTables['rigmoc'].".id_tes = ".$gTables['tesmov'].".id_tes
WHERE ".$gTables['rigmoc'].".id_rig = $id_rig ORDER BY expiry ASC";
$rs = gaz_dbi_query($sqlquery);
$a=array();
$i=1;
while ($r = gaz_dbi_fetch_array($rs)) {
$a[$i] = $r;
$a[$i]['t'] = $paymov->getDocumentData($r['id_tesdoc_ref']);
$i++;
}
return array('d'=>$a,'partner'=>$anagrafica->getPartner($a[1]['clfoco']));
}
开发者ID:andreabia,项目名称:gazie,代码行数:22,代码来源:print_customer_payment_receipt.php
示例14: gaz_dbi_get_row
$testata = gaz_dbi_get_row($gTables['tesdoc'], "id_tes", $_GET['id_tes']);
if (substr($testata['tipdoc'],0,2) == 'DD'){
$where = "tipdoc LIKE 'DD_' AND seziva = '".$testata['seziva']."' AND numfat = 0" ;
} elseif (substr($testata['tipdoc'],0,2) == 'AF'){
$where = "tipdoc LIKE 'AF_'";
} elseif (substr($testata['tipdoc'],0,2) == 'AD'){
$where = "tipdoc LIKE 'AD_'";
}
$rs_ultimo_documento = gaz_dbi_dyn_query("*", $gTables['tesdoc'], $where,"id_tes DESC",0,1);
$ultimo_documento = gaz_dbi_fetch_array($rs_ultimo_documento);
// ricavo il progressivo annuo, ma se e' il primo documento dell'anno, resetto il contatore
if ($ultimo_documento and $ultimo_documento['id_tes'] == $testata['id_tes']) {
//allora procedo all'eliminazione della testata e dei righi...
gaz_dbi_del_row($gTables['tesdoc'], "id_tes", $testata['id_tes']);
$rs_righidel = gaz_dbi_dyn_query("*", $gTables['rigdoc'], "id_tes = '".$testata['id_tes']."'","id_tes desc");
while ($a_row = gaz_dbi_fetch_array($rs_righidel)) {
gaz_dbi_del_row($gTables['rigdoc'], "id_rig", $a_row['id_rig']);
if (intval($a_row['id_mag']) > 0){ //se c'è stato un movimento di magazzino lo azzero
$upd_mm->uploadMag('DEL',$testata['tipdoc'],'','','','','','','','','','',$a_row['id_mag'],$admin_aziend['stock_eval_method']);
}
}
header("Location: ".$_POST['ritorno']);
exit;
} else {
$message = "Si stà tentando di eliminare un documento diverso dall'ultimo emesso !".$ultimo_documento['tipdoc'].$ultimo_documento['id_tes'];
}
}
if (isset($_POST['Return'])) {
header("Location: report_ddtacq.php");
exit;
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:delete_docacq.php
示例15: getProtocol
function getProtocol($type,$year,$sezione) // questa funzione trova l'ultimo numero di protocollo
{ // controllando sia l'archivio documenti che il
global $gTables; // registro IVA acquisti
$rs_ultimo_tesdoc = gaz_dbi_dyn_query("*", $gTables['tesdoc'],"YEAR(datemi) = $year AND tipdoc LIKE '".substr($type,0,2)."_' AND seziva = $sezione","protoc DESC",0,1);
$ultimo_tesdoc = gaz_dbi_fetch_array($rs_ultimo_tesdoc);
$rs_ultimo_tesmov = gaz_dbi_dyn_query("*", $gTables['tesmov'],"YEAR(datreg) = $year AND regiva = 6 AND seziva = $sezione","protoc DESC",0,1);
$ultimo_tesmov = gaz_dbi_fetch_array($rs_ultimo_tesmov);
$lastProtocol=0;
if ($ultimo_tesdoc) {
$lastProtocol = $ultimo_tesdoc['protoc'];
}
if ($ultimo_tesmov) {
if ($ultimo_tesmov['protoc'] > $lastProtocol){
$lastProtocol = $ultimo_tesmov['protoc'];
}
}
return $lastProtocol+1;
}
开发者ID:andreabia,项目名称:gazie,代码行数:18,代码来源:admin_docacq.php
示例16: intval
$chk_acc=true;
for ($i=1; $i<=6; $i++) {
$form["contr".$i] = intval($_POST["contr".$i]);
if ($form["contr".$i]>100 && $chk_acc==true) {
$chk_acc=false;
}
$form["tipim".$i] = substr($_POST["tipim".$i],0,1);
$form["daav_".$i] = substr($_POST["daav_".$i],0,1);
}
if (isset($_POST['submit'])) {
if ($toDo == 'insert') { //se è un'inserimento
if ($chk_acc) $msg .= "3+";
if (empty($form["descri"])) $msg .= "1+";
if (!empty($form["codice"])) {
$rs_cau = gaz_dbi_dyn_query("*", $gTables['caucon'], "codice = '".$form["codice"]."'","codice DESC",0,1);
$rs = gaz_dbi_fetch_array($rs_cau);
if ($rs) {
$msg .= "2+";
}
switch ($form["codice"]) {
case "CHI":
$msg .= "4+";
break;
case "APE":
$msg .= "5+";
break;
}
} else {
$msg .= "0+";
}
if ( $msg == "") {// nessun errore
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:admin_caucon.php
示例17: elseif
$msg .= '15+';
}
}
}
if (!empty($r_cf)) {
$msg .= "11+";
}
if (!($form['codfis']=="") && !($form['codfis']=="00000000000")) {
$partner_with_same_cf=$anagrafica->queryPartners('*', "codice <> ".$real_code." AND codice BETWEEN ".$admin_aziend['mascli']."000000 AND ".$admin_aziend['mascli']."999999 AND codfis = '".$form['codfis']."'","codfis DESC",0,1);
if ($partner_with_same_cf) { // c'è già un cliente sul piano dei conti
if ($partner_with_same_cf[0]['fe_cod_univoco'] == $form['fe_cod_univoco']) { // c'è già un cliente sul piano dei conti ed è anche lo stesso ufficio ( amministrativo della PA )
$msg .= "12+";
}
} elseif ($form['id_anagra']==0) { // è un nuovo cliente senza anagrafica
$rs_anagra_with_same_cf=gaz_dbi_dyn_query('*',$gTables['anagra']," codfis = '".$form['codfis']."'","codfis DESC",0,1);
$anagra_with_same_cf=gaz_dbi_fetch_array($rs_anagra_with_same_cf);
if($anagra_with_same_cf) { // c'è già un'anagrafica con lo stesso CF non serve reinserirlo ma avverto
// devo attivare tutte le interfacce per la scelta!
$anagra=$anagra_with_same_cf;
$msg .= '16+';
}
}
}
if (empty($form['codfis'])) {
if ($form['sexper'] == 'G') {
$msg .= "13+" ;
$form['codfis'] = $form['pariva'];
} else {
$msg .= "14+" ;
}
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:admin_client.php
示例18: elseif
$form['corpo'] = $lettera['corpo'];
if ($lettera['signature'] == 1) {
$form['signature'] = 'checked';
} else {
$form['signature'] = '';
}
} elseif (!isset($_POST['Insert'])) { //se e' il primo accesso per INSERT
$form['ritorno'] = $_SERVER['HTTP_REFERER'];
$form['hidden_req']='';
$form['search']['clfoco']='';
$form['id_let'] = "";
$form['gioemi'] = date("d");
$form['mesemi'] = date("m");
$form['annemi'] = date("Y");
$rs_ultima_lettera = gaz_dbi_dyn_query("*", $gTables['letter'], "YEAR(write_date) = ".date("Y"),'write_date DESC, numero DESC, id_let DESC',0,1);
$ultima_lettera = gaz_dbi_fetch_array($rs_ultima_lettera);
if ($ultima_lettera) {
$form['numero'] = intval($ultima_lettera['numero']) + 1;
$form['tipo'] = $ultima_lettera['tipo'];
} else {
$form['numero'] = 1;
$form['tipo'] = 'LET';
}
$form['clfoco'] = 0;
$form['oggetto'] = '';
$form['c_a'] = '';
$form['corpo'] = '';
$form['signature'] = 'checked';
}
require("../../library/include/header.php");
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:admin_letter.php
示例19: mktime
echo "</table>\n";
echo "</form>\n";
}
else {
$utsdate= mktime(0,0,0,$form['this_date_M'],$form['this_date_D'],$form['this_date_Y']);
$date = date("Y-m-d",$utsdate);
$where="catmer = ".$form["catmer"];
if ($form['catmer'] == 100) {
$where=1;
}
$ctrl_cm=0;
$result = gaz_dbi_dyn_query($gTables['artico'].'.*, '.$gTables['catmer'].'.descri AS descat,'.$gTables['catmer'].'.annota AS anncat', $gTables['artico'].' LEFT JOIN '.$gTables['catmer'].' ON catmer = '.$gTables['catmer'].'.codice', $where,'catmer ASC, '.$gTables['artico'].'.codice ASC');
if ($result) {
// Imposto totale valore giacenza by DF
$tot_val_giac = 0;
while ($r = gaz_dbi_fetch_array($result)) {
if ($r['catmer']<>$ctrl_cm ){
gaz_set_time_limit (30);
$ctrl_cm=$r['catmer'];
}
$mv=$gForm->getStockValue(false,$r['codice'],$date,null,$admin_aziend['decimal_price']);
$magval=array_pop($mv);
if ( $magval['q_g'] > 0 )
{
$form['a'][$r['codice']]['i_d'] = $r['descri'];
$form['a'][$r['codice']]['i_u'] = $r['unimis'];
$form['a'][$r['codice']]['v_a'] = $magval['v'];
$form['a'][$r['codice']]['v_r'] = $magval['v'];
$form['a'][$r['codice']]['i_a'] = $r['annota'];
$form['a'][$r['codice']]['i_g'] = $r['catmer'];
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:export_inventory_stock.php
示例20: array
$descon = array();
$lines=file('IVdirCEE.bil');
foreach($lines as $line) {
$nuova = explode(';',$line,2);
$descon[trim($nuova[0])] = $nuova[1];
$data[] = trim($nuova[0]);
}
$data = array_slice($data,1);
$where = "datreg BETWEEN '$dataini' AND '$datafin' AND caucon <> 'CHI' AND caucon <> 'APE' OR (caucon = 'APE' AND datreg BETWEEN '$dataini' AND '$datadop') GROUP BY codcon ";
$orderby = " codcon ";
$rs_castel = gaz_dbi_dyn_query("codcon, ragso1, SUM(import*(darave='D')-import*(darave='A')) AS saldo, ceedar, ceeave", $gTables['rigmoc']."
LEFT JOIN ".$gTables['tesmov']." ON ".$gTables['rigmoc'].".id_tes = ".$gTables['tesmov'].".id_tes
LEFT JOIN ".$gTables['clfoco']." ON ".$gTables['rigmoc'].".codcon = ".$gTables['clfoco'].".codice
LEFT JOIN ".$gTables['anagra']." ON ".$gTables['anagra'].".id = ".$gTables['clfoco'].".id_anagra", $where, $orderby);
//procedura per la creazione dell'array dei conti riclassificati
while ($castel = gaz_dbi_fetch_array($rs_castel)) {
if ($castel["saldo"] > 0) { //se l'eccedenza è in dare
if (! in_array(trim($castel['ceedar']),$data)) {//se non e' riclassificato
// vedo se c'è la riclassificazione sul mastro
$mastro = gaz_dbi_get_row($gTables['clfoco'],'codice',substr($castel['codcon'],0,3)."000000");
$castel['ceedar']=trim($mastro['ceedar']);
if (! in_array($castel['ceedar'],$data)) {//se non e' riclassificato neanche il mastro
$castel['ceedar']=$castel['codcon'];
}
}
$conti[$castel['codcon']] = array($castel["saldo"],$castel["ragso1"],$castel["ceedar"]);
}
if ($castel["saldo"] < 0) {//se l'eccedenza è in avere
if (! in_array(trim($castel['ceeave']),$data)) {
// vedo se c'è la riclassificazione sul mastro
$mastro = gaz_dbi_get_row($gTables['clfoco'],"codice",substr($castel['codcon'],0,3)."000000");
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:stampa_bilcee.php
注:本文中的gaz_dbi_fetch_array函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论