Move loan in htdocs
This commit is contained in:
parent
414d4c6432
commit
ad0f1aae6b
@ -35,7 +35,7 @@ function loan_prepare_head($object)
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/loan/card.php?id='.$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/loan/card.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Card');
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
@ -49,13 +49,13 @@ function loan_prepare_head($object)
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$upload_dir = $conf->loan->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/loan/document.php?id='.$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Documents");
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/loan/info.php?id='.$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/loan/info.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
@ -181,10 +181,10 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled', __HANDLER__, 'left', 2210__+MAX_llx_menu__, 'accountancy', 'tax_sal', 2200__+MAX_llx_menu__, '/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy', 'Salaries', 1, 'salaries', '$user->rights->salaries->read', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2211__+MAX_llx_menu__, 'accountancy', '', 2210__+MAX_llx_menu__, '/compta/salaries/card.php?leftmenu=tax_salary&action=create', 'NewPayment', 2, 'companies', '$user->rights->salaries->write', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2212__+MAX_llx_menu__, 'accountancy', '', 2210__+MAX_llx_menu__, '/compta/salaries/index.php?leftmenu=tax_salary', 'Payments', 2, 'companies', '$user->rights->salaries->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled', __HANDLER__, 'left', 2220__+MAX_llx_menu__, 'accountancy', 'tax_loan', 2200__+MAX_llx_menu__, '/compta/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy', 'Loans', 1, 'loan', '$user->rights->loan->read', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2221__+MAX_llx_menu__, 'accountancy', '', 2220__+MAX_llx_menu__, '/compta/loan/card.php?leftmenu=tax_loan&action=create', 'NewLoan', 2, 'loan', '$user->rights->loan->write', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2222__+MAX_llx_menu__, 'accountancy', '', 2220__+MAX_llx_menu__, '/compta/loan/index.php?leftmenu=tax_loan', 'Payments', 2, 'companies', '$user->rights->loan->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2223__+MAX_llx_menu__, 'accountancy', '', 2220__+MAX_llx_menu__, '/compta/loan/calc.php?leftmenu=tax_loan', 'Calculator', 2, 'companies', '$user->rights->loan->calc', '', 0, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled', __HANDLER__, 'left', 2220__+MAX_llx_menu__, 'accountancy', 'tax_loan', 2200__+MAX_llx_menu__, '/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy', 'Loans', 1, 'loan', '$user->rights->loan->read', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2221__+MAX_llx_menu__, 'accountancy', '', 2220__+MAX_llx_menu__, '/loan/card.php?leftmenu=tax_loan&action=create', 'NewLoan', 2, 'loan', '$user->rights->loan->write', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2222__+MAX_llx_menu__, 'accountancy', '', 2220__+MAX_llx_menu__, '/loan/index.php?leftmenu=tax_loan', 'Payments', 2, 'companies', '$user->rights->loan->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2223__+MAX_llx_menu__, 'accountancy', '', 2220__+MAX_llx_menu__, '/loan/calc.php?leftmenu=tax_loan', 'Calculator', 2, 'companies', '$user->rights->loan->calc', '', 0, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled', __HANDLER__, 'left', 2250__+MAX_llx_menu__, 'accountancy', 'tax_social', 2200__+MAX_llx_menu__, '/compta/sociales/index.php?leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'accountancy', '', 2250__+MAX_llx_menu__, '/compta/sociales/charges.php?leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'accountancy', '', 2250__+MAX_llx_menu__, '/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
||||
|
||||
@ -815,10 +815,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->loan->enabled))
|
||||
{
|
||||
$langs->load("loan");
|
||||
$newmenu->add("/compta/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy",$langs->trans("Loans"),1,$user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
||||
if (empty($leftmenu) || preg_match('/^tax_loan/i',$leftmenu)) $newmenu->add("/compta/loan/card.php?leftmenu=tax_loan&action=create",$langs->trans("NewLoan"),2,$user->rights->loan->write);
|
||||
if (empty($leftmenu) || preg_match('/^tax_loan/i',$leftmenu)) $newmenu->add("/compta/loan/index.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->rights->loan->read);
|
||||
if (empty($leftmenu) || preg_match('/^tax_loan/i',$leftmenu)) $newmenu->add("/compta/loan/calc.php?leftmenu=tax_loan",$langs->trans("Calculator"),2,$user->rights->loan->calc);
|
||||
$newmenu->add("/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy",$langs->trans("Loans"),1,$user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
||||
if (empty($leftmenu) || preg_match('/^tax_loan/i',$leftmenu)) $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create",$langs->trans("NewLoan"),2,$user->rights->loan->write);
|
||||
if (empty($leftmenu) || preg_match('/^tax_loan/i',$leftmenu)) $newmenu->add("/loan/index.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->rights->loan->read);
|
||||
if (empty($leftmenu) || preg_match('/^tax_loan/i',$leftmenu)) $newmenu->add("/loan/calc.php?leftmenu=tax_loan",$langs->trans("Calculator"),2,$user->rights->loan->calc);
|
||||
}
|
||||
|
||||
// Social contributions
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require '../main.inc.php';
|
||||
|
||||
$langs->load("loan");
|
||||
|
||||
@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/card.php
|
||||
* \file htdocs/loan/card.php
|
||||
* \ingroup loan
|
||||
* \brief Loan card
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/loan.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
@ -416,7 +416,7 @@ if ($id > 0)
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td>";
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/loan/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
||||
print "<td>".$objp->paiement_type.' '.$objp->num_payment."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount_insurance)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
||||
@ -457,25 +457,25 @@ if ($id > 0)
|
||||
// Edit
|
||||
if ($user->rights->loan->write)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/loan/card.php?id=$object->id&action=edit\">".$langs->trans("Modify")."</a>";
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/loan/card.php?id=$object->id&action=edit\">".$langs->trans("Modify")."</a>";
|
||||
}
|
||||
|
||||
// Emit payment
|
||||
if ($object->paid == 0 && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/loan/payment/payment.php?id=$object->id&action=create\">".$langs->trans("DoPayment")."</a>";
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/loan/payment/payment.php?id=$object->id&action=create\">".$langs->trans("DoPayment")."</a>";
|
||||
}
|
||||
|
||||
// Classify 'paid'
|
||||
if ($object->paid == 0 && round($staytopay) <=0 && $user->rights->loan->write)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/loan/card.php?id=$object->id&action=paid\">".$langs->trans("ClassifyPaid")."</a>";
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/loan/card.php?id=$object->id&action=paid\">".$langs->trans("ClassifyPaid")."</a>";
|
||||
}
|
||||
|
||||
// Delete
|
||||
if ($user->rights->loan->delete)
|
||||
{
|
||||
print "<a class=\"butActionDelete\" href=\"".DOL_URL_ROOT."/compta/loan/card.php?id=$object->id&action=delete\">".$langs->trans("Delete")."</a>";
|
||||
print "<a class=\"butActionDelete\" href=\"".DOL_URL_ROOT."/loan/card.php?id=$object->id&action=delete\">".$langs->trans("Delete")."</a>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/class/loan.class.php
|
||||
* \file htdocs/loan/class/loan.class.php
|
||||
* \ingroup loan
|
||||
* \brief Class for loan module
|
||||
*/
|
||||
@ -386,7 +386,7 @@ class Loan extends CommonObject
|
||||
|
||||
$result='';
|
||||
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/loan/card.php?id='.$this->id.'">';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$this->id.'">';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($withpicto) $result.=($link.img_object($langs->trans("ShowLoan").': '.$this->label,'bill').$linkend.' ');
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/class/paymentloan.class.php
|
||||
* \file htdocs/loan/class/paymentloan.class.php
|
||||
* \ingroup facture
|
||||
* \brief File of class to manage payment of loans
|
||||
*/
|
||||
@ -429,7 +429,7 @@ class PaymentLoan extends CommonObject
|
||||
|
||||
// Add link 'payment_loan' in bank_url between payment and bank transaction
|
||||
$url='';
|
||||
if ($mode == 'payment_loan') $url=DOL_URL_ROOT.'/compta/loan/payment/card.php?id=';
|
||||
if ($mode == 'payment_loan') $url=DOL_URL_ROOT.'/loan/payment/card.php?id=';
|
||||
if ($url)
|
||||
{
|
||||
$result=$acc->add_url_line($bank_line_id, $this->id, $url, '(payment)', $mode);
|
||||
@ -448,7 +448,7 @@ class PaymentLoan extends CommonObject
|
||||
{
|
||||
$loan = new Loan($this->db);
|
||||
$loan->fetch($key);
|
||||
$result=$acc->add_url_line($bank_line_id, $loan->id, DOL_URL_ROOT.'/compta/loan/card.php?id=', $loan->type_libelle.(($loan->lib && $loan->lib!=$loan->type_libelle)?' ('.$loan->lib.')':''),'loan');
|
||||
$result=$acc->add_url_line($bank_line_id, $loan->id, DOL_URL_ROOT.'/loan/card.php?id=', $loan->type_libelle.(($loan->lib && $loan->lib!=$loan->type_libelle)?' ('.$loan->lib.')':''),'loan');
|
||||
if ($result <= 0) dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/document.php
|
||||
* \file htdocs/loan/document.php
|
||||
* \ingroup loan
|
||||
* \brief Page with attached files on loan
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/loan.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||
@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/index.php
|
||||
* \file htdocs/loan/index.php
|
||||
* \ingroup loan
|
||||
* \brief Page to list all loans
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/loan.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
|
||||
$langs->load("loan");
|
||||
$langs->load("compta");
|
||||
@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/info.php
|
||||
* \file htdocs/loan/info.php
|
||||
* \ingroup loan
|
||||
* \brief Page with info about loan
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/loan.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
@ -16,16 +16,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/payment/card.php
|
||||
* \file htdocs/loan/payment/card.php
|
||||
* \ingroup loan
|
||||
* \brief Payment's card of loan
|
||||
*/
|
||||
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/paymentloan.class.php';
|
||||
// require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php';
|
||||
if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load('bills');
|
||||
@ -62,7 +60,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->del
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
header("Location: ".DOL_URL_ROOT."/compta/loan/index.php");
|
||||
header("Location: ".DOL_URL_ROOT."/loan/index.php");
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -122,7 +120,7 @@ $form = new Form($db);
|
||||
|
||||
$h=0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/loan/payment/card.php?id='.$_GET["id"];
|
||||
$head[$h][0] = DOL_URL_ROOT.'/loan/payment/card.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
@ -205,7 +203,7 @@ $sql.= ' WHERE pl.fk_loan = l.rowid';
|
||||
$sql.= ' AND l.entity = '.$conf->entity;
|
||||
$sql.= ' AND pl.rowid = '.$payment->id;
|
||||
|
||||
dol_syslog("compta/loan/payment/card.php", LOG_DEBUG);
|
||||
dol_syslog("loan/payment/card.php", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -16,14 +16,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/loan/payment.php
|
||||
* \file htdocs/loan/payment/payment.php
|
||||
* \ingroup Loan
|
||||
* \brief Page to add payment of a loan
|
||||
*/
|
||||
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/loan/class/paymentloan.class.php';
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load("bills");
|
||||
@ -50,7 +50,7 @@ if ($action == 'add_payment')
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
$loc = DOL_URL_ROOT.'/compta/loan/card.php?id='.$chid;
|
||||
$loc = DOL_URL_ROOT.'/loan/card.php?id='.$chid;
|
||||
header("Location: ".$loc);
|
||||
exit;
|
||||
}
|
||||
@ -132,7 +132,7 @@ if ($action == 'add_payment')
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
$loc = DOL_URL_ROOT.'/compta/loan/card.php?id='.$chid;
|
||||
$loc = DOL_URL_ROOT.'/loan/card.php?id='.$chid;
|
||||
header('Location: '.$loc);
|
||||
exit;
|
||||
}
|
||||
@ -183,7 +183,7 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Loan").'</td>';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/compta/loan/card.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="2">'.dol_print_date($loan->datestart,'day')."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$loan->label."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="2">'.price($loan->capital,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||
Loading…
Reference in New Issue
Block a user