Skip to content

Commit

Permalink
Merge remote-tracking branch 'Upstream/3.9' into 3.9-p5
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Jan 10, 2016
2 parents 47f6317 + bf09800 commit 880a794
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 17 deletions.
1 change: 1 addition & 0 deletions htdocs/comm/index.php
Expand Up @@ -37,6 +37,7 @@
if (! $user->rights->societe->lire) accessforbidden();

$langs->load("commercial");
$langs->load("propal");

$action=GETPOST('action', 'alpha');
$bid=GETPOST('bid', 'int');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/menus/init_menu_auguria.sql
Expand Up @@ -228,8 +228,8 @@ 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->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2721__+MAX_llx_menu__, 'accountancy', '', 2720__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyyear.php', 'ByYear', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 0, __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->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2722__+MAX_llx_menu__, 'accountancy', '', 2720__+MAX_llx_menu__, '/accountancy/bookkeeping/balancebymonth.php', 'AccountBalanceByMonth', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 1, __ENTITY__);
-- Fiscal year & Chart of accounts
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->accounting->enabled', __HANDLER__, 'left', 2750__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'accountancy', '$user->rights->accounting->fiscalyear', '', 2, 20, __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->accounting->enabled', __HANDLER__, 'left', 2751__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'accountancy', '$user->rights->accounting->chartofaccount', '', 2, 21, __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->accounting->enabled', __HANDLER__, 'left', 2750__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '$user->rights->accounting->fiscalyear', '', 2, 20, __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->accounting->enabled', __HANDLER__, 'left', 2751__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 2, 21, __ENTITY__);
-- Check deposit
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __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 ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
Expand Down
2 changes: 2 additions & 0 deletions htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -1010,6 +1010,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
// Setup
if (! empty($conf->accounting->enabled))
{
$langs->load("admin");

$newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy", $langs->trans("Fiscalyear"),0,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
$newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy", $langs->trans("Chartofaccounts"),0,$user->rights->accounting->chartofaccount, '', $mainmenu, 'chartofaccount');
}
Expand Down
6 changes: 4 additions & 2 deletions htdocs/core/modules/dons/html_cerfafr.html
Expand Up @@ -201,7 +201,7 @@
<table width="100%">
<tr align="center">
<td>
__AMOUNT__ <b> euros</b>
<b>__AMOUNT__ euros</b>
</td>
</tr>
</table>
Expand All @@ -215,7 +215,9 @@
Le bénéficiaire certifie sur l’honneur que les dons et versements qu’il reçoit ouvrent droit à la réduction d'impôt prévue à l’article (3) :<br>
<table width="100%">
<tr align="center">
__CodeDon__
<td width="33%">__ARTICLE200__</td>
<td width="33%">__ARTICLE238__</td>
<td width="33%">__ARTICLE885__</td>
</tr>
</table>
<hr>
Expand Down
4 changes: 3 additions & 1 deletion htdocs/core/modules/dons/html_cerfafr.modules.php
Expand Up @@ -146,6 +146,7 @@ function write_file($don,$outputlangs)
$ModePaiement = '<td width="25%"><input type="checkbox"> Remise d\'espèces</td><td width="25%"><input type="checkbox"> Chèque</td><td width="50%"><input type="checkbox"> Virement, prélèvement, carte bancaire</td>';
}

/*
if (empty($don->societe))
{
$CodeDon = '<td width="33%"><input type="checkbox" disabled="true" checked="checked" > 200 du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 238 bis du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 885-0 V bis A du CGI</td>';
Expand All @@ -154,6 +155,7 @@ function write_file($don,$outputlangs)
{
$CodeDon = '<td width="33%"><input type="checkbox" disabled="true" > 200 du CGI</td><td width="33%"><input type="checkbox" disabled="true" checked="checked" > 238 bis du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 885-0 V bis A du CGI</td>';
}
*/

// Define contents
$donmodel=DOL_DOCUMENT_ROOT ."/core/modules/dons/html_cerfafr.html";
Expand Down Expand Up @@ -186,7 +188,7 @@ function write_file($don,$outputlangs)
$form = str_replace('__DonationRecipient__',$outputlangs->trans("DonationRecipient"),$form);
$form = str_replace('__DonationDatePayment__',$outputlangs->trans("DonationDatePayment"),$form);
$form = str_replace('__PaymentMode__',$outputlangs->trans("PaymentMode"),$form);
$form = str_replace('__CodeDon__',$CodeDon,$form);
// $form = str_replace('__CodeDon__',$CodeDon,$form);
$form = str_replace('__Name__',$outputlangs->trans("Name"),$form);
$form = str_replace('__Address__',$outputlangs->trans("Address"),$form);
$form = str_replace('__Zip__',$outputlangs->trans("Zip"),$form);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/holiday/card.php
Expand Up @@ -618,7 +618,7 @@

// From
$expediteur = new User($db);
$expediteur->fetch($cp->fk_validator);
$expediteur->fetch($cp->fk_user_cancel);
$emailFrom = $expediteur->email;

// Subject
Expand Down
11 changes: 5 additions & 6 deletions htdocs/holiday/class/holiday.class.php
Expand Up @@ -817,18 +817,17 @@ function updateConfCP($name,$value) {
}

/**
* Retourne la valeur d'un paramètre de configuration
* Return value of a conf parameterfor leave module
* TODO Move this into llx_const table
*
* @param string $name name du paramètre de configuration
* @param int $fk_type Filter on type
* @return string retourne la valeur du paramètre
* @param string $name name of parameter
* @return string value of parameter
*/
function getConfCP($name, $fk_type=0)
function getConfCP($name)
{
$sql = "SELECT value";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
$sql.= " WHERE name = '".$name."'";
if ($fk_type > 0) $sql.=" AND fk_type = ".$fk_type;

dol_syslog(get_class($this).'::getConfCP name='.$name.'', LOG_DEBUG);
$result = $this->db->query($sql);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/holiday/define_holiday.php
Expand Up @@ -159,7 +159,7 @@
print load_fiche_titre($langs->trans('MenuConfCP'), '', 'title_hrm.png');

print '<div class="info">'.$langs->trans('LastUpdateCP').': '."\n";
$lastUpdate = $holiday->getConfCP('lastUpdate', 0);
$lastUpdate = $holiday->getConfCP('lastUpdate');
if ($lastUpdate)
{
$monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/propal.lang
Expand Up @@ -25,6 +25,7 @@ LastModifiedProposals=Last %s modified proposals
AllPropals=All proposals
LastProposals=Last proposals
SearchAProposal=Search a proposal
NoProposal=No proposal
ProposalsStatistics=Commercial proposal's statistics
NumberOfProposalsByMonth=Number by month
AmountOfProposalsByMonthHT=Amount by month (net of tax)
Expand Down
7 changes: 3 additions & 4 deletions htdocs/user/class/userbankaccount.class.php
Expand Up @@ -133,15 +133,14 @@ function update($user='')
* Load record from database
*
* @param int $id Id of record
* @param int $socid Id of company. If this is filled, function will return the default RIB of company
* @return int <0 if KO, >0 if OK
*/
function fetch($id, $socid=0)
function fetch($id)
{
if (empty($id) && empty($socid)) return -1;
if (empty($id)) return -1;

$sql = "SELECT rowid, fk_user, entity, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,";
$sql.= " owner_address, default_rib, label, datec, tms as datem";
$sql.= " owner_address, label, datec, tms as datem";
$sql.= " FROM ".MAIN_DB_PREFIX."user_rib";
if ($id) $sql.= " WHERE rowid = ".$id;
if ($socid) $sql.= " WHERE fk_user = ".$userid;
Expand Down

0 comments on commit 880a794

Please sign in to comment.