Add the payment in bank module

This commit is contained in:
aspangaro 2015-06-16 05:46:53 +02:00
parent 2fb27b50ec
commit d92eab49de

View File

@ -39,6 +39,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.'/compta/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
@ -50,6 +51,7 @@ $langs->load("companies");
$langs->load("salaries");
$langs->load("loan");
$langs->load("donations");
$langs->load("trips");
$id = (GETPOST('id','int') ? GETPOST('id','int') : GETPOST('account','int'));
$ref = GETPOST('ref','alpha');
@ -188,6 +190,7 @@ $paymentsupplierstatic=new PaiementFourn($db);
$paymentvatstatic=new TVA($db);
$paymentsalstatic=new PaymentSalary($db);
$donstatic=new Don($db);
$expensereportstatic=new ExpenseReport($db);
$bankstatic=new Account($db);
$banklinestatic=new AccountLine($db);
@ -732,6 +735,12 @@ if ($id > 0 || ! empty($ref))
print ' '.img_object($langs->trans('ShowPayment'),'payment').' ';
print '</a>';
}
elseif ($links[$key]['type']=='payment_expensereport')
{
print '<a href="'.DOL_URL_ROOT.'/expensereport/payment/card.php?id='.$links[$key]['url_id'].'">';
print ' '.img_object($langs->trans('ShowPayment'),'payment').' ';
print '</a>';
}
elseif ($links[$key]['type']=='banktransfert')
{
// Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail.