Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop
This commit is contained in:
commit
53f91280c5
2
dev/initdemo/documents_demo/medias/README.txt
Normal file
2
dev/initdemo/documents_demo/medias/README.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# File(s) into root medias directory are provide by Pixabay with Licence "CC0 Creative Commons"
|
||||||
|
# https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
BIN
dev/initdemo/documents_demo/medias/background_sunset.jpg
Normal file
BIN
dev/initdemo/documents_demo/medias/background_sunset.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 360 KiB |
9871
dev/initdemo/mysqldump_dolibarr_7.0.0.sql
Normal file
9871
dev/initdemo/mysqldump_dolibarr_7.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
@ -35,9 +35,6 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
|||||||
// Langs
|
// Langs
|
||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
$page = GETPOST("page");
|
|
||||||
$sortorder = GETPOST("sortorder");
|
|
||||||
$sortfield = GETPOST("sortfield");
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$search_mvt_num = GETPOST('search_mvt_num', 'int');
|
$search_mvt_num = GETPOST('search_mvt_num', 'int');
|
||||||
$search_doc_type = GETPOST("search_doc_type");
|
$search_doc_type = GETPOST("search_doc_type");
|
||||||
@ -49,7 +46,7 @@ $search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmo
|
|||||||
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
||||||
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
|
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
|
||||||
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
||||||
|
//var_dump($search_date_start);exit;
|
||||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||||
$action = 'delbookkeepingyear';
|
$action = 'delbookkeepingyear';
|
||||||
}
|
}
|
||||||
@ -99,10 +96,10 @@ $formaccounting = new FormAccounting($db);
|
|||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page) && ! GETPOST('noreset','int'))
|
if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page','int') == '' && ! GETPOST('noreset','int'))
|
||||||
{
|
{
|
||||||
$query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
$query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
||||||
$query .= " where date_start < now() and date_end > now() limit 1";
|
$query.= " where date_start < '".$this->idate(dol_now())."' and date_end > '".$this->idate(dol_now())."' limit 1";
|
||||||
$res = $db->query($query);
|
$res = $db->query($query);
|
||||||
if ($res->num_rows > 0) {
|
if ($res->num_rows > 0) {
|
||||||
$fiscalYear = $db->fetch_object($res);
|
$fiscalYear = $db->fetch_object($res);
|
||||||
|
|||||||
@ -200,7 +200,7 @@ $sql.= " aa.rowid as aarowid";
|
|||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
$sql.= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
||||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport_det as erd ON er.rowid = erd.fk_expensereport";
|
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport_det as erd ON er.rowid = erd.fk_expensereport";
|
||||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees";
|
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees";
|
||||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."'";
|
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON f.accountancy_code = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."'";
|
||||||
$sql.= " WHERE er.fk_statut > 4 AND erd.fk_code_ventilation <= 0";
|
$sql.= " WHERE er.fk_statut > 4 AND erd.fk_code_ventilation <= 0";
|
||||||
// Add search filter like
|
// Add search filter like
|
||||||
if (strlen(trim($search_expensereport))) {
|
if (strlen(trim($search_expensereport))) {
|
||||||
|
|||||||
@ -225,7 +225,7 @@ if ($result) {
|
|||||||
'accountancy_code' => $compta_user,
|
'accountancy_code' => $compta_user,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Variable bookkeeping
|
// Variable bookkeeping ($obj->rowid is Bank Id)
|
||||||
$tabpay[$obj->rowid]["date"] = $obj->do;
|
$tabpay[$obj->rowid]["date"] = $obj->do;
|
||||||
$tabpay[$obj->rowid]["type_payment"] = $obj->fk_type; // CHQ, VIR, LIQ, CB, ...
|
$tabpay[$obj->rowid]["type_payment"] = $obj->fk_type; // CHQ, VIR, LIQ, CB, ...
|
||||||
$tabpay[$obj->rowid]["ref"] = $obj->label; // By default. Not unique. May be changed later
|
$tabpay[$obj->rowid]["ref"] = $obj->label; // By default. Not unique. May be changed later
|
||||||
@ -1101,7 +1101,7 @@ function getSourceDocRef($val, $typerecord)
|
|||||||
$sqlmid = 'SELECT payd.fk_donation as ref';
|
$sqlmid = 'SELECT payd.fk_donation as ref';
|
||||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "payment_donation as payd";
|
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "payment_donation as payd";
|
||||||
$sqlmid .= " WHERE payd.fk_donation=" . $val["paymentdonationid"];
|
$sqlmid .= " WHERE payd.fk_donation=" . $val["paymentdonationid"];
|
||||||
$ref = $langs->trans("Donation").' ';
|
$ref = $langs->trans("Donation");
|
||||||
}
|
}
|
||||||
elseif ($typerecord == 'payment_various')
|
elseif ($typerecord == 'payment_various')
|
||||||
{
|
{
|
||||||
@ -1129,5 +1129,6 @@ function getSourceDocRef($val, $typerecord)
|
|||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ref = dol_trunc($langs->trans("BankId").' '.$val['fk_bank'].' - '.$ref, 295); // 295 + 3 ... i< < than max size of 300
|
||||||
return $ref;
|
return $ref;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -554,14 +554,15 @@ if (empty($action) || $action == 'view') {
|
|||||||
print '
|
print '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function launch_export() {
|
function launch_export() {
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
|
$("div.fiche form input[name=\"action\"]").val("exportcsv");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche form input[type=\"submit\"]").click();
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
function writebookkeeping() {
|
function writebookkeeping() {
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
|
console.log("click on writebookkeeping");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche form input[type=\"submit\"]").click();
|
||||||
|
$("div.fiche form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
|||||||
@ -709,6 +709,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$("div.fiche form input[name=\"action\"]").val("");
|
$("div.fiche form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
function writebookkeeping() {
|
function writebookkeeping() {
|
||||||
|
console.log("click on writebookkeeping");
|
||||||
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
|
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
|
||||||
$("div.fiche form input[type=\"submit\"]").click();
|
$("div.fiche form input[type=\"submit\"]").click();
|
||||||
$("div.fiche form input[name=\"action\"]").val("");
|
$("div.fiche form input[name=\"action\"]").val("");
|
||||||
|
|||||||
@ -643,6 +643,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$("div.fiche form input[name=\"action\"]").val("");
|
$("div.fiche form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
function writebookkeeping() {
|
function writebookkeeping() {
|
||||||
|
console.log("click on writebookkeeping");
|
||||||
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
|
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
|
||||||
$("div.fiche form input[type=\"submit\"]").click();
|
$("div.fiche form input[type=\"submit\"]").click();
|
||||||
$("div.fiche form input[name=\"action\"]").val("");
|
$("div.fiche form input[name=\"action\"]").val("");
|
||||||
|
|||||||
@ -53,7 +53,7 @@ if ($action == 'updateall')
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
$res1=$res2=$res3=$res4=$res5=$res6=0;
|
$res1=$res2=$res3=$res4=$res5=$res6=0;
|
||||||
$res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha')?0:1, 'chaine', 0, '', $conf->entity);
|
||||||
$res2=dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res2=dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
$res3=dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res3=dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
$res4=dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res4=dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|||||||
@ -528,7 +528,10 @@ class Adherent extends CommonObject
|
|||||||
{
|
{
|
||||||
//var_dump($this->user_login);exit;
|
//var_dump($this->user_login);exit;
|
||||||
//var_dump($this->login);exit;
|
//var_dump($this->login);exit;
|
||||||
$luser->login=$this->login;
|
|
||||||
|
// If option ADHERENT_LOGIN_NOT_REQUIRED is on, there is no login of member, so we do not overwrite user login to keep existing one.
|
||||||
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $luser->login=$this->login;
|
||||||
|
|
||||||
$luser->civility_id=$this->civility_id;
|
$luser->civility_id=$this->civility_id;
|
||||||
$luser->firstname=$this->firstname;
|
$luser->firstname=$this->firstname;
|
||||||
$luser->lastname=$this->lastname;
|
$luser->lastname=$this->lastname;
|
||||||
|
|||||||
@ -186,7 +186,7 @@ foreach($configfileparameters as $key)
|
|||||||
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
|
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
|
||||||
else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
||||||
else print ${$newkey};
|
else print ${$newkey};
|
||||||
if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -389,7 +389,7 @@ foreach($configfileparameters as $key => $value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else print ${$newkey};
|
else print ${$newkey};
|
||||||
if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -768,7 +768,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||||
$sql.= " AND c.entity IN (".getEntity('commande').")";
|
$sql.= " AND c.entity IN (".getEntity('commande').")";
|
||||||
$sql.= " AND c.fk_statut = 1";
|
$sql.= " AND (c.fk_statut = ".Commande::STATUS_VALIDATED." or c.fk_statut = ".Commande::STATUS_SHIPMENTONPROCESS.")";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
$sql.= " ORDER BY c.rowid DESC";
|
$sql.= " ORDER BY c.rowid DESC";
|
||||||
|
|||||||
@ -2227,5 +2227,40 @@ class AccountLine extends CommonObject
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return if a bank line was dispatched into bookkeeping
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, 0=no, 1=yes
|
||||||
|
*/
|
||||||
|
public function getVentilExportCompta()
|
||||||
|
{
|
||||||
|
$alreadydispatched = 0;
|
||||||
|
|
||||||
|
$type = 'bank';
|
||||||
|
|
||||||
|
$sql = " SELECT COUNT(ab.rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='".$type."' AND ab.fk_doc = ".$this->id;
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
if ($obj)
|
||||||
|
{
|
||||||
|
$alreadydispatched = $obj->nb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($alreadydispatched)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -291,7 +291,6 @@ if ($result)
|
|||||||
if ($action == 'delete_categ')
|
if ($action == 'delete_categ')
|
||||||
{
|
{
|
||||||
print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form name="update" method="POST" action="'.$_SERVER['PHP_SELF'].'?rowid='.$rowid.'">';
|
print '<form name="update" method="POST" action="'.$_SERVER['PHP_SELF'].'?rowid='.$rowid.'">';
|
||||||
@ -300,13 +299,14 @@ if ($result)
|
|||||||
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
||||||
print '<input type="hidden" name="id" value="'.$acct->id.'">';
|
print '<input type="hidden" name="id" value="'.$acct->id.'">';
|
||||||
|
|
||||||
dol_fiche_head($tabs, 0, $langs->trans('LineRecord'), 0, 'account');
|
dol_fiche_head($tabs, 0, $langs->trans('LineRecord'), -1, 'account', 0);
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
|
||||||
dol_banner_tab($bankline, 'rowid', $linkback);
|
dol_banner_tab($bankline, 'rowid', $linkback);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
@ -597,6 +597,8 @@ if ($result)
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
@ -618,6 +620,8 @@ if ($result)
|
|||||||
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Conciliation")."</td>";
|
print '<tr><td class="titlefield">'.$langs->trans("Conciliation")."</td>";
|
||||||
@ -656,6 +660,8 @@ if ($result)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||||
|
|||||||
@ -840,8 +840,8 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$object->date = $dateinvoice;
|
$object->date = $dateinvoice;
|
||||||
$object->date_pointoftax = $date_pointoftax;
|
$object->date_pointoftax = $date_pointoftax;
|
||||||
$object->note_public = trim($_POST['note_public']);
|
$object->note_public = trim(GETPOST('note_public','none'));
|
||||||
$object->note = trim($_POST['note']);
|
// We do not copy the private note
|
||||||
$object->ref_client = $_POST['ref_client'];
|
$object->ref_client = $_POST['ref_client'];
|
||||||
$object->ref_int = $_POST['ref_int'];
|
$object->ref_int = $_POST['ref_int'];
|
||||||
$object->modelpdf = $_POST['model'];
|
$object->modelpdf = $_POST['model'];
|
||||||
@ -892,8 +892,8 @@ if (empty($reshook))
|
|||||||
$object->number = $_POST['facnumber'];
|
$object->number = $_POST['facnumber'];
|
||||||
$object->date = $dateinvoice;
|
$object->date = $dateinvoice;
|
||||||
$object->date_pointoftax = $date_pointoftax;
|
$object->date_pointoftax = $date_pointoftax;
|
||||||
$object->note_public = trim($_POST['note_public']);
|
$object->note_public = trim(GETPOST('note_public','none'));
|
||||||
$object->note = trim($_POST['note']);
|
// We do not copy the private note
|
||||||
$object->ref_client = $_POST['ref_client'];
|
$object->ref_client = $_POST['ref_client'];
|
||||||
$object->ref_int = $_POST['ref_int'];
|
$object->ref_int = $_POST['ref_int'];
|
||||||
$object->modelpdf = $_POST['model'];
|
$object->modelpdf = $_POST['model'];
|
||||||
@ -994,8 +994,8 @@ if (empty($reshook))
|
|||||||
$object->number = $_POST['facnumber'];
|
$object->number = $_POST['facnumber'];
|
||||||
$object->date = $dateinvoice;
|
$object->date = $dateinvoice;
|
||||||
$object->date_pointoftax = $date_pointoftax;
|
$object->date_pointoftax = $date_pointoftax;
|
||||||
$object->note_public = trim($_POST['note_public']);
|
$object->note_public = trim(GETPOST('note_public','none'));
|
||||||
$object->note_private = trim($_POST['note_private']);
|
$object->note_private = trim(GETPOST('note_private','none'));
|
||||||
$object->ref_client = $_POST['ref_client'];
|
$object->ref_client = $_POST['ref_client'];
|
||||||
$object->ref_int = $_POST['ref_int'];
|
$object->ref_int = $_POST['ref_int'];
|
||||||
$object->modelpdf = $_POST['model'];
|
$object->modelpdf = $_POST['model'];
|
||||||
@ -1012,9 +1012,9 @@ if (empty($reshook))
|
|||||||
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
|
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
|
||||||
|
|
||||||
// Source facture
|
// Source facture
|
||||||
$object->fac_rec = GETPOST('fac_rec');
|
$object->fac_rec = GETPOST('fac_rec', 'int');
|
||||||
|
|
||||||
$id = $object->create($user); // This include recopy of links from recurring invoice
|
$id = $object->create($user); // This include recopy of links from recurring invoice and invoice lines
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1044,8 +1044,8 @@ if (empty($reshook))
|
|||||||
$object->number = $_POST['facnumber'];
|
$object->number = $_POST['facnumber'];
|
||||||
$object->date = $dateinvoice;
|
$object->date = $dateinvoice;
|
||||||
$object->date_pointoftax = $date_pointoftax;
|
$object->date_pointoftax = $date_pointoftax;
|
||||||
$object->note_public = trim($_POST['note_public']);
|
$object->note_public = trim(GETPOST('note_public','none'));
|
||||||
$object->note_private = trim($_POST['note_private']);
|
$object->note_private = trim(GETPOST('note_private','none'));
|
||||||
$object->ref_client = $_POST['ref_client'];
|
$object->ref_client = $_POST['ref_client'];
|
||||||
$object->ref_int = $_POST['ref_int'];
|
$object->ref_int = $_POST['ref_int'];
|
||||||
$object->modelpdf = $_POST['model'];
|
$object->modelpdf = $_POST['model'];
|
||||||
@ -1905,8 +1905,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Define info_bits
|
// Define info_bits
|
||||||
$info_bits = 0;
|
$info_bits = 0;
|
||||||
if (preg_match('/\*/', $vat_rate))
|
if (preg_match('/\*/', $vat_rate)) $info_bits |= 0x01;
|
||||||
$info_bits |= 0x01;
|
|
||||||
|
|
||||||
// Define vat_rate
|
// Define vat_rate
|
||||||
$vat_rate = str_replace('*', '', $vat_rate);
|
$vat_rate = str_replace('*', '', $vat_rate);
|
||||||
|
|||||||
@ -202,7 +202,7 @@ class FactureRec extends CommonInvoice
|
|||||||
$facsrc->lines[$i]->fk_product,
|
$facsrc->lines[$i]->fk_product,
|
||||||
$facsrc->lines[$i]->remise_percent,
|
$facsrc->lines[$i]->remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
$facsrc->lines[$i]->info_bits,
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
$facsrc->lines[$i]->product_type,
|
$facsrc->lines[$i]->product_type,
|
||||||
@ -596,7 +596,7 @@ class FactureRec extends CommonInvoice
|
|||||||
* @param int $fk_product Id du produit/service predefini
|
* @param int $fk_product Id du produit/service predefini
|
||||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||||
* @param string $price_base_type HT or TTC
|
* @param string $price_base_type HT or TTC
|
||||||
* @param int $info_bits Bits de type de lignes
|
* @param int $info_bits VAT npr or not ?
|
||||||
* @param int $fk_remise_except Id remise
|
* @param int $fk_remise_except Id remise
|
||||||
* @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
|
* @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
|
||||||
* @param int $type Type of line (0=product, 1=service)
|
* @param int $type Type of line (0=product, 1=service)
|
||||||
@ -635,7 +635,6 @@ class FactureRec extends CommonInvoice
|
|||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
if (empty($remise_percent)) $remise_percent=0;
|
if (empty($remise_percent)) $remise_percent=0;
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
if (! $info_bits) $info_bits=0;
|
|
||||||
$pu_ht = price2num($pu_ht);
|
$pu_ht = price2num($pu_ht);
|
||||||
$pu_ttc = price2num($pu_ttc);
|
$pu_ttc = price2num($pu_ttc);
|
||||||
$txtva = price2num($txtva);
|
$txtva = price2num($txtva);
|
||||||
@ -644,6 +643,7 @@ class FactureRec extends CommonInvoice
|
|||||||
if (empty($txtva)) $txtva=0;
|
if (empty($txtva)) $txtva=0;
|
||||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||||
|
if (empty($info_bits)) $info_bits=0;
|
||||||
|
|
||||||
if ($price_base_type=='HT')
|
if ($price_base_type=='HT')
|
||||||
{
|
{
|
||||||
@ -703,6 +703,7 @@ class FactureRec extends CommonInvoice
|
|||||||
$sql.= ", total_localtax1";
|
$sql.= ", total_localtax1";
|
||||||
$sql.= ", total_localtax2";
|
$sql.= ", total_localtax2";
|
||||||
$sql.= ", total_ttc";
|
$sql.= ", total_ttc";
|
||||||
|
$sql.= ", info_bits";
|
||||||
$sql.= ", rang";
|
$sql.= ", rang";
|
||||||
$sql.= ", special_code";
|
$sql.= ", special_code";
|
||||||
$sql.= ", fk_unit";
|
$sql.= ", fk_unit";
|
||||||
@ -729,6 +730,7 @@ class FactureRec extends CommonInvoice
|
|||||||
$sql.= ", ".price2num($total_localtax1);
|
$sql.= ", ".price2num($total_localtax1);
|
||||||
$sql.= ", ".price2num($total_localtax2);
|
$sql.= ", ".price2num($total_localtax2);
|
||||||
$sql.= ", ".price2num($total_ttc);
|
$sql.= ", ".price2num($total_ttc);
|
||||||
|
$sql.= ", ".$info_bits;
|
||||||
$sql.= ", ".$rang;
|
$sql.= ", ".$rang;
|
||||||
$sql.= ", ".$special_code;
|
$sql.= ", ".$special_code;
|
||||||
$sql.= ", ".($fk_unit?"'".$this->db->escape($fk_unit)."'":"null");
|
$sql.= ", ".($fk_unit?"'".$this->db->escape($fk_unit)."'":"null");
|
||||||
@ -811,7 +813,7 @@ class FactureRec extends CommonInvoice
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
if (! $info_bits) $info_bits=0;
|
if (empty($info_bits)) $info_bits=0;
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
$txtva=price2num($txtva);
|
$txtva=price2num($txtva);
|
||||||
@ -884,6 +886,7 @@ class FactureRec extends CommonInvoice
|
|||||||
$sql.= ", total_localtax1='".price2num($total_localtax1)."'";
|
$sql.= ", total_localtax1='".price2num($total_localtax1)."'";
|
||||||
$sql.= ", total_localtax2='".price2num($total_localtax2)."'";
|
$sql.= ", total_localtax2='".price2num($total_localtax2)."'";
|
||||||
$sql.= ", total_ttc='".price2num($total_ttc)."'";
|
$sql.= ", total_ttc='".price2num($total_ttc)."'";
|
||||||
|
$sql.= ", info_bits=".$info_bits;
|
||||||
$sql.= ", rang=".$rang;
|
$sql.= ", rang=".$rang;
|
||||||
$sql.= ", special_code=".$special_code;
|
$sql.= ", special_code=".$special_code;
|
||||||
$sql.= ", fk_unit=".($fk_unit?"'".$this->db->escape($fk_unit)."'":"null");
|
$sql.= ", fk_unit=".($fk_unit?"'".$this->db->escape($fk_unit)."'":"null");
|
||||||
|
|||||||
@ -531,6 +531,7 @@ class Facture extends CommonInvoice
|
|||||||
else dol_print_error($resqlcontact);
|
else dol_print_error($resqlcontact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert lines of invoices into database
|
* Insert lines of invoices into database
|
||||||
*/
|
*/
|
||||||
@ -655,11 +656,20 @@ class Facture extends CommonInvoice
|
|||||||
$prod = new Product($this->db);
|
$prod = new Product($this->db);
|
||||||
$res=$prod->fetch($_facrec->lines[$i]->fk_product);
|
$res=$prod->fetch($_facrec->lines[$i]->fk_product);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For line from template invoice, we use data from template invoice
|
||||||
|
/*
|
||||||
$tva_tx = get_default_tva($mysoc,$soc,$prod->id);
|
$tva_tx = get_default_tva($mysoc,$soc,$prod->id);
|
||||||
$tva_npr = get_default_npr($mysoc,$soc,$prod->id);
|
$tva_npr = get_default_npr($mysoc,$soc,$prod->id);
|
||||||
if (empty($tva_tx)) $tva_npr=0;
|
if (empty($tva_tx)) $tva_npr=0;
|
||||||
$localtax1_tx=get_localtax($tva_tx,1,$soc,$mysoc,$tva_npr);
|
$localtax1_tx=get_localtax($tva_tx,1,$soc,$mysoc,$tva_npr);
|
||||||
$localtax2_tx=get_localtax($tva_tx,2,$soc,$mysoc,$tva_npr);
|
$localtax2_tx=get_localtax($tva_tx,2,$soc,$mysoc,$tva_npr);
|
||||||
|
*/
|
||||||
|
$tva_tx = $_facrec->lines[$i]->tva_tx.($_facrec->lines[$i]->vat_src_code ? '('.$_facrec->lines[$i]->vat_src_code.')' : '');
|
||||||
|
$tva_npr = $_facrec->lines[$i]->info_bits;
|
||||||
|
if (empty($tva_tx)) $tva_npr=0;
|
||||||
|
$localtax1_tx = $_facrec->lines[$i]->localtax1_tx;
|
||||||
|
$localtax2_tx = $_facrec->lines[$i]->localtax2_tx;
|
||||||
|
|
||||||
$result_insert = $this->addline(
|
$result_insert = $this->addline(
|
||||||
$_facrec->lines[$i]->desc,
|
$_facrec->lines[$i]->desc,
|
||||||
@ -670,7 +680,11 @@ class Facture extends CommonInvoice
|
|||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$_facrec->lines[$i]->fk_product,
|
$_facrec->lines[$i]->fk_product,
|
||||||
$_facrec->lines[$i]->remise_percent,
|
$_facrec->lines[$i]->remise_percent,
|
||||||
'','',0,$tva_npr,'','HT',0,
|
'','',0,
|
||||||
|
$tva_npr,
|
||||||
|
'',
|
||||||
|
'HT',
|
||||||
|
0,
|
||||||
$_facrec->lines[$i]->product_type,
|
$_facrec->lines[$i]->product_type,
|
||||||
$_facrec->lines[$i]->rang,
|
$_facrec->lines[$i]->rang,
|
||||||
$_facrec->lines[$i]->special_code,
|
$_facrec->lines[$i]->special_code,
|
||||||
|
|||||||
@ -789,8 +789,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Define info_bits
|
// Define info_bits
|
||||||
$info_bits = 0;
|
$info_bits = 0;
|
||||||
if (preg_match('/\*/', $vat_rate))
|
if (preg_match('/\*/', $vat_rate)) $info_bits |= 0x01;
|
||||||
$info_bits |= 0x01;
|
|
||||||
|
|
||||||
// Define vat_rate
|
// Define vat_rate
|
||||||
$vat_rate = str_replace('*', '', $vat_rate);
|
$vat_rate = str_replace('*', '', $vat_rate);
|
||||||
@ -859,7 +858,8 @@ if (empty($reshook))
|
|||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
||||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) {
|
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min)))
|
||||||
|
{
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -516,20 +516,16 @@ if ($object->id > 0)
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
$numopen = 0; $numclosed = 0;
|
$numopen = 0; $pending = 0; $numclosed = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* Withdrawal opened requests
|
// How many Direct debit opened requests ?
|
||||||
*/
|
|
||||||
|
|
||||||
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande";
|
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande";
|
||||||
$sql .= " , pfd.date_traite as date_traite";
|
$sql .= " , pfd.date_traite as date_traite";
|
||||||
$sql .= " , pfd.amount";
|
$sql .= " , pfd.amount";
|
||||||
$sql .= " , u.rowid as user_id, u.lastname, u.firstname, u.login";
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
|
||||||
$sql .= " WHERE fk_facture = ".$object->id;
|
$sql .= " WHERE fk_facture = ".$object->id;
|
||||||
$sql .= " AND pfd.fk_user_demande = u.rowid";
|
|
||||||
$sql .= " AND pfd.traite = 0";
|
$sql .= " AND pfd.traite = 0";
|
||||||
$sql .= " ORDER BY pfd.date_demande DESC";
|
$sql .= " ORDER BY pfd.date_demande DESC";
|
||||||
|
|
||||||
@ -539,11 +535,34 @@ if ($object->id > 0)
|
|||||||
$num = $db->num_rows($result_sql);
|
$num = $db->num_rows($result_sql);
|
||||||
$numopen = $num;
|
$numopen = $num;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
// For wich amount ?
|
||||||
|
|
||||||
|
$sql = "SELECT SUM(pfd.amount) as amount";
|
||||||
|
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||||
|
$sql .= " WHERE fk_facture = ".$object->id;
|
||||||
|
$sql .= " AND pfd.traite = 0";
|
||||||
|
|
||||||
|
$result_sql = $db->query($sql);
|
||||||
|
if ($result_sql)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($result_sql);
|
||||||
|
if ($obj) $pending = $obj->amount;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buttons
|
* Buttons
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print "\n<div class=\"tabsAction\">\n";
|
print "\n<div class=\"tabsAction\">\n";
|
||||||
|
|
||||||
// Add a transfer request
|
// Add a transfer request
|
||||||
@ -553,11 +572,13 @@ if ($object->id > 0)
|
|||||||
{
|
{
|
||||||
if ($user->rights->prelevement->bons->creer)
|
if ($user->rights->prelevement->bons->creer)
|
||||||
{
|
{
|
||||||
|
$remaintopaylesspendingdebit = $resteapayer - $pending;
|
||||||
|
|
||||||
print '<form method="POST" action="">';
|
print '<form method="POST" action="">';
|
||||||
print '<input type="hidden" name="id" value="' . $object->id . '" />';
|
print '<input type="hidden" name="id" value="' . $object->id . '" />';
|
||||||
print '<input type="hidden" name="action" value="new" />';
|
print '<input type="hidden" name="action" value="new" />';
|
||||||
print '<label for="withdraw_request_amount">' . $langs->trans('WithdrawRequestAmount') . ' </label>';
|
print '<label for="withdraw_request_amount">' . $langs->trans('WithdrawRequestAmount') . ' </label>';
|
||||||
print '<input type="text" id="withdraw_request_amount" name="withdraw_request_amount" value="' . $resteapayer . '" size="10" />';
|
print '<input type="text" id="withdraw_request_amount" name="withdraw_request_amount" value="' . $remaintopaylesspendingdebit . '" size="10" />';
|
||||||
print '<input type="submit" class="butAction" value="'.$langs->trans("MakeWithdrawRequest").'" />';
|
print '<input type="submit" class="butAction" value="'.$langs->trans("MakeWithdrawRequest").'" />';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
@ -604,10 +625,24 @@ if ($object->id > 0)
|
|||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande";
|
||||||
|
$sql.= " , pfd.date_traite as date_traite, pfd.amount,";
|
||||||
|
$sql.= " u.rowid as user_id, u.lastname, u.firstname, u.login";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on pfd.fk_user_demande = u.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_bons as pb ON pb.rowid = pfd.fk_prelevement_bons";
|
||||||
|
$sql.= " WHERE fk_facture = ".$object->id;
|
||||||
|
$sql.= " AND pfd.traite = 0";
|
||||||
|
$sql.= " ORDER BY pfd.date_demande DESC";
|
||||||
|
|
||||||
|
$result_sql = $db->query($sql);
|
||||||
|
|
||||||
|
$num = 0;
|
||||||
if ($result_sql)
|
if ($result_sql)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
|
$num = $db->num_rows($result);
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result_sql);
|
$obj = $db->fetch_object($result_sql);
|
||||||
@ -637,18 +672,16 @@ if ($object->id > 0)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Closed requests
|
|
||||||
|
|
||||||
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande,";
|
// Past requests
|
||||||
$sql.= " pfd.date_traite, pfd.fk_prelevement_bons, pfd.amount,";
|
|
||||||
|
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande, pfd.date_traite, pfd.fk_prelevement_bons, pfd.amount,";
|
||||||
$sql.= " pb.ref,";
|
$sql.= " pb.ref,";
|
||||||
$sql.= " u.rowid as user_id, u.lastname, u.firstname, u.login";
|
$sql.= " u.rowid as user_id, u.lastname, u.firstname, u.login";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_bons as pb,";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on pfd.fk_user_demande = u.rowid";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_bons as pb ON pb.rowid = pfd.fk_prelevement_bons";
|
||||||
$sql.= " WHERE fk_facture = ".$object->id;
|
$sql.= " WHERE fk_facture = ".$object->id;
|
||||||
$sql.= " AND pfd.fk_user_demande = u.rowid";
|
|
||||||
$sql.= " AND pb.rowid = pfd.fk_prelevement_bons";
|
|
||||||
$sql.= " AND pfd.traite = 1";
|
$sql.= " AND pfd.traite = 1";
|
||||||
$sql.= " ORDER BY pfd.date_demande DESC";
|
$sql.= " ORDER BY pfd.date_demande DESC";
|
||||||
|
|
||||||
@ -672,10 +705,13 @@ if ($object->id > 0)
|
|||||||
print '<td align="center">'.price($obj->amount).'</td>';
|
print '<td align="center">'.price($obj->amount).'</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
|
if ($obj->fk_prelevement_bons > 0)
|
||||||
|
{
|
||||||
$withdrawreceipt=new BonPrelevement($db);
|
$withdrawreceipt=new BonPrelevement($db);
|
||||||
$withdrawreceipt->id=$obj->fk_prelevement_bons;
|
$withdrawreceipt->id=$obj->fk_prelevement_bons;
|
||||||
$withdrawreceipt->ref=$obj->ref;
|
$withdrawreceipt->ref=$obj->ref;
|
||||||
print $withdrawreceipt->getNomUrl(1);
|
print $withdrawreceipt->getNomUrl(1);
|
||||||
|
}
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
|||||||
@ -240,13 +240,13 @@ if ($id > 0 || $ref)
|
|||||||
print '<form method="post" name="userfile" action="card.php?id='.$object->id.'" enctype="multipart/form-data">';
|
print '<form method="post" name="userfile" action="card.php?id='.$object->id.'" enctype="multipart/form-data">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="infotrans">';
|
print '<input type="hidden" name="action" value="infotrans">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">'.$langs->trans("NotifyTransmision").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("NotifyTransmision").'</td></tr>';
|
||||||
print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("TransData").'</td><td>';
|
||||||
print $form->select_date('','','','','',"userfile",1,1);
|
print $form->select_date('','','','','',"userfile",1,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("TransMetod").'</td><td>';
|
||||||
print $form->selectarray("methode",$object->methodes_trans);
|
print $form->selectarray("methode",$object->methodes_trans);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
/* print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
/* print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
||||||
@ -256,6 +256,7 @@ if ($id > 0 || $ref)
|
|||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("SetToStatusSent")).'"></div>';
|
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("SetToStatusSent")).'"></div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($object->date_trans) && $object->date_credit == 0 && $user->rights->prelevement->bons->credit && $action=='setcredited')
|
if (! empty($object->date_trans) && $object->date_credit == 0 && $user->rights->prelevement->bons->credit && $action=='setcredited')
|
||||||
@ -263,16 +264,17 @@ if ($id > 0 || $ref)
|
|||||||
print '<form name="infocredit" method="post" action="card.php?id='.$object->id.'">';
|
print '<form name="infocredit" method="post" action="card.php?id='.$object->id.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="infocredit">';
|
print '<input type="hidden" name="action" value="infocredit">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>';
|
||||||
print '<tr '.$bc[false].'><td>'.$langs->trans('CreditDate').'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans('CreditDate').'</td><td>';
|
||||||
print $form->select_date('','','','','',"infocredit",1,1);
|
print $form->select_date('','','','','',"infocredit",1,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice");
|
print '<br>'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice");
|
||||||
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("ClassCredited")).'"></div>';
|
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("ClassCredited")).'"></div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -519,6 +519,9 @@ class BonPrelevement extends CommonObject
|
|||||||
*/
|
*/
|
||||||
if ($error == 0)
|
if ($error == 0)
|
||||||
{
|
{
|
||||||
|
$this->date_credit = $date;
|
||||||
|
$this->statut = 1;
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -590,7 +593,10 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
if ($error == 0)
|
if ($error == 0)
|
||||||
{
|
{
|
||||||
|
$this->date_trans = $date;
|
||||||
|
$this->statut = 1;
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -849,15 +855,22 @@ class BonPrelevement extends CommonObject
|
|||||||
foreach ($factures as $key => $fac)
|
foreach ($factures as $key => $fac)
|
||||||
{
|
{
|
||||||
$fact = new Facture($this->db);
|
$fact = new Facture($this->db);
|
||||||
if ($fact->fetch($fac[0]) >= 0) // Field 0 of $fac is rowid of invoice
|
$resfetch = $fact->fetch($fac[0]);
|
||||||
|
if ($resfetch >= 0) // Field 0 of $fac is rowid of invoice
|
||||||
{
|
{
|
||||||
if ($soc->fetch($fact->socid) >= 0)
|
if ($soc->fetch($fact->socid) >= 0)
|
||||||
{
|
{
|
||||||
$bac = new CompanyBankAccount($this->db);
|
$bac = new CompanyBankAccount($this->db);
|
||||||
$bac->fetch(0, $soc->id);
|
$bac->fetch(0, $soc->id);
|
||||||
|
|
||||||
if ($format == 'FRST' && $bac->frstrecur != 'FRST') continue;
|
if ($format == 'FRST' && $bac->frstrecur != 'FRST')
|
||||||
if ($format == 'RCUR' && ($bac->frstrecur != 'RCUR' && $bac->frstrecur != 'RECUR')) continue;
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($format == 'RCUR' && ($bac->frstrecur != 'RCUR' && $bac->frstrecur != 'RECUR'))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($bac->verif() >= 1)
|
if ($bac->verif() >= 1)
|
||||||
{
|
{
|
||||||
@ -865,28 +878,29 @@ class BonPrelevement extends CommonObject
|
|||||||
/* second tableau necessaire pour BonPrelevement */
|
/* second tableau necessaire pour BonPrelevement */
|
||||||
$factures_prev_id[$i] = $fac[0];
|
$factures_prev_id[$i] = $fac[0];
|
||||||
$i++;
|
$i++;
|
||||||
|
//dol_syslog(__METHOD__."::RIB is ok", LOG_DEBUG);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(__METHOD__."::Check RIB Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_ERR);
|
dol_syslog(__METHOD__."::Check RIB Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_WARNING);
|
||||||
$this->invoice_in_error[$fac[0]]="Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
|
$this->invoice_in_error[$fac[0]]="Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
|
||||||
$this->thirdparty_in_error[$soc->id]="Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
|
$this->thirdparty_in_error[$soc->id]="Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(__METHOD__."::Check RIB Failed to read company", LOG_ERR);
|
dol_syslog(__METHOD__."::Check RIB Failed to read company", LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(__METHOD__."::Check RIB Failed to read invoice", LOG_ERR);
|
dol_syslog(__METHOD__."::Check RIB Failed to read invoice", LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(__METHOD__."::Check RIB No invoice to process", LOG_ERR);
|
dol_syslog(__METHOD__."::Check RIB No invoice to process", LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -72,8 +72,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
elseif ($result == 0)
|
elseif ($result == 0)
|
||||||
{
|
{
|
||||||
$mesg='';
|
$mesg=$langs->trans("NoInvoiceCouldBeWithdrawed", $format);
|
||||||
$mesg=$langs->trans("NoInvoiceCouldBeWithdrawed");
|
|
||||||
setEventMessages($mesg, null, 'errors');
|
setEventMessages($mesg, null, 'errors');
|
||||||
$mesg.='<br>'."\n";
|
$mesg.='<br>'."\n";
|
||||||
foreach($bprev->invoice_in_error as $key => $val)
|
foreach($bprev->invoice_in_error as $key => $val)
|
||||||
|
|||||||
@ -159,7 +159,7 @@ if ($modecompta=="CREANCES-DETTES")
|
|||||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
||||||
$calcmode=$langs->trans("CalcModeDebt");
|
$calcmode=$langs->trans("CalcModeDebt");
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">','</a>').')';
|
if (! empty($conf->accounting->enabled)) $calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">','</a>').')';
|
||||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||||
$description=$langs->trans("RulesResultDue");
|
$description=$langs->trans("RulesResultDue");
|
||||||
@ -173,7 +173,7 @@ elseif ($modecompta=="RECETTES-DEPENSES")
|
|||||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
||||||
$calcmode=$langs->trans("CalcModeEngagement");
|
$calcmode=$langs->trans("CalcModeEngagement");
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">','</a>').')';
|
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">','</a>').')';
|
if (! empty($conf->accounting->enabled)) $calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">','</a>').')';
|
||||||
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
||||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year']+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||||
|
|||||||
@ -121,7 +121,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
||||||
$calcmode=$langs->trans("CalcModeDebt");
|
$calcmode=$langs->trans("CalcModeDebt");
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
if (! empty($conf->accounting->enabled)) $calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear-2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear-2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||||
$description=$langs->trans("RulesAmountWithTaxIncluded");
|
$description=$langs->trans("RulesAmountWithTaxIncluded");
|
||||||
@ -135,7 +135,7 @@ else if ($modecompta=="RECETTES-DEPENSES") {
|
|||||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
||||||
$calcmode=$langs->trans("CalcModeEngagement");
|
$calcmode=$langs->trans("CalcModeEngagement");
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
if (! empty($conf->accounting->enabled)) $calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear-2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear-2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+$nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||||
$description=$langs->trans("RulesAmountWithTaxIncluded");
|
$description=$langs->trans("RulesAmountWithTaxIncluded");
|
||||||
|
|||||||
@ -169,7 +169,7 @@ if ($modecompta=="CREANCES-DETTES")
|
|||||||
$name=$langs->trans("AnnualByAccountDueDebtMode");
|
$name=$langs->trans("AnnualByAccountDueDebtMode");
|
||||||
$calcmode=$langs->trans("CalcModeDebt");
|
$calcmode=$langs->trans("CalcModeDebt");
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$start_year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$start_year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$start_year.'&modecompta=BOOKKEEPING">','</a>').')';
|
if (! empty($conf->accounting->enabled)) $calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$start_year.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||||
$description=$langs->trans("RulesResultDue");
|
$description=$langs->trans("RulesResultDue");
|
||||||
@ -182,7 +182,7 @@ else if ($modecompta=="RECETTES-DEPENSES") {
|
|||||||
$name=$langs->trans("AnnualByAccountInputOutputMode");
|
$name=$langs->trans("AnnualByAccountInputOutputMode");
|
||||||
$calcmode=$langs->trans("CalcModeEngagement");
|
$calcmode=$langs->trans("CalcModeEngagement");
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
|
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=BOOKKEEPING">','</a>').')';
|
if (! empty($conf->accounting->enabled)) $calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||||
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
||||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||||
|
|||||||
@ -338,7 +338,7 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, 0=no, 1=yes
|
* @return int <0 if KO, 0=no, 1=yes
|
||||||
*/
|
*/
|
||||||
function getVentilExportCompta()
|
public function getVentilExportCompta()
|
||||||
{
|
{
|
||||||
$alreadydispatched = 0;
|
$alreadydispatched = 0;
|
||||||
|
|
||||||
|
|||||||
@ -903,7 +903,8 @@ class DoliDBMysqli extends DoliDB
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return charset used to store data in current database (same result than using SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "databasename";)
|
* Return charset used to store data in current database
|
||||||
|
* Note: if we are connected to databasename, it is same result than using SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "databasename";)
|
||||||
*
|
*
|
||||||
* @return string Charset
|
* @return string Charset
|
||||||
* @see getDefaultCollationDatabase
|
* @see getDefaultCollationDatabase
|
||||||
|
|||||||
@ -1494,7 +1494,20 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5);
|
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5);
|
||||||
$morehtmlstatus.=$tmptxt;
|
$morehtmlstatus.=$tmptxt;
|
||||||
}
|
}
|
||||||
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
|
||||||
|
// Add if object was dispatched "into accountancy"
|
||||||
|
if (! empty($conf->accounting->enabled) && in_array($object->element, array('bank', 'facture', 'invoice', 'invoice_supplier', 'expensereport')))
|
||||||
|
{
|
||||||
|
if (method_exists($object, 'getVentilExportCompta'))
|
||||||
|
{
|
||||||
|
$accounted = $object->getVentilExportCompta();
|
||||||
|
$langs->load("accountancy");
|
||||||
|
$morehtmlstatus.='</div><div class="statusref statusrefbis">'.($accounted > 0 ? $langs->trans("Accounted") : $langs->trans("NotYetAccounted"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add alias for thirdparty
|
||||||
|
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>';
|
||||||
|
|
||||||
// Add label
|
// Add label
|
||||||
if ($object->element == 'product' || $object->element == 'bank_account' || $object->element == 'project_task')
|
if ($object->element == 'product' || $object->element == 'bank_account' || $object->element == 'project_task')
|
||||||
@ -5620,10 +5633,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make substition into a text string, replacing keys with vals from $substitutionarray (oldval=>newval).
|
* Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newval).
|
||||||
|
* Texts like __(TranslationKey|langfile)__ and __[ConstantKey]__ are also replaced
|
||||||
*
|
*
|
||||||
* @param string $text Source string in which we must do substitution
|
* @param string $text Source string in which we must do substitution
|
||||||
* @param array $substitutionarray Array with key->val to substitute. Example: array('__MYKEY__' => 'MyVal')
|
* @param array $substitutionarray Array with key->val to substitute. Example: array('__MYKEY__' => 'MyVal', ...)
|
||||||
* @param Translate $outputlangs Output language
|
* @param Translate $outputlangs Output language
|
||||||
* @return string Output string after substitutions
|
* @return string Output string after substitutions
|
||||||
* @see complete_substitutions_array
|
* @see complete_substitutions_array
|
||||||
|
|||||||
@ -13,8 +13,8 @@ insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 9__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'Accountancy', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 2, 51, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 60, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 9__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'Accountancy', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 2, 54, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 110, __ENTITY__);
|
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 110, __ENTITY__);
|
||||||
|
|||||||
@ -164,6 +164,24 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||||||
$menu->add('/compta/index.php?mainmenu=billing&leftmenu=', $langs->trans("MenuFinancial"), 0, $showmode, $atarget, "billing", '', 50, $id, $idsel, $classname);
|
$menu->add('/compta/index.php?mainmenu=billing&leftmenu=', $langs->trans("MenuFinancial"), 0, $showmode, $atarget, "billing", '', 50, $id, $idsel, $classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bank
|
||||||
|
$tmpentry=array('enabled'=>(! empty($conf->banque->enabled) || ! empty($conf->prelevement->enabled)),
|
||||||
|
'perms'=>(! empty($user->rights->banque->lire) || ! empty($user->rights->prelevement->lire)),
|
||||||
|
'module'=>'banque|prelevement');
|
||||||
|
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||||
|
if ($showmode)
|
||||||
|
{
|
||||||
|
$langs->load("compta");
|
||||||
|
$langs->load("banks");
|
||||||
|
|
||||||
|
$classname="";
|
||||||
|
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
||||||
|
else $classname = 'class="tmenu"';
|
||||||
|
$idsel='bank';
|
||||||
|
|
||||||
|
$menu->add('/compta/bank/list.php?mainmenu=bank&leftmenu=', $langs->trans("MenuBankCash"), 0, $showmode, $atarget, "bank", '', 52, $id, $idsel, $classname);
|
||||||
|
}
|
||||||
|
|
||||||
// Accounting
|
// Accounting
|
||||||
$menuqualified=0;
|
$menuqualified=0;
|
||||||
if (! empty($conf->comptabilite->enabled)) $menuqualified++;
|
if (! empty($conf->comptabilite->enabled)) $menuqualified++;
|
||||||
@ -182,26 +200,7 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||||||
else $classname = 'class="tmenu"';
|
else $classname = 'class="tmenu"';
|
||||||
$idsel='accountancy';
|
$idsel='accountancy';
|
||||||
|
|
||||||
$menu->add('/accountancy/index.php?mainmenu=accountancy&leftmenu=', $langs->trans("MenuAccountancy"), 0, $showmode, $atarget, "accountancy", '', 52, $id, $idsel, $classname);
|
$menu->add('/accountancy/index.php?mainmenu=accountancy&leftmenu=', $langs->trans("MenuAccountancy"), 0, $showmode, $atarget, "accountancy", '', 54, $id, $idsel, $classname);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Bank
|
|
||||||
$tmpentry=array('enabled'=>(! empty($conf->banque->enabled) || ! empty($conf->prelevement->enabled)),
|
|
||||||
'perms'=>(! empty($user->rights->banque->lire) || ! empty($user->rights->prelevement->lire)),
|
|
||||||
'module'=>'banque|prelevement');
|
|
||||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
|
||||||
if ($showmode)
|
|
||||||
{
|
|
||||||
$langs->load("compta");
|
|
||||||
$langs->load("banks");
|
|
||||||
|
|
||||||
$classname="";
|
|
||||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
|
||||||
else $classname = 'class="tmenu"';
|
|
||||||
$idsel='bank';
|
|
||||||
|
|
||||||
$menu->add('/compta/bank/list.php?mainmenu=bank&leftmenu=', $langs->trans("MenuBankCash"), 0, $showmode, $atarget, "bank", '', 60, $id, $idsel, $classname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Projects
|
// Projects
|
||||||
|
|||||||
@ -348,6 +348,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88 + $height_incoterms;
|
$tab_top = 88 + $height_incoterms;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -262,6 +262,10 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 95;
|
$tab_top = 95;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -382,6 +382,10 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88 + $height_incoterms;
|
$tab_top = 88 + $height_incoterms;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -211,6 +211,10 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88;
|
$tab_top = 88;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -287,6 +287,10 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88;
|
$tab_top = 88;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -388,6 +388,10 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88 + $height_incoterms;
|
$tab_top = 88 + $height_incoterms;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -314,6 +314,10 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88;
|
$tab_top = 88;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -2326,6 +2326,41 @@ class ExpenseReport extends CommonObject
|
|||||||
else
|
else
|
||||||
return ($this->datevalid?$this->datevalid:$this->date_valid) < ($now - $conf->expensereport->payment->warning_delay);
|
return ($this->datevalid?$this->datevalid:$this->date_valid) < ($now - $conf->expensereport->payment->warning_delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return if an expensereport was dispatched into bookkeeping
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, 0=no, 1=yes
|
||||||
|
*/
|
||||||
|
public function getVentilExportCompta()
|
||||||
|
{
|
||||||
|
$alreadydispatched = 0;
|
||||||
|
|
||||||
|
$type = 'expense_report';
|
||||||
|
|
||||||
|
$sql = " SELECT COUNT(ab.rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='".$type."' AND ab.fk_doc = ".$this->id;
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
if ($obj)
|
||||||
|
{
|
||||||
|
$alreadydispatched = $obj->nb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($alreadydispatched)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -316,7 +316,7 @@ if (empty($reshook))
|
|||||||
$label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
|
$label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
|
||||||
} else {
|
} else {
|
||||||
$prod->fetch($lines[$i]->fk_product);
|
$prod->fetch($lines[$i]->fk_product);
|
||||||
$label .= $lines[$i]->product_label;
|
$label = $lines[$i]->product_label;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($prod->duration_value && $conf->global->FICHINTER_USE_SERVICE_DURATION) {
|
if ($prod->duration_value && $conf->global->FICHINTER_USE_SERVICE_DURATION) {
|
||||||
|
|||||||
@ -81,7 +81,7 @@ $datelivraison=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), G
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'fournisseur', $id, '', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('ordersuppliercard','globalcard'));
|
$hookmanager->initHooks(array('ordersuppliercard','globalcard'));
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $action = GETPOST('action', 'alpha');
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'fournisseur', $id, '', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||||
|
|
||||||
$object = new CommandeFournisseur($db);
|
$object = new CommandeFournisseur($db);
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ $lineid = GETPOST('lineid', 'int');
|
|||||||
$action = GETPOST('action','aZ09');
|
$action = GETPOST('action','aZ09');
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
$result = restrictedArea($user, 'fournisseur', $id, '', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||||
|
|
||||||
if (empty($conf->stock->enabled)) {
|
if (empty($conf->stock->enabled)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@ -54,7 +54,7 @@ $confirm = GETPOST('confirm','alpha');
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'fournisseur', $id, '', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
|
|||||||
@ -56,7 +56,7 @@ $search_agenda_label=GETPOST('search_agenda_label');
|
|||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'fournisseur',$id,'', 'commande');
|
$result=restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||||
|
|
||||||
if (!$user->rights->fournisseur->commande->lire) accessforbidden();
|
if (!$user->rights->fournisseur->commande->lire) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $action = GETPOST('action','aZ09');
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'fournisseur', $id, '', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||||
|
|
||||||
$object = new CommandeFournisseur($db);
|
$object = new CommandeFournisseur($db);
|
||||||
$object->fetch($id, $ref);
|
$object->fetch($id, $ref);
|
||||||
|
|||||||
@ -220,8 +220,8 @@ if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant alrea
|
|||||||
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
||||||
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
||||||
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
||||||
if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE');
|
|
||||||
}
|
}
|
||||||
|
if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE');
|
||||||
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
|
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
|
||||||
// We init log handler for install
|
// We init log handler for install
|
||||||
$handlers = array('mod_syslog_file');
|
$handlers = array('mod_syslog_file');
|
||||||
@ -326,8 +326,8 @@ function conf($dolibarr_main_document_root)
|
|||||||
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
||||||
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
||||||
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
||||||
if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE');
|
|
||||||
}
|
}
|
||||||
|
if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE');
|
||||||
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
|
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
|
||||||
// We init log handler for install
|
// We init log handler for install
|
||||||
$handlers = array('mod_syslog_file');
|
$handlers = array('mod_syslog_file');
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
# Files here are provide by Pixabay with Licence "CC0 Creative Commons"
|
# File(s) into root medias directory are provide by Pixabay with Licence "CC0 Creative Commons"
|
||||||
# https://creativecommons.org/publicdomain/zero/1.0/
|
# https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|||||||
@ -73,47 +73,47 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
|
|||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 12, 'PCG', 'The Moroccan chart of accounts', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 12, 'PCG', 'The Moroccan chart of accounts', 1);
|
||||||
|
|
||||||
-- Description of chart of account BJ SYSCOHADA
|
-- Description of chart of account BJ SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 49,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 49,'SYSCOHADA-BJ', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account BF SYSCOHADA
|
-- Description of chart of account BF SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 60,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 60,'SYSCOHADA-BF', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account CM SYSCOHADA
|
-- Description of chart of account CM SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 24,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 24,'SYSCOHADA-CM', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account CF SYSCOHADA
|
-- Description of chart of account CF SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 65,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 65,'SYSCOHADA-CF', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account KM SYSCOHADA
|
-- Description of chart of account KM SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 71,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 71,'SYSCOHADA-KM', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account CG SYSCOHADA
|
-- Description of chart of account CG SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 72,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 72,'SYSCOHADA-CG', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account CI SYSCOHADA
|
-- Description of chart of account CI SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 21,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 21,'SYSCOHADA-CI', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account GA SYSCOHADA
|
-- Description of chart of account GA SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 16,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 16,'SYSCOHADA-GA', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account GQ SYSCOHADA
|
-- Description of chart of account GQ SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 87,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 87,'SYSCOHADA-GQ', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account ML SYSCOHADA
|
-- Description of chart of account ML SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (147,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (147,'SYSCOHADA-ML', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account NE SYSCOHADA
|
-- Description of chart of account NE SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (168,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (168,'SYSCOHADA-NE', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account CD SYSCOHADA
|
-- Description of chart of account CD SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 73,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 73,'SYSCOHADA-CD', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account SN SYSCOHADA
|
-- Description of chart of account SN SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 22,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 22,'SYSCOHADA-SN', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account TD SYSCOHADA
|
-- Description of chart of account TD SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 66,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 66,'SYSCOHADA-TD', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
-- Description of chart of account TG SYSCOHADA
|
-- Description of chart of account TG SYSCOHADA
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA-TG', 'Plan comptable Ouest-Africain', 1);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- Descriptif plan comptable Suisse
|
-- Descriptif plan comptable Suisse
|
||||||
|
-- ID 13000 - 13299
|
||||||
--
|
--
|
||||||
INSERT INTO llx_const (name, value, type, note, visible, entity) values ('ACCOUNTING_MANAGE_ZERO','1','chaine','Manage the 0 for the accountancy account',1,0);
|
INSERT INTO llx_const (name, value, type, note, visible, entity) values ('ACCOUNTING_MANAGE_ZERO','1','chaine','Manage the 0 for the accountancy account',1,0);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- Descriptif des plans comptables CL PC-MIPYME
|
-- Descriptif des plans comptables CL PC-MIPYME
|
||||||
|
-- ID 4785 - 4999
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES(4785, 'PC-MIPYME', 'Activo', 'Circulante', '1.1', '0', 'Activo Circulante', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES(4785, 'PC-MIPYME', 'Activo', 'Circulante', '1.1', '0', 'Activo Circulante', 1);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- Descriptif des plans comptables ES PCG08-PYME
|
-- Descriptif des plans comptables ES PCG08-PYME
|
||||||
|
-- ID 4000 - 4784
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (4001,'PCG08-PYME','CAPIT', 'XXXXXX', '1', '0', 'Financiación básica', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (4001,'PCG08-PYME','CAPIT', 'XXXXXX', '1', '0', 'Financiación básica', 1);
|
||||||
|
|||||||
@ -26,7 +26,16 @@
|
|||||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||||
-- de l''install et tous les sigles '--' sont supprimés.
|
-- de l''install et tous les sigles '--' sont supprimés.
|
||||||
--
|
--
|
||||||
|
-- ID 0 - 1999
|
||||||
|
-- ID 5000 - 5999
|
||||||
|
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1401,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', '0', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1402,'PCG99-ABREGE','IMMO', 'XXXXXX', '2', '0', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1403,'PCG99-ABREGE','STOCK', 'XXXXXX', '3', '0', 'Stock et commandes en cours d''exécution', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1404,'PCG99-ABREGE','THIRDPARTY', 'XXXXXX', '4', '0', 'Créances et dettes à un an au plus', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1405,'PCG99-ABREGE','FINAN', 'XXXXXX', '5', '0', 'Placement de trésorerie et de valeurs disponibles', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1406,'PCG99-ABREGE','EXPENSE', 'XXXXXX', '6', '0', 'Charges', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1407,'PCG99-ABREGE','INCOME', 'XXXXXX', '7', '0', 'Produits', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 1,'PCG99-ABREGE','CAPIT', 'CAPITAL', '101', '1401', 'Capital', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 1,'PCG99-ABREGE','CAPIT', 'CAPITAL', '101', '1401', 'Capital', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 2,'PCG99-ABREGE','CAPIT', 'XXXXXX', '105', '1401', 'Ecarts de réévaluation', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 2,'PCG99-ABREGE','CAPIT', 'XXXXXX', '105', '1401', 'Ecarts de réévaluation', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 3,'PCG99-ABREGE','CAPIT', 'XXXXXX', ' 1061', '1401', 'Réserve légale', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 3,'PCG99-ABREGE','CAPIT', 'XXXXXX', ' 1061', '1401', 'Réserve légale', 1);
|
||||||
@ -129,18 +138,18 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
|
|||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 100,'PCG99-ABREGE','INCOME', 'XXXXXX', '786', '1407', 'Reprises sur provisions pour risques', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 100,'PCG99-ABREGE','INCOME', 'XXXXXX', '786', '1407', 'Reprises sur provisions pour risques', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 101,'PCG99-ABREGE','INCOME', 'XXXXXX', '787', '1407', 'Reprises sur provisions', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 101,'PCG99-ABREGE','INCOME', 'XXXXXX', '787', '1407', 'Reprises sur provisions', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 102,'PCG99-ABREGE','INCOME', 'XXXXXX', '79', '1407', 'Transferts de charges', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 102,'PCG99-ABREGE','INCOME', 'XXXXXX', '79', '1407', 'Transferts de charges', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1401,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', '0', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1402,'PCG99-ABREGE','IMMO', 'XXXXXX', '2', '0', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1403,'PCG99-ABREGE','STOCK', 'XXXXXX', '3', '0', 'Stock et commandes en cours d''exécution', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1404,'PCG99-ABREGE','THIRDPARTY', 'XXXXXX', '4', '0', 'Créances et dettes à un an au plus', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1405,'PCG99-ABREGE','FINAN', 'XXXXXX', '5', '0', 'Placement de trésorerie et de valeurs disponibles', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1406,'PCG99-ABREGE','EXPENSE', 'XXXXXX', '6', '0', 'Charges', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1407,'PCG99-ABREGE','INCOME', 'XXXXXX', '7', '0', 'Produits', 1);
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Descriptif des plans comptables FR PCG99-BASE
|
-- Descriptif des plans comptables FR PCG99-BASE
|
||||||
--
|
--
|
||||||
|
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1501,'PCG99-BASE','CAPIT', 'XXXXXX', '1', '0', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1502,'PCG99-BASE','IMMO', 'XXXXXX', '2', '0', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1503,'PCG99-BASE','STOCK', 'XXXXXX', '3', '0', 'Stock et commandes en cours d''exécution', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1504,'PCG99-BASE','THIRDPARTY', 'XXXXXX', '4', '0', 'Créances et dettes à un an au plus', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1505,'PCG99-BASE','FINAN', 'XXXXXX', '5', '0', 'Placement de trésorerie et de valeurs disponibles', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1506,'PCG99-BASE','EXPENSE', 'XXXXXX', '6', '0', 'Charges', 1);
|
||||||
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1507,'PCG99-BASE','INCOME', 'XXXXXX', '7', '0', 'Produits', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 103,'PCG99-BASE','CAPIT', 'XXXXXX', '10','1501', 'Capital et réserves', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 103,'PCG99-BASE','CAPIT', 'XXXXXX', '10','1501', 'Capital et réserves', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 104,'PCG99-BASE','CAPIT', 'CAPITAL', '101', '103', 'Capital', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 104,'PCG99-BASE','CAPIT', 'CAPITAL', '101', '103', 'Capital', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 105,'PCG99-BASE','CAPIT', 'XXXXXX', '104', '103', 'Primes liées au capital social', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 105,'PCG99-BASE','CAPIT', 'XXXXXX', '104', '103', 'Primes liées au capital social', 1);
|
||||||
@ -477,13 +486,6 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
|
|||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 436,'PCG99-BASE','INCOME', 'XXXXXX', '791', '435', 'Transferts de charges d''exploitation ', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 436,'PCG99-BASE','INCOME', 'XXXXXX', '791', '435', 'Transferts de charges d''exploitation ', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 437,'PCG99-BASE','INCOME', 'XXXXXX', '796', '435', 'Transferts de charges financières', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 437,'PCG99-BASE','INCOME', 'XXXXXX', '796', '435', 'Transferts de charges financières', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 438,'PCG99-BASE','INCOME', 'XXXXXX', '797', '435', 'Transferts de charges exceptionnelles', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 438,'PCG99-BASE','INCOME', 'XXXXXX', '797', '435', 'Transferts de charges exceptionnelles', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1501,'PCG99-BASE','CAPIT', 'XXXXXX', '1', '0', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1502,'PCG99-BASE','IMMO', 'XXXXXX', '2', '0', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1503,'PCG99-BASE','STOCK', 'XXXXXX', '3', '0', 'Stock et commandes en cours d''exécution', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1504,'PCG99-BASE','THIRDPARTY', 'XXXXXX', '4', '0', 'Créances et dettes à un an au plus', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1505,'PCG99-BASE','FINAN', 'XXXXXX', '5', '0', 'Placement de trésorerie et de valeurs disponibles', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1506,'PCG99-BASE','EXPENSE', 'XXXXXX', '6', '0', 'Charges', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1507,'PCG99-BASE','INCOME', 'XXXXXX', '7', '0', 'Produits', 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,8 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Descriptif des plans comptables UK ENG-BASE id 7xxxx
|
-- Descriptif des plans comptables UK ENG-BASE
|
||||||
|
-- ID 70000 - 79999
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (71501, 'ENG-BASE', 'CAPIT', 'XXXXXX', '1', '0', 'Equity, provisions for liabilities and charges and liabilities at more than one year', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (71501, 'ENG-BASE', 'CAPIT', 'XXXXXX', '1', '0', 'Equity, provisions for liabilities and charges and liabilities at more than one year', 1);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- Descriptif plan comptable LU PCN
|
-- Descriptif plan comptable LU PCN
|
||||||
|
-- ID 11000 - 12999
|
||||||
--
|
--
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (11000,'PCN-LUXEMBURG','CAPIT','XXXXXX','1','','Capital ou dotation des succursales et comptes de l''exploitant','1');
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (11000,'PCN-LUXEMBURG','CAPIT','XXXXXX','1','','Capital ou dotation des succursales et comptes de l''exploitant','1');
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (11001,'PCN-LUXEMBURG','CAPIT','XXXXXX','101',11000,'Capital souscrit (Sociétés de capitaux - Montant total)','1');
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (11001,'PCN-LUXEMBURG','CAPIT','XXXXXX','101',11000,'Capital souscrit (Sociétés de capitaux - Montant total)','1');
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- Descriptif plan comptable fr_MA PCG
|
-- Descriptif plan comptable fr_MA PCG
|
||||||
|
-- ID 7000 - 7999
|
||||||
--
|
--
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7000,'PCG','CAPIT','XXXXXX','1','','Comptes de Financement Permanent','1');
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7000,'PCG','CAPIT','XXXXXX','1','','Comptes de Financement Permanent','1');
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7001,'PCG','CAPIT','XXXXXX','11',7000,'Capitaux Propres','1');
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7001,'PCG','CAPIT','XXXXXX','11',7000,'Capitaux Propres','1');
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- Descriptif plan comptable TN PCT
|
-- Descriptif plan comptable TN PCT
|
||||||
|
-- ID 9000 - 9999
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9000,'PCT','CAPIT','XXXXXX','1','','Comptes de Financement Permanent','1');
|
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9000,'PCT','CAPIT','XXXXXX','1','','Comptes de Financement Permanent','1');
|
||||||
|
|||||||
@ -277,8 +277,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.5','0','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.5','0','VAT super-reduced rate',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '0','0','VAT Rate 0', 1);
|
||||||
|
|
||||||
|
-- SRI LANKA (id country=207)
|
||||||
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2071, 207, '0','0','VAT 0', 1);
|
||||||
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2072, 207, '15','0','VAT 15%', 1);
|
||||||
|
|
||||||
-- TAIWAN (id country=213)
|
-- TAIWAN (id country=213)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2131, 213, '5','0','VAT 5%',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2131, 213, '5','0','VAT 5%',1);
|
||||||
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2132, 213, '0','0','VAT 0', 1);
|
||||||
|
|
||||||
-- TUNISIA (id country=10)
|
-- TUNISIA (id country=10)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active,localtax1,localtax1_type,localtax2,localtax2_type) values (101,10, '6','0','VAT 6%', 1, 1, '4', 0, 0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active,localtax1,localtax1_type,localtax2,localtax2_type) values (101,10, '6','0','VAT 6%', 1, 1, '4', 0, 0);
|
||||||
|
|||||||
@ -343,6 +343,8 @@ CREATE TABLE llx_opensurvey_user_studs (
|
|||||||
tms timestamp
|
tms timestamp
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_sondage ADD COLUMN id_sondage_admin CHAR(24);
|
||||||
|
|
||||||
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_comment (id_comment);
|
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_comment (id_comment);
|
||||||
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_sondage (id_sondage);
|
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_sondage (id_sondage);
|
||||||
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin);
|
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin);
|
||||||
|
|||||||
@ -25,6 +25,11 @@
|
|||||||
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
||||||
|
|
||||||
|
|
||||||
|
-- Must be before the utf8 pagecode fix
|
||||||
|
ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_intra varchar(32) AFTER accountancy_code_sell;
|
||||||
|
ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_export varchar(32) AFTER accountancy_code_sell_intra;
|
||||||
|
|
||||||
|
|
||||||
-- Drop old key with old name
|
-- Drop old key with old name
|
||||||
ALTER TABLE llx_accounting_account DROP FOREIGN KEY fk_accountingaccount_fk_pcg_version;
|
ALTER TABLE llx_accounting_account DROP FOREIGN KEY fk_accountingaccount_fk_pcg_version;
|
||||||
|
|
||||||
@ -53,6 +58,10 @@ ALTER TABLE llx_accounting_account DROP FOREIGN KEY fk_accountingaccount_fk_pcg_
|
|||||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) CHARACTER SET utf8;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) CHARACTER SET utf8;
|
||||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) COLLATE utf8_unicode_ci;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||||
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell_intra VARCHAR(32) CHARACTER SET utf8;
|
||||||
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell_intra VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||||
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell_export VARCHAR(32) CHARACTER SET utf8;
|
||||||
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell_export VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) CHARACTER SET utf8;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) CHARACTER SET utf8;
|
||||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) COLLATE utf8_unicode_ci;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) CHARACTER SET utf8;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) CHARACTER SET utf8;
|
||||||
@ -636,9 +645,6 @@ create table llx_onlinesignature
|
|||||||
-- May have error due to duplicate keys
|
-- May have error due to duplicate keys
|
||||||
ALTER TABLE llx_resource ADD UNIQUE INDEX uk_resource_ref (ref, entity);
|
ALTER TABLE llx_resource ADD UNIQUE INDEX uk_resource_ref (ref, entity);
|
||||||
|
|
||||||
ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_intra varchar(32) AFTER accountancy_code_sell;
|
|
||||||
ALTER TABLE llx_product ADD COLUMN accountancy_code_sell_export varchar(32) AFTER accountancy_code_sell_intra;
|
|
||||||
|
|
||||||
ALTER TABLE llx_facture_rec ADD COLUMN modelpdf varchar(255) AFTER note_public;
|
ALTER TABLE llx_facture_rec ADD COLUMN modelpdf varchar(255) AFTER note_public;
|
||||||
ALTER TABLE llx_facture_rec ADD COLUMN generate_pdf integer DEFAULT 1 AFTER auto_validate;
|
ALTER TABLE llx_facture_rec ADD COLUMN generate_pdf integer DEFAULT 1 AFTER auto_validate;
|
||||||
|
|
||||||
|
|||||||
@ -661,9 +661,10 @@ if (! $error && $db->connected && $action == "set")
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
|
print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
|
||||||
|
|
||||||
|
$newdb->select_db($dolibarr_main_db_name);
|
||||||
$check1=$newdb->getDefaultCharacterSetDatabase();
|
$check1=$newdb->getDefaultCharacterSetDatabase();
|
||||||
$check2=$newdb->getDefaultCollationDatabase();
|
$check2=$newdb->getDefaultCollationDatabase();
|
||||||
dolibarr_install_syslog('step1: note that default server was charset=' . $check1 . ' collation=' . $check2);
|
dolibarr_install_syslog('step1: new database is using charset=' . $check1 . ' collation=' . $check2);
|
||||||
|
|
||||||
// If values differs, we save conf file again
|
// If values differs, we save conf file again
|
||||||
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('step1: value for character_set is not the one asked for database creation', LOG_WARNING);
|
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('step1: value for character_set is not the one asked for database creation', LOG_WARNING);
|
||||||
|
|||||||
@ -25,8 +25,8 @@ Chartofaccounts=Chart of accounts
|
|||||||
CurrentDedicatedAccountingAccount=Current dedicated account
|
CurrentDedicatedAccountingAccount=Current dedicated account
|
||||||
AssignDedicatedAccountingAccount=New account to assign
|
AssignDedicatedAccountingAccount=New account to assign
|
||||||
InvoiceLabel=Invoice label
|
InvoiceLabel=Invoice label
|
||||||
OverviewOfAmountOfLinesNotBound=Overview of amount of lines not bound to accounting account
|
OverviewOfAmountOfLinesNotBound=Overview of amount of lines not bound to an accounting account
|
||||||
OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to accounting account
|
OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to an accounting account
|
||||||
OtherInfo=Other information
|
OtherInfo=Other information
|
||||||
DeleteCptCategory=Remove accounting account from group
|
DeleteCptCategory=Remove accounting account from group
|
||||||
ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group ?
|
ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group ?
|
||||||
@ -173,7 +173,7 @@ DelBookKeeping=Delete record of the Ledger
|
|||||||
FinanceJournal=Finance journal
|
FinanceJournal=Finance journal
|
||||||
ExpenseReportsJournal=Expense reports journal
|
ExpenseReportsJournal=Expense reports journal
|
||||||
DescFinanceJournal=Finance journal including all the types of payments by bank account
|
DescFinanceJournal=Finance journal including all the types of payments by bank account
|
||||||
DescJournalOnlyBindedVisible=This is a view of record that are bound to accounting account and can be recorded into the Ledger.
|
DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Ledger.
|
||||||
VATAccountNotDefined=Account for VAT not defined
|
VATAccountNotDefined=Account for VAT not defined
|
||||||
ThirdpartyAccountNotDefined=Account for third party not defined
|
ThirdpartyAccountNotDefined=Account for third party not defined
|
||||||
ProductAccountNotDefined=Account for product not defined
|
ProductAccountNotDefined=Account for product not defined
|
||||||
@ -224,6 +224,8 @@ GeneralLedgerSomeRecordWasNotRecorded=Some of the transactions could not be disp
|
|||||||
NoNewRecordSaved=No more record to journalize
|
NoNewRecordSaved=No more record to journalize
|
||||||
ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account
|
ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account
|
||||||
ChangeBinding=Change the binding
|
ChangeBinding=Change the binding
|
||||||
|
Accounted=Accounted in ledger
|
||||||
|
NotYetAccounted=Not yet accounted in ledger
|
||||||
|
|
||||||
## Admin
|
## Admin
|
||||||
ApplyMassCategories=Apply mass categories
|
ApplyMassCategories=Apply mass categories
|
||||||
|
|||||||
@ -551,6 +551,8 @@ Module520Desc=Management of loans
|
|||||||
Module600Name=Notifications on business events
|
Module600Name=Notifications on business events
|
||||||
Module600Desc=Send EMail notifications (triggered by some business events) to users (setup defined on each user), to third-party contacts (setup defined on each third party) or to fixed emails
|
Module600Desc=Send EMail notifications (triggered by some business events) to users (setup defined on each user), to third-party contacts (setup defined on each third party) or to fixed emails
|
||||||
Module600Long=Note that this module is dedicated to send real time emails when a dedicated business event occurs. If you are looking for a feature to send reminders by email of your agenda events, go into setup of module Agenda.
|
Module600Long=Note that this module is dedicated to send real time emails when a dedicated business event occurs. If you are looking for a feature to send reminders by email of your agenda events, go into setup of module Agenda.
|
||||||
|
Module610Name=Product Variants
|
||||||
|
Module610Desc=Allows creation of products variant based on attributes (color, size, ...)
|
||||||
Module700Name=Donations
|
Module700Name=Donations
|
||||||
Module700Desc=Donation management
|
Module700Desc=Donation management
|
||||||
Module770Name=Expense reports
|
Module770Name=Expense reports
|
||||||
@ -598,7 +600,7 @@ Module10000Name=Websites
|
|||||||
Module10000Desc=Create public websites with a WYSIWG editor. Just setup your web server (Apache, Nginx, ...) to point to the dedicated Dolibarr directory to have it online on the Internet with your own domain name.
|
Module10000Desc=Create public websites with a WYSIWG editor. Just setup your web server (Apache, Nginx, ...) to point to the dedicated Dolibarr directory to have it online on the Internet with your own domain name.
|
||||||
Module20000Name=Leave Requests management
|
Module20000Name=Leave Requests management
|
||||||
Module20000Desc=Declare and follow employees leaves requests
|
Module20000Desc=Declare and follow employees leaves requests
|
||||||
Module39000Name=Product lot
|
Module39000Name=Products lots
|
||||||
Module39000Desc=Lot or serial number, eat-by and sell-by date management on products
|
Module39000Desc=Lot or serial number, eat-by and sell-by date management on products
|
||||||
Module50000Name=PayBox
|
Module50000Name=PayBox
|
||||||
Module50000Desc=Module to offer an online payment page accepting payments with Credit/Debit card via PayBox. This can be used to allow your customers to make free payments or for a payment on a particular Dolibarr object (invoice, order, ...)
|
Module50000Desc=Module to offer an online payment page accepting payments with Credit/Debit card via PayBox. This can be used to allow your customers to make free payments or for a payment on a particular Dolibarr object (invoice, order, ...)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ LastWithdrawalReceipt=Latest %s direct debit receipts
|
|||||||
MakeWithdrawRequest=Make a direct debit payment request
|
MakeWithdrawRequest=Make a direct debit payment request
|
||||||
WithdrawRequestsDone=%s direct debit payment requests recorded
|
WithdrawRequestsDone=%s direct debit payment requests recorded
|
||||||
ThirdPartyBankCode=Third party bank code
|
ThirdPartyBankCode=Third party bank code
|
||||||
NoInvoiceCouldBeWithdrawed=No invoice withdrawed with success. Check that invoice are on companies with a valid BAN.
|
NoInvoiceCouldBeWithdrawed=No invoice withdrawed with success. Check that invoices are on companies with a valid default BAN and that BAN has a RUM with mode <strong>%s</strong>.
|
||||||
ClassCredited=Classify credited
|
ClassCredited=Classify credited
|
||||||
ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account?
|
ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account?
|
||||||
TransData=Transmission date
|
TransData=Transmission date
|
||||||
|
|||||||
@ -111,7 +111,8 @@ $parameters=array('id'=>$id, 'ref'=>$ref, 'objcanvas'=>$objcanvas);
|
|||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
if ($action == 'addlimitstockwarehouse') {
|
if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer))
|
||||||
|
{
|
||||||
|
|
||||||
$seuil_stock_alerte = GETPOST('seuil_stock_alerte');
|
$seuil_stock_alerte = GETPOST('seuil_stock_alerte');
|
||||||
$desiredstock = GETPOST('desiredstock');
|
$desiredstock = GETPOST('desiredstock');
|
||||||
@ -154,7 +155,7 @@ if ($action == 'addlimitstockwarehouse') {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($action == 'delete_productstockwarehouse')
|
if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->creer))
|
||||||
{
|
{
|
||||||
|
|
||||||
$pse = new ProductStockEntrepot($db);
|
$pse = new ProductStockEntrepot($db);
|
||||||
@ -166,7 +167,7 @@ if($action == 'delete_productstockwarehouse')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set stock limit
|
// Set stock limit
|
||||||
if ($action == 'setseuil_stock_alerte')
|
if ($action == 'setseuil_stock_alerte' && !empty($user->rights->produit->creer))
|
||||||
{
|
{
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
@ -180,7 +181,7 @@ if ($action == 'setseuil_stock_alerte')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set desired stock
|
// Set desired stock
|
||||||
if ($action == 'setdesiredstock')
|
if ($action == 'setdesiredstock' && !empty($user->rights->produit->creer))
|
||||||
{
|
{
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
@ -947,16 +948,24 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
|
|||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
print_titre($langs->trans('AddNewProductStockWarehouse'));
|
print_titre($langs->trans('AddNewProductStockWarehouse'));
|
||||||
|
|
||||||
|
if (!empty($user->rights->produit->creer)){
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="action" value="addlimitstockwarehouse">';
|
print '<input type="hidden" name="action" value="addlimitstockwarehouse">';
|
||||||
print '<input type="hidden" name="id" value="'.GETPOST('id').'">';
|
print '<input type="hidden" name="id" value="'.GETPOST('id').'">';
|
||||||
|
}
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
if (!empty($user->rights->produit->creer)){
|
||||||
print '<tr class="liste_titre"><td width="40%" colspan="4">'.$formproduct->selectWarehouses('', 'fk_entrepot').'</td>';
|
print '<tr class="liste_titre"><td width="40%">'.$formproduct->selectWarehouses('', 'fk_entrepot').'</td>';
|
||||||
print '<td align="right"><input name="seuil_stock_alerte" type="text" placeholder="'.$langs->trans("StockLimit").'" /></td>';
|
print '<td align="right"><input name="seuil_stock_alerte" type="text" placeholder="'.$langs->trans("StockLimit").'" /></td>';
|
||||||
print '<td align="right"><input name="desiredstock" type="text" placeholder="'.$langs->trans("DesiredStock").'" /></td>';
|
print '<td align="right"><input name="desiredstock" type="text" placeholder="'.$langs->trans("DesiredStock").'" /></td>';
|
||||||
print '<td align="right"><input type="submit" value="'.$langs->trans('Save').'" class="button" /></td>';
|
print '<td align="right"><input type="submit" value="'.$langs->trans('Save').'" class="button" /></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
}else{
|
||||||
|
print '<tr class="liste_titre"><td width="40%">'.$langs->trans("Warehouse").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("StockLimit").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("DesiredStock").'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
$pse = new ProductStockEntrepot($db);
|
$pse = new ProductStockEntrepot($db);
|
||||||
$lines = $pse->fetchAll(GETPOST('id'));
|
$lines = $pse->fetchAll(GETPOST('id'));
|
||||||
@ -968,18 +977,22 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
|
|||||||
{
|
{
|
||||||
$ent = new Entrepot($db);
|
$ent = new Entrepot($db);
|
||||||
$ent->fetch($line['fk_entrepot']);
|
$ent->fetch($line['fk_entrepot']);
|
||||||
print '<tr class="oddeven"><td width="40%" colspan="4">'.$ent->getNomUrl(3).'</td>';
|
print '<tr class="oddeven"><td width="40%">'.$ent->getNomUrl(3).'</td>';
|
||||||
print '<td align="right">'.$line['seuil_stock_alerte'].'</td>';
|
print '<td align="right">'.$line['seuil_stock_alerte'].'</td>';
|
||||||
print '<td align="right">'.$line['desiredstock'].'</td>';
|
print '<td align="right">'.$line['desiredstock'].'</td>';
|
||||||
|
if (!empty($user->rights->produit->creer)){
|
||||||
print '<td align="right"><a href="?id='.GETPOST('id').'&fk_productstockwarehouse='.$line['id'].'&action=delete_productstockwarehouse">'.img_delete().'</a></td>';
|
print '<td align="right"><a href="?id='.GETPOST('id').'&fk_productstockwarehouse='.$line['id'].'&action=delete_productstockwarehouse">'.img_delete().'</a></td>';
|
||||||
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
if (!empty($user->rights->produit->creer)){
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -108,9 +108,9 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Visible
|
// Visible
|
||||||
$alwayscheckedmodules=array('barcode','bookmark','categorie','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want
|
$alwayscheckedmodules=array('barcode','bookmark','categorie','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want
|
||||||
$alwaysuncheckedmodules=array('dynamicprices','loan','multicurrency','paybox','paypal','stripe','google','printing','scanner','workflow'); // Module we never want
|
$alwaysuncheckedmodules=array('dynamicprices','incoterm','loan','multicurrency','paybox','paypal','stripe','google','printing','scanner','skype','workflow'); // Module we dont want by default
|
||||||
// Not visible
|
// Not visible
|
||||||
$alwayshiddencheckedmodules=array('accounting','api','barcode','bookmark','clicktodial','comptabilite','cron','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap',
|
$alwayshiddencheckedmodules=array('accounting','api','barcode','blockedlog','bookmark','clicktodial','comptabilite','cron','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap',
|
||||||
'mailmanspip','notification','oauth','syslog','user','webservices',
|
'mailmanspip','notification','oauth','syslog','user','webservices',
|
||||||
// Extended modules
|
// Extended modules
|
||||||
'memcached','numberwords','zipautofillfr');
|
'memcached','numberwords','zipautofillfr');
|
||||||
|
|||||||
@ -123,6 +123,30 @@ $urlko=preg_replace('/&$/','',$urlko); // Remove last &
|
|||||||
|
|
||||||
// Check security token
|
// Check security token
|
||||||
$valid=true;
|
$valid=true;
|
||||||
|
if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
|
||||||
|
{
|
||||||
|
if ($SOURCE && $REF) $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $SOURCE . $REF, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
||||||
|
else $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$token = $conf->global->PAYMENT_SECURITY_TOKEN;
|
||||||
|
}
|
||||||
|
if ($SECUREKEY != $token)
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) $valid=false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility
|
||||||
|
else dol_syslog("Warning: PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is on", LOG_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $valid)
|
||||||
|
{
|
||||||
|
print '<div class="error">Bad value for key.</div>';
|
||||||
|
//print 'SECUREKEY='.$SECUREKEY.' token='.$token.' valid='.$valid;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -230,7 +230,11 @@ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
|
|||||||
{
|
{
|
||||||
$token = $conf->global->PAYMENT_SECURITY_TOKEN;
|
$token = $conf->global->PAYMENT_SECURITY_TOKEN;
|
||||||
}
|
}
|
||||||
if ($SECUREKEY != $token) $valid=false;
|
if ($SECUREKEY != $token)
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) $valid=false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility
|
||||||
|
else dol_syslog("Warning: PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is on", LOG_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
if (! $valid)
|
if (! $valid)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -170,7 +170,11 @@ if (! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
|||||||
{
|
{
|
||||||
$token = $conf->global->PAYPAL_SECURITY_TOKEN;
|
$token = $conf->global->PAYPAL_SECURITY_TOKEN;
|
||||||
}
|
}
|
||||||
if ($SECUREKEY != $token) $valid=false;
|
if ($SECUREKEY != $token)
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) $valid=false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility
|
||||||
|
else dol_syslog("Warning: PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is on", LOG_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
if (! $valid)
|
if (! $valid)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -174,7 +174,11 @@ if (! empty($conf->global->STRIPE_SECURITY_TOKEN))
|
|||||||
{
|
{
|
||||||
$token = $conf->global->STRIPE_SECURITY_TOKEN;
|
$token = $conf->global->STRIPE_SECURITY_TOKEN;
|
||||||
}
|
}
|
||||||
if ($SECUREKEY != $token) $valid=false;
|
if ($SECUREKEY != $token)
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) $valid=false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility
|
||||||
|
else dol_syslog("Warning: PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is on", LOG_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
if (! $valid)
|
if (! $valid)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -539,8 +539,8 @@ if ($search_idprof4 != '') $param.= '&search_idprof4='.urlencode($search_idprof4
|
|||||||
if ($search_idprof5 != '') $param.= '&search_idprof5='.urlencode($search_idprof5);
|
if ($search_idprof5 != '') $param.= '&search_idprof5='.urlencode($search_idprof5);
|
||||||
if ($search_idprof6 != '') $param.= '&search_idprof6='.urlencode($search_idprof6);
|
if ($search_idprof6 != '') $param.= '&search_idprof6='.urlencode($search_idprof6);
|
||||||
if ($search_vat != '') $param.= '&search_vat='.urlencode($search_vat);
|
if ($search_vat != '') $param.= '&search_vat='.urlencode($search_vat);
|
||||||
if ($search_type != '') $param.='&search_type_thirdparty='.urlencode($search_type_thirdparty);
|
if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.urlencode($search_type_thirdparty);
|
||||||
if ($search_type_thirdparty != '') $param.='&search_type='.urlencode($search_type);
|
if ($search_type != '') $param.='&search_type='.urlencode($search_type);
|
||||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||||
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||||
if ($search_stcomm != '') $param.='&search_stcomm='.urlencode($search_stcomm);
|
if ($search_stcomm != '') $param.='&search_stcomm='.urlencode($search_stcomm);
|
||||||
|
|||||||
@ -1025,6 +1025,9 @@ select.selectarrowonleft option {
|
|||||||
div.statusref img {
|
div.statusref img {
|
||||||
padding-right: 3px !important;
|
padding-right: 3px !important;
|
||||||
}
|
}
|
||||||
|
div.statusrefbis {
|
||||||
|
padding-right: 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
input.buttonpayment {
|
input.buttonpayment {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
@ -1332,6 +1335,11 @@ div.statusref img {
|
|||||||
padding-right: 9px;
|
padding-right: 9px;
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
div.statusrefbis {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 9px;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
img.photoref, div.photoref {
|
img.photoref, div.photoref {
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
-webkit-box-shadow: 2px 2px 4px #ccc;
|
-webkit-box-shadow: 2px 2px 4px #ccc;
|
||||||
|
|||||||
@ -1015,6 +1015,9 @@ select.selectarrowonleft option {
|
|||||||
div.statusref img {
|
div.statusref img {
|
||||||
padding-right: 3px !important;
|
padding-right: 3px !important;
|
||||||
}
|
}
|
||||||
|
div.statusrefbis {
|
||||||
|
padding-right: 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
input.buttonpayment {
|
input.buttonpayment {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
@ -1345,6 +1348,11 @@ div.statusref img {
|
|||||||
padding-right: 9px;
|
padding-right: 9px;
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
div.statusrefbis {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 9px;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
img.photoref, div.photoref {
|
img.photoref, div.photoref {
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user