Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e1d713738f
@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
|
||||
$langs->load("banks");
|
||||
$langs->load("categories");
|
||||
@ -147,6 +148,7 @@ $memberstatic=new Adherent($db);
|
||||
$paymentstatic=new Paiement($db);
|
||||
$paymentsupplierstatic=new PaiementFourn($db);
|
||||
$paymentvatstatic=new TVA($db);
|
||||
$remisestatic = new RemiseCheque($db);
|
||||
|
||||
$acct = new Account($db);
|
||||
$acct->fetch($id);
|
||||
@ -155,7 +157,9 @@ $now=dol_now();
|
||||
|
||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type as type";
|
||||
$sql.= ", b.fk_bordereau";
|
||||
$sql.= ", bc.number";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
|
||||
$sql.= " WHERE rappro=0 AND fk_account=".$acct->id;
|
||||
$sql.= " ORDER BY dateo ASC";
|
||||
$sql.= " LIMIT 1000"; // Limit to avoid page overload
|
||||
@ -292,7 +296,13 @@ if ($resql)
|
||||
// Type + Number
|
||||
$label=($langs->trans("PaymentType".$objp->type)!="PaymentType".$objp->type)?$langs->trans("PaymentType".$objp->type):$objp->type; // $objp->type is a code
|
||||
if ($label=='SOLD') $label='';
|
||||
print '<td class="nowrap">'.$label.($objp->num_chq?' '.$objp->num_chq:'').($objp->fk_bordereau>0?' ('.$objp->fk_bordereau.')':'').'</td>';
|
||||
$link='';
|
||||
if ($objp->fk_bordereau>0) {
|
||||
$remisestatic->id = $objp->fk_bordereau;
|
||||
$remisestatic->ref = $objp->number;
|
||||
$link = ' '.$remisestatic->getNomUrl(1);
|
||||
}
|
||||
print '<td class="nowrap">'.$label.($objp->num_chq?' '.$objp->num_chq:'').$link.'</td>';
|
||||
|
||||
// Description
|
||||
print '<td valign="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$acct->id.'">';
|
||||
|
||||
@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
|
||||
$langs->load("banks");
|
||||
$langs->load("categories");
|
||||
@ -91,7 +92,7 @@ $paymentsupplierstatic=new PaiementFourn($db);
|
||||
$paymentvatstatic=new TVA($db);
|
||||
$bankstatic=new Account($db);
|
||||
$banklinestatic=new AccountLine($db);
|
||||
|
||||
$remisestatic = new RemiseCheque($db);
|
||||
|
||||
// Load account
|
||||
$object = new Account($db);
|
||||
@ -328,9 +329,11 @@ else
|
||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
|
||||
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
|
||||
$sql.= " b.fk_bordereau,";
|
||||
$sql.= " bc.number,";
|
||||
$sql.= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
|
||||
$sql.= " WHERE b.num_releve='".$db->escape($num)."'";
|
||||
if (!isset($num)) $sql.= " OR b.num_releve is null";
|
||||
$sql.= " AND b.fk_account = ".$object->id;
|
||||
@ -374,7 +377,13 @@ else
|
||||
} else {
|
||||
$type_label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
|
||||
}
|
||||
print '<td class="nowrap">'.$type_label.' '.($objp->num_chq?$objp->num_chq:'').($objp->fk_bordereau>0?' ('.$objp->fk_bordereau.')':'').'</td>';
|
||||
$link='';
|
||||
if ($objp->fk_bordereau>0) {
|
||||
$remisestatic->id = $objp->fk_bordereau;
|
||||
$remisestatic->ref = $objp->number;
|
||||
$link = ' '.$remisestatic->getNomUrl(1);
|
||||
}
|
||||
print '<td class="nowrap">'.$type_label.' '.($objp->num_chq?$objp->num_chq:'').$link.'</td>';
|
||||
|
||||
// Description
|
||||
print '<td valign="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$object->id.'">';
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
*
|
||||
@ -1065,7 +1065,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->salaries->enabled)
|
||||
if ($conf->accounting->enabled)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
@ -1402,7 +1402,7 @@ else
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->salaries->enabled)
|
||||
if ($conf->accounting->enabled)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>'.$object->accountancy_code.'</td>';
|
||||
@ -2173,7 +2173,7 @@ else
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->salaries->enabled)
|
||||
if ($conf->accounting->enabled)
|
||||
{
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user