Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into dev_EventOrganizer
This commit is contained in:
commit
60341e8a14
15
.gitattributes
vendored
15
.gitattributes
vendored
@ -11,12 +11,14 @@
|
|||||||
*.htm text eol=lf
|
*.htm text eol=lf
|
||||||
*.html text eol=lf
|
*.html text eol=lf
|
||||||
*.js text eol=lf
|
*.js text eol=lf
|
||||||
|
*.json text eol=lf
|
||||||
*.css text eol=lf
|
*.css text eol=lf
|
||||||
*.lang text eol=lf
|
*.lang text eol=lf
|
||||||
*.txt text eol=lf
|
*.txt text eol=lf
|
||||||
*.md text eol=lf
|
*.md text eol=lf
|
||||||
*.pp text eol=lf
|
*.pp text eol=lf
|
||||||
*.sh text eol=lf
|
*.sh text eol=lf
|
||||||
|
*.yml text eol=lf
|
||||||
*.yaml text eol=lf
|
*.yaml text eol=lf
|
||||||
*.conf text eol=lf
|
*.conf text eol=lf
|
||||||
|
|
||||||
@ -24,15 +26,16 @@
|
|||||||
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
# Denote all files that are truly binary and should not be modified.
|
||||||
*.bmp binary
|
*.bmp binary
|
||||||
*.ico binary
|
|
||||||
*.png binary
|
|
||||||
*.jpg binary
|
|
||||||
*.jpeg binary
|
|
||||||
*.odt binary
|
|
||||||
*.odf binary
|
|
||||||
*.frm binary
|
*.frm binary
|
||||||
|
*.ico binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.jpg binary
|
||||||
*.MYD binary
|
*.MYD binary
|
||||||
*.MYI binary
|
*.MYI binary
|
||||||
|
*.odf binary
|
||||||
|
*.odt binary
|
||||||
|
*.png binary
|
||||||
|
|
||||||
|
|
||||||
# Export ignores to generate clean production tarballs
|
# Export ignores to generate clean production tarballs
|
||||||
/build export-ignore
|
/build export-ignore
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# This script is used by Travis CI to run automatically Continuous test integration
|
# This script is used by Travis CI to run automatically Continuous test integration
|
||||||
# from Dolibarr GitHub repository.
|
# from Dolibarr GitHub repository.
|
||||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||||
|
|
||||||
# We use dist: xenial to have php 5.6+ available
|
# We use dist: xenial to have php 5.6+ available
|
||||||
os: linux
|
os: linux
|
||||||
|
|||||||
@ -10,8 +10,10 @@ For users:
|
|||||||
NEW: Several security issues after a second private bug bounty campaign.
|
NEW: Several security issues after a second private bug bounty campaign.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
---------------
|
---------------
|
||||||
|
* start new module EventOrganization
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -20,6 +22,7 @@ WARNING:
|
|||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
|
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
|
||||||
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
|
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
|
||||||
|
* Field "total" renamed into to "total_ht" for table llx_facture, llx_facture_rec for better field name consistency
|
||||||
* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
||||||
* Field "total" renamed into "total_ttc" for table lx_propal, llx_supplier_proposal for better field name consistency
|
* Field "total" renamed into "total_ttc" for table lx_propal, llx_supplier_proposal for better field name consistency
|
||||||
* If your database is PostgreSql, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
|
* If your database is PostgreSql, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
# Fail2Ban configuration file
|
||||||
|
#
|
||||||
|
# Regexp to catch known spambots and software alike. Please verify
|
||||||
|
# that it is your intent to block IPs which were driven by
|
||||||
|
# above mentioned bots.
|
||||||
|
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
# To test, you can inject this example into log
|
||||||
|
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log
|
||||||
|
#
|
||||||
|
# then
|
||||||
|
# fail2ban-client status web-dol-bruteforce
|
||||||
|
#
|
||||||
|
# To test rule file on a existing log file
|
||||||
|
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf
|
||||||
|
|
||||||
|
failregex = ^ [A-Z\s]+ <HOST>\s+functions_dolibarr::check_user_password_.* Authentication KO
|
||||||
|
ignoreregex =
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
# Fail2Ban configuration file
|
||||||
|
#
|
||||||
|
# Regexp to catch known spambots and software alike. Please verify
|
||||||
|
# that it is your intent to block IPs which were driven by
|
||||||
|
# above mentioned bots.
|
||||||
|
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
# To test, you can inject this example into log
|
||||||
|
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log
|
||||||
|
#
|
||||||
|
# then
|
||||||
|
# fail2ban-client status web-dol-passforgotten
|
||||||
|
#
|
||||||
|
# To test rule file on a existing log file
|
||||||
|
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf
|
||||||
|
|
||||||
|
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/passwordforgotten.php - action=buildnewpassword
|
||||||
|
ignoreregex =
|
||||||
28
dev/setup/fail2ban/jail.local
Normal file
28
dev/setup/fail2ban/jail.local
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#
|
||||||
|
# Examle of rule you can add to fail2ban to restrict bruteforce attacks.
|
||||||
|
#
|
||||||
|
|
||||||
|
[web-dol-passforgotten]
|
||||||
|
|
||||||
|
; rule against call of passwordforgottenpage
|
||||||
|
enabled = true
|
||||||
|
port = http,https
|
||||||
|
filter = web-dolibarr-rulespassforgotten
|
||||||
|
logpath = >> /mypath/documents/documents/dolibarr.log
|
||||||
|
action = %(action_mw)s
|
||||||
|
bantime = 4320000 ; 50 days
|
||||||
|
findtime = 86400 ; 1 day
|
||||||
|
maxretry = 10
|
||||||
|
|
||||||
|
[web-dol-bruteforce]
|
||||||
|
|
||||||
|
; rule against bruteforce hacking (login + api)
|
||||||
|
enabled = true
|
||||||
|
port = http,https
|
||||||
|
filter = web-dolibarr-rulesbruteforce
|
||||||
|
logpath = >> /mypath/documents/documents/dolibarr.log
|
||||||
|
action = %(action_mw)s
|
||||||
|
bantime = 86400 ; 1 day
|
||||||
|
findtime = 3600 ; 1 hour
|
||||||
|
maxretry = 10
|
||||||
|
|
||||||
@ -45,9 +45,14 @@ $search_label = GETPOST('search_label', 'alpha');
|
|||||||
$search_labelshort = GETPOST('search_labelshort', 'alpha');
|
$search_labelshort = GETPOST('search_labelshort', 'alpha');
|
||||||
$search_accountparent = GETPOST('search_accountparent', 'alpha');
|
$search_accountparent = GETPOST('search_accountparent', 'alpha');
|
||||||
$search_pcgtype = GETPOST('search_pcgtype', 'alpha');
|
$search_pcgtype = GETPOST('search_pcgtype', 'alpha');
|
||||||
|
$toselect = GETPOST('toselect', 'array');
|
||||||
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||||
|
|
||||||
|
$permissiontodelete = $user->rights->accounting->chartofaccount;
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -104,7 +109,7 @@ if (!GETPOST('confirmmassaction', 'alpha')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$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 monowraponalldified by some hooks
|
||||||
if ($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
@ -113,7 +118,12 @@ if (empty($reshook)) {
|
|||||||
if (!empty($cancel)) {
|
if (!empty($cancel)) {
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
$objectclass = 'AccountingAccount';
|
||||||
|
$uploaddir = $conf->accounting->multidir_output[$conf->entity];
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
|
if ($action == "delete") {
|
||||||
|
$action = "";
|
||||||
|
}
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
|
||||||
@ -279,6 +289,16 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of mass actions available
|
||||||
|
if ($user->rights->accounting->chartofaccount) {
|
||||||
|
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||||
|
}
|
||||||
|
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
||||||
|
$arrayofmassactions = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
dol_syslog('accountancy/admin/account.php:: $sql='.$sql);
|
dol_syslog('accountancy/admin/account.php:: $sql='.$sql);
|
||||||
@ -338,8 +358,8 @@ if ($resql) {
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
|
$newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
// Box to select active chart of account
|
// Box to select active chart of account
|
||||||
print $langs->trans("Selectchartofaccounts")." : ";
|
print $langs->trans("Selectchartofaccounts")." : ";
|
||||||
@ -376,9 +396,9 @@ if ($resql) {
|
|||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
|
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
$massactionbutton = '';
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
@ -411,34 +431,41 @@ if ($resql) {
|
|||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
}
|
}
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
$searchpicto = $form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
$totalarray = array();
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (!empty($arrayfields['aa.account_number']['checked'])) {
|
if (!empty($arrayfields['aa.account_number']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['aa.label']['checked'])) {
|
if (!empty($arrayfields['aa.label']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"], "aa.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"], "aa.label", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['aa.labelshort']['checked'])) {
|
if (!empty($arrayfields['aa.labelshort']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['aa.account_parent']['checked'])) {
|
if (!empty($arrayfields['aa.account_parent']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['aa.pcg_type']['checked'])) {
|
if (!empty($arrayfields['aa.pcg_type']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1);
|
print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||||
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
|
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['aa.active']['checked'])) {
|
if (!empty($arrayfields['aa.active']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -446,7 +473,6 @@ if ($resql) {
|
|||||||
$accountstatic = new AccountingAccount($db);
|
$accountstatic = new AccountingAccount($db);
|
||||||
$accountparent = new AccountingAccount($db);
|
$accountparent = new AccountingAccount($db);
|
||||||
|
|
||||||
$totalarray = array();
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < min($num, $limit)) {
|
while ($i < min($num, $limit)) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -563,7 +589,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
print '<td class="center">';
|
print '<td class="center nowraponall">';
|
||||||
if ($user->rights->accounting->chartofaccount) {
|
if ($user->rights->accounting->chartofaccount) {
|
||||||
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
@ -572,6 +598,14 @@ if ($resql) {
|
|||||||
print '<a class="marginleftonly" href="./card.php?action=delete&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
print '<a class="marginleftonly" href="./card.php?action=delete&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
print ' ';
|
||||||
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
|
$selected = 0;
|
||||||
|
if (in_array($obj->rowid, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -583,6 +617,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num == 0) {
|
if ($num == 0) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
print '<tr><td colspan="'.$totalarray['nbfield'].'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
print '<tr><td colspan="'.$totalarray['nbfield'].'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -200,7 +200,7 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters</center>
|
||||||
if (isset($this->doc_type)) {
|
if (isset($this->doc_type)) {
|
||||||
$this->doc_type = trim($this->doc_type);
|
$this->doc_type = trim($this->doc_type);
|
||||||
}
|
}
|
||||||
@ -295,7 +295,10 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||||
$sql .= " WHERE doc_type = '".$this->db->escape($this->doc_type)."'";
|
$sql .= " WHERE doc_type = '".$this->db->escape($this->doc_type)."'";
|
||||||
$sql .= " AND fk_doc = ".$this->fk_doc;
|
$sql .= " AND fk_doc = ".$this->fk_doc;
|
||||||
//$sql .= " AND fk_docdet = " . $this->fk_docdet; // This field can be 0 if record is for several lines
|
if (!empty($conf->global->ACCOUNTANCY_ENABLE_FKDOCDET)) {
|
||||||
|
// DO NOT USE THIS IN PRPDUCTION. This will generate a lot of trouble into reports and will corrupt database (by generating duplicate entries.
|
||||||
|
$sql .= " AND fk_docdet = " . $this->fk_docdet; // This field can be 0 if record is for several lines
|
||||||
|
}
|
||||||
$sql .= " AND numero_compte = '".$this->db->escape($this->numero_compte)."'";
|
$sql .= " AND numero_compte = '".$this->db->escape($this->numero_compte)."'";
|
||||||
$sql .= " AND label_operation = '".$this->db->escape($this->label_operation)."'";
|
$sql .= " AND label_operation = '".$this->db->escape($this->label_operation)."'";
|
||||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||||
|
|||||||
@ -244,7 +244,7 @@ if ($mode && !count($data)) {
|
|||||||
if (count($arrayjs) && $mode == 'memberbycountry') {
|
if (count($arrayjs) && $mode == 'memberbycountry') {
|
||||||
$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
if (is_readable($color_file)) {
|
if (is_readable($color_file)) {
|
||||||
include_once $color_file;
|
include $color_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assume we've already included the proper headers so just call our script inline
|
// Assume we've already included the proper headers so just call our script inline
|
||||||
|
|||||||
@ -897,7 +897,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||||||
if (!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)) { // This is a bad practice to activate a synch external access during building of a page. 1 external module can hang the application.
|
if (!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)) { // This is a bad practice to activate a synch external access during building of a page. 1 external module can hang the application.
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
if (!empty($objMod->url_last_version)) {
|
if (!empty($objMod->url_last_version)) {
|
||||||
$newversion = getURLContent($objMod->url_last_version);
|
$newversion = getURLContent($objMod->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
|
||||||
if (isset($newversion['content'])) {
|
if (isset($newversion['content'])) {
|
||||||
if (version_compare($newversion['content'], $versiontrans) > 0) {
|
if (version_compare($newversion['content'], $versiontrans) > 0) {
|
||||||
print " <span class='butAction' title='".$langs->trans('LastStableVersion')."'>".$newversion['content']."</span>";
|
print " <span class='butAction' title='".$langs->trans('LastStableVersion')."'>".$newversion['content']."</span>";
|
||||||
|
|||||||
@ -78,10 +78,10 @@ print '<br>';
|
|||||||
$file_list = array('missing' => array(), 'updated' => array());
|
$file_list = array('missing' => array(), 'updated' => array());
|
||||||
|
|
||||||
// Local file to compare to
|
// Local file to compare to
|
||||||
$xmlshortfile = GETPOST('xmlshortfile', 'alpha') ?GETPOST('xmlshortfile', 'alpha') : '/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT);
|
$xmlshortfile = dol_sanitizeFileName(GETPOST('xmlshortfile', 'alpha') ? GETPOST('xmlshortfile', 'alpha') : 'filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT));
|
||||||
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
|
$xmlfile = DOL_DOCUMENT_ROOT.'/install/'.$xmlshortfile;
|
||||||
// Remote file to compare to
|
// Remote file to compare to
|
||||||
$xmlremote = GETPOST('xmlremote');
|
$xmlremote = GETPOST('xmlremote', 'alphanohtml');
|
||||||
if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) {
|
if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) {
|
||||||
$xmlremote = $conf->global->MAIN_FILECHECK_URL;
|
$xmlremote = $conf->global->MAIN_FILECHECK_URL;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,11 @@ if (empty($xmlremote) && !empty($conf->global->$param)) {
|
|||||||
if (empty($xmlremote)) {
|
if (empty($xmlremote)) {
|
||||||
$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
|
$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
|
||||||
}
|
}
|
||||||
|
if ($xmlremote && !preg_match('/^https?:\/\//', $xmlremote)) {
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessages($langs->trans("ErrorURLMustStartWithHttp", $xmlremote), '', 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
// Test if remote test is ok
|
// Test if remote test is ok
|
||||||
$enableremotecheck = true;
|
$enableremotecheck = true;
|
||||||
@ -147,12 +151,12 @@ if (GETPOST('target') == 'local') {
|
|||||||
}
|
}
|
||||||
$xml = simplexml_load_file($xmlfile);
|
$xml = simplexml_load_file($xmlfile);
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans('XmlNotFound').': '.$xmlfile;
|
print '<div class="warning">'.$langs->trans('XmlNotFound').': '.$xmlfile.'</span>';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (GETPOST('target') == 'remote') {
|
if (GETPOST('target') == 'remote') {
|
||||||
$xmlarray = getURLContent($xmlremote);
|
$xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
|
||||||
|
|
||||||
// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||||
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
@ -74,12 +75,24 @@ print "<strong>PHP disable_functions</strong> = ";
|
|||||||
$arrayoffunctionsdisabled = explode(',', ini_get('disable_functions'));
|
$arrayoffunctionsdisabled = explode(',', ini_get('disable_functions'));
|
||||||
$arrayoffunctionstodisable = explode(',', 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals');
|
$arrayoffunctionstodisable = explode(',', 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals');
|
||||||
$arrayoffunctionstodisable2 = explode(',', 'exec,passthru,shell_exec,system,proc_open,popen');
|
$arrayoffunctionstodisable2 = explode(',', 'exec,passthru,shell_exec,system,proc_open,popen');
|
||||||
print join(', ', $arrayoffunctionsdisabled);
|
$i = 0;
|
||||||
|
foreach ($arrayoffunctionsdisabled as $functionkey) {
|
||||||
|
if ($i > 0) {
|
||||||
|
print ', ';
|
||||||
|
}
|
||||||
|
print '<span class="opacitymedium">'.$functionkey.'</span>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$todisabletext = '';
|
$todisabletext = '';
|
||||||
|
$i = 0;
|
||||||
foreach ($arrayoffunctionstodisable as $functiontodisable) {
|
foreach ($arrayoffunctionstodisable as $functiontodisable) {
|
||||||
if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
|
if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
|
||||||
$todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.$functiontodisable;
|
if ($i > 0) {
|
||||||
|
$todisabletext .= ', ';
|
||||||
|
}
|
||||||
|
$todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' <span class="opacitymedium">'.$functiontodisable.'</span>';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($todisabletext) {
|
if ($todisabletext) {
|
||||||
@ -87,9 +100,14 @@ if ($todisabletext) {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
$todisabletext = '';
|
$todisabletext = '';
|
||||||
|
$i = 0;
|
||||||
foreach ($arrayoffunctionstodisable2 as $functiontodisable) {
|
foreach ($arrayoffunctionstodisable2 as $functiontodisable) {
|
||||||
if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
|
if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
|
||||||
$todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.$functiontodisable;
|
if ($i > 0) {
|
||||||
|
$todisabletext .= ', ';
|
||||||
|
}
|
||||||
|
$todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' <span class="opacitymedium">'.$functiontodisable.'</span>';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($todisabletext) {
|
if ($todisabletext) {
|
||||||
@ -110,6 +128,7 @@ if ($test) {
|
|||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("ConfigurationFile").' ('.$conffile.')', '', 'folder');
|
print load_fiche_titre($langs->trans("ConfigurationFile").' ('.$conffile.')', '', 'folder');
|
||||||
|
|
||||||
@ -131,13 +150,38 @@ print '<strong>'.$langs->trans("dolibarr_main_restrict_ip").'</strong>: '.$dolib
|
|||||||
}*/
|
}*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("PermissionsOnFiles"), '', 'folder');
|
print load_fiche_titre($langs->trans("PermissionsOnFiles"), '', 'folder');
|
||||||
|
|
||||||
print '<strong>'.$langs->trans("PermissionsOnFilesInWebRoot").'</strong>: ';
|
print '<strong>'.$langs->trans("PermissionsOnFilesInWebRoot").'</strong>: ';
|
||||||
// TODO Check permission are read only except for custom dir
|
$arrayoffilesinroot = dol_dir_list(DOL_DOCUMENT_ROOT, 'all', 1, '', array('custom\/'), 'name', SORT_ASC, 4, 1, '', 1);
|
||||||
print 'TODO';
|
$fileswithwritepermission = array();
|
||||||
|
foreach ($arrayoffilesinroot as $fileinroot) {
|
||||||
|
// Test permission on file
|
||||||
|
if ($fileinroot['perm'] & 0222) {
|
||||||
|
$fileswithwritepermission[] = $fileinroot['relativename'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($fileswithwritepermission)) {
|
||||||
|
print img_picto('', 'tick').' '.$langs->trans("NoWritableFilesFoundIntoRootDir");
|
||||||
|
} else {
|
||||||
|
print img_warning().' '.$langs->trans("SomeFilesOrDirInRootAreWritable");
|
||||||
|
print '<br>'.$langs->trans("Example").': ';
|
||||||
|
$i = 0;
|
||||||
|
foreach ($fileswithwritepermission as $filewithwritepermission) {
|
||||||
|
if ($i > 0) {
|
||||||
|
print ', ';
|
||||||
|
}
|
||||||
|
print '<span class="opacitymedium">'.$filewithwritepermission.'</span>';
|
||||||
|
if ($i > 20) {
|
||||||
|
print ' ...';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: '; // $conffile is defined into filefunc.inc.php
|
print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: '; // $conffile is defined into filefunc.inc.php
|
||||||
@ -163,6 +207,7 @@ print '<br>';
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("Modules"), '', 'folder');
|
print load_fiche_titre($langs->trans("Modules"), '', 'folder');
|
||||||
|
|
||||||
@ -172,7 +217,11 @@ $test = empty($conf->syslog->enabled);
|
|||||||
if ($test) {
|
if ($test) {
|
||||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
||||||
} else {
|
} else {
|
||||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedMayExposeInformation", $langs->transnoentities("Syslog"));
|
if ($conf->global->SYSLOG_LEVEL > LOG_NOTICE) {
|
||||||
|
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedMayExposeInformation", $langs->transnoentities("Syslog"));
|
||||||
|
} else {
|
||||||
|
print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), $conf->global->SYSLOG_LEVEL);
|
||||||
|
}
|
||||||
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -188,6 +237,7 @@ if ($test) {
|
|||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("Menu").' '.$langs->trans("SecuritySetup"), '', 'folder');
|
print load_fiche_titre($langs->trans("Menu").' '.$langs->trans("SecuritySetup"), '', 'folder');
|
||||||
@ -199,15 +249,14 @@ if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
|||||||
print '<strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? $langs->trans("Undefined") : $conf->global->MAIN_SECURITY_SALT).'<br>';
|
print '<strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? $langs->trans("Undefined") : $conf->global->MAIN_SECURITY_SALT).'<br>';
|
||||||
}
|
}
|
||||||
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
||||||
print '<span class="opacitymedium">The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.<br>';
|
print '<div class="info">The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.<br>';
|
||||||
print 'If you really want to switch, you must:<br>';
|
print 'If you really want to switch, you must:<br>';
|
||||||
print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'<br>';
|
print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'<br>';
|
||||||
print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password<br>';
|
print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password<br>';
|
||||||
print '- You can now logout and login with this new password. You must now reset password of all other users.<br>';
|
print '- You can now logout and login with this new password. You must now reset password of all other users.<br>';
|
||||||
print '</span><br>';
|
print '</div><br>';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
// TODO
|
|
||||||
|
|
||||||
print '<strong>'.$langs->trans("AntivirusEnabledOnUpload").'</strong>: ';
|
print '<strong>'.$langs->trans("AntivirusEnabledOnUpload").'</strong>: ';
|
||||||
print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? '' : img_picto('', 'tick').' ';
|
print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? '' : img_picto('', 'tick').' ';
|
||||||
@ -225,25 +274,28 @@ print '<br>';
|
|||||||
$securityevent = new Events($db);
|
$securityevent = new Events($db);
|
||||||
$eventstolog = $securityevent->eventstolog;
|
$eventstolog = $securityevent->eventstolog;
|
||||||
|
|
||||||
print '<strong>'.$langs->trans("LogEvents").'</strong>: ';
|
print '<strong>'.$langs->trans("AuditedSecurityEvents").'</strong>: ';
|
||||||
// Loop on each event type
|
if (!empty($eventstolog) && is_array($eventstolog)) {
|
||||||
foreach ($eventstolog as $key => $arr) {
|
// Loop on each event type
|
||||||
if ($arr['id']) {
|
$i = 0;
|
||||||
$key = 'MAIN_LOGEVENTS_'.$arr['id'];
|
foreach ($eventstolog as $key => $arr) {
|
||||||
$value = empty($conf->global->$key) ? '' : $conf->global->$key;
|
if ($arr['id']) {
|
||||||
if ($value) {
|
$key = 'MAIN_LOGEVENTS_'.$arr['id'];
|
||||||
print $key.', ';
|
$value = empty($conf->global->$key) ? '' : $conf->global->$key;
|
||||||
|
if ($value) {
|
||||||
|
if ($i > 0) {
|
||||||
|
print ', ';
|
||||||
|
}
|
||||||
|
print '<span class="opacitymedium">'.$key.'</span>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print img_warning().' '.$langs->trans("NoSecurityEventsAreAduited", $langs->transnoentities("Home").' - '.$langs->transnoentities("Setup").' - '.$langs->transnoentities("Audit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -58,7 +58,11 @@ class Login
|
|||||||
{
|
{
|
||||||
global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;
|
global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;
|
||||||
|
|
||||||
// TODO Remove the API login. The token must be generated from backoffice only.
|
// Is the login API disabled ? The token must be generated from backoffice only.
|
||||||
|
if (! empty($conf->global->API_DISABLE_LOGIN_API)) {
|
||||||
|
dol_syslog("Warning: A try to use the login API has been done while the login API is disabled. You must generate or get the token from the backoffice.", LOG_WARNING);
|
||||||
|
throw new RestException(403, "Error, the login API has been disabled for security purpose. You must generate or get the token from the backoffice.");
|
||||||
|
}
|
||||||
|
|
||||||
// Authentication mode
|
// Authentication mode
|
||||||
if (empty($dolibarr_main_authentication)) {
|
if (empty($dolibarr_main_authentication)) {
|
||||||
@ -87,7 +91,7 @@ class Login
|
|||||||
}
|
}
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
$login = checkLoginPassEntity($login, $password, $entity, $authmode, 'api');
|
$login = checkLoginPassEntity($login, $password, $entity, $authmode, 'api'); // Check credentials.
|
||||||
if (empty($login)) {
|
if (empty($login)) {
|
||||||
throw new RestException(403, 'Access denied');
|
throw new RestException(403, 'Access denied');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1647,8 +1647,8 @@ class Setup extends DolibarrApi
|
|||||||
$file_list = array('missing' => array(), 'updated' => array());
|
$file_list = array('missing' => array(), 'updated' => array());
|
||||||
|
|
||||||
// Local file to compare to
|
// Local file to compare to
|
||||||
$xmlshortfile = GETPOST('xmlshortfile') ?GETPOST('xmlshortfile') : '/install/filelist-'.DOL_VERSION.'.xml';
|
$xmlshortfile = dol_sanitizeFileName(GETPOST('xmlshortfile', 'alpha') ? GETPOST('xmlshortfile', 'alpha') : 'filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT));
|
||||||
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
|
$xmlfile = DOL_DOCUMENT_ROOT.'/install/'.$xmlshortfile;
|
||||||
// Remote file to compare to
|
// Remote file to compare to
|
||||||
$xmlremote = ($target == 'default' ? '' : $target);
|
$xmlremote = ($target == 'default' ? '' : $target);
|
||||||
if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) {
|
if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) {
|
||||||
@ -1661,6 +1661,10 @@ class Setup extends DolibarrApi
|
|||||||
if (empty($xmlremote)) {
|
if (empty($xmlremote)) {
|
||||||
$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
|
$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
|
||||||
}
|
}
|
||||||
|
if ($xmlremote && !preg_match('/^https?:\/\//', $xmlremote)) {
|
||||||
|
$langs->load("errors");
|
||||||
|
throw new RestException(500, $langs->trans("ErrorURLMustStartWithHttp", $xmlremote));
|
||||||
|
}
|
||||||
|
|
||||||
if ($target == 'local') {
|
if ($target == 'local') {
|
||||||
if (dol_is_file($xmlfile)) {
|
if (dol_is_file($xmlfile)) {
|
||||||
@ -1669,7 +1673,7 @@ class Setup extends DolibarrApi
|
|||||||
throw new RestException(500, $langs->trans('XmlNotFound').': '.$xmlfile);
|
throw new RestException(500, $langs->trans('XmlNotFound').': '.$xmlfile);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$xmlarray = getURLContent($xmlremote);
|
$xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
|
||||||
|
|
||||||
// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||||
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
||||||
|
|||||||
@ -579,20 +579,25 @@ class ActionComm extends CommonObject
|
|||||||
// Now insert assigned users
|
// Now insert assigned users
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
//dol_syslog(var_export($this->userassigned, true));
|
//dol_syslog(var_export($this->userassigned, true));
|
||||||
|
$already_inserted = array();
|
||||||
foreach ($this->userassigned as $key => $val) {
|
foreach ($this->userassigned as $key => $val) {
|
||||||
if (!is_array($val)) { // For backward compatibility when val=id
|
if (!is_array($val)) { // For backward compatibility when val=id
|
||||||
$val = array('id'=>$val);
|
$val = array('id'=>$val);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($val['id'] > 0) {
|
if ($val['id'] > 0) {
|
||||||
|
if (!empty($already_inserted[$val['id']])) continue;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||||
$sql .= " VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory']) ? '0' : $val['mandatory']).", ".(empty($val['transparency']) ? '0' : $val['transparency']).", ".(empty($val['answer_status']) ? '0' : $val['answer_status']).")";
|
$sql .= " VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory']) ? '0' : $val['mandatory']).", ".(empty($val['transparency']) ? '0' : $val['transparency']).", ".(empty($val['answer_status']) ? '0' : $val['answer_status']).")";
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
dol_syslog('Error to process userassigned: '.$this->db->lasterror(), LOG_ERR);
|
dol_syslog('Error to process userassigned: ' . $this->db->lasterror(), LOG_ERR);
|
||||||
$this->errors[] = $this->db->lasterror();
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
} else {
|
||||||
|
$already_inserted[$val['id']] = true;
|
||||||
}
|
}
|
||||||
//var_dump($sql);exit;
|
//var_dump($sql);exit;
|
||||||
}
|
}
|
||||||
@ -601,15 +606,20 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
if (!empty($this->socpeopleassigned)) {
|
if (!empty($this->socpeopleassigned)) {
|
||||||
|
$already_inserted = array();
|
||||||
foreach ($this->socpeopleassigned as $id => $val) {
|
foreach ($this->socpeopleassigned as $id => $val) {
|
||||||
|
if (!empty($already_inserted[$val['id']])) continue;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||||
$sql .= " VALUES(".$this->id.", 'socpeople', ".$id.", 0, 0, 0)";
|
$sql .= " VALUES(".$this->id.", 'socpeople', ".$id.", 0, 0, 0)";
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
dol_syslog('Error to process socpeopleassigned: '.$this->db->lasterror(), LOG_ERR);
|
dol_syslog('Error to process socpeopleassigned: ' . $this->db->lasterror(), LOG_ERR);
|
||||||
$this->errors[] = $this->db->lasterror();
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
} else {
|
||||||
|
$already_inserted[$val['id']] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1143,10 +1153,13 @@ class ActionComm extends CommonObject
|
|||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources where fk_actioncomm = ".$this->id." AND element_type = 'user'";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources where fk_actioncomm = ".$this->id." AND element_type = 'user'";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
|
$already_inserted = array();
|
||||||
foreach ($this->userassigned as $key => $val) {
|
foreach ($this->userassigned as $key => $val) {
|
||||||
if (!is_array($val)) { // For backward compatibility when val=id
|
if (!is_array($val)) { // For backward compatibility when val=id
|
||||||
$val = array('id'=>$val);
|
$val = array('id'=>$val);
|
||||||
}
|
}
|
||||||
|
if (!empty($already_inserted[$val['id']])) continue;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||||
$sql .= " VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory']) ? '0' : $val['mandatory']).", ".(empty($val['transparency']) ? '0' : $val['transparency']).", ".(empty($val['answer_status']) ? '0' : $val['answer_status']).")";
|
$sql .= " VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory']) ? '0' : $val['mandatory']).", ".(empty($val['transparency']) ? '0' : $val['transparency']).", ".(empty($val['answer_status']) ? '0' : $val['answer_status']).")";
|
||||||
|
|
||||||
@ -1154,6 +1167,8 @@ class ActionComm extends CommonObject
|
|||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = $this->db->lasterror();
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
} else {
|
||||||
|
$already_inserted[$val['id']] = true;
|
||||||
}
|
}
|
||||||
//var_dump($sql);exit;
|
//var_dump($sql);exit;
|
||||||
}
|
}
|
||||||
@ -1164,7 +1179,10 @@ class ActionComm extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if (!empty($this->socpeopleassigned)) {
|
if (!empty($this->socpeopleassigned)) {
|
||||||
|
$already_inserted = array();
|
||||||
foreach (array_keys($this->socpeopleassigned) as $id) {
|
foreach (array_keys($this->socpeopleassigned) as $id) {
|
||||||
|
if (!empty($already_inserted[$val['id']])) continue;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||||
$sql .= " VALUES(".$this->id.", 'socpeople', ".$id.", 0, 0, 0)";
|
$sql .= " VALUES(".$this->id.", 'socpeople', ".$id.", 0, 0, 0)";
|
||||||
|
|
||||||
@ -1172,6 +1190,8 @@ class ActionComm extends CommonObject
|
|||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = $this->db->lasterror();
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
} else {
|
||||||
|
$already_inserted[$val['id']] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1327,7 +1327,7 @@ $cacheusers = array();
|
|||||||
// Define theme_datacolor array
|
// Define theme_datacolor array
|
||||||
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||||
if (is_readable($color_file)) {
|
if (is_readable($color_file)) {
|
||||||
include_once $color_file;
|
include $color_file;
|
||||||
}
|
}
|
||||||
if (!is_array($theme_datacolor)) {
|
if (!is_array($theme_datacolor)) {
|
||||||
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||||
|
|||||||
@ -742,7 +742,7 @@ $cacheusers = array();
|
|||||||
// Define theme_datacolor array
|
// Define theme_datacolor array
|
||||||
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||||
if (is_readable($color_file)) {
|
if (is_readable($color_file)) {
|
||||||
include_once $color_file;
|
include $color_file;
|
||||||
}
|
}
|
||||||
if (!is_array($theme_datacolor)) {
|
if (!is_array($theme_datacolor)) {
|
||||||
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||||
|
|||||||
@ -765,7 +765,7 @@ $cacheusers = array();
|
|||||||
// Define theme_datacolor array
|
// Define theme_datacolor array
|
||||||
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||||
if (is_readable($color_file)) {
|
if (is_readable($color_file)) {
|
||||||
include_once $color_file;
|
include $color_file;
|
||||||
}
|
}
|
||||||
if (!is_array($theme_datacolor)) {
|
if (!is_array($theme_datacolor)) {
|
||||||
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||||
|
|||||||
@ -1146,8 +1146,8 @@ if ($object->id > 0) {
|
|||||||
*/
|
*/
|
||||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||||
$sql = 'SELECT f.rowid as id, f.titre as ref';
|
$sql = 'SELECT f.rowid as id, f.titre as ref';
|
||||||
$sql .= ', f.total as total_ht';
|
$sql .= ', f.total_ht';
|
||||||
$sql .= ', f.tva as total_tva';
|
$sql .= ', f.total_tva';
|
||||||
$sql .= ', f.total_ttc';
|
$sql .= ', f.total_ttc';
|
||||||
$sql .= ', f.datec as dc';
|
$sql .= ', f.datec as dc';
|
||||||
$sql .= ', f.date_last_gen, f.date_when';
|
$sql .= ', f.date_last_gen, f.date_when';
|
||||||
@ -1158,7 +1158,7 @@ if ($object->id > 0) {
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
|
||||||
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
|
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
|
||||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||||
$sql .= ' GROUP BY f.rowid, f.titre, f.total, f.tva, f.total_ttc,';
|
$sql .= ' GROUP BY f.rowid, f.titre, f.total_ht, f.total_tva, f.total_ttc,';
|
||||||
$sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,';
|
$sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,';
|
||||||
$sql .= ' f.suspended, f.date_when,';
|
$sql .= ' f.suspended, f.date_when,';
|
||||||
$sql .= ' s.nom, s.rowid';
|
$sql .= ' s.nom, s.rowid';
|
||||||
@ -1240,8 +1240,8 @@ if ($object->id > 0) {
|
|||||||
*/
|
*/
|
||||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||||
$sql = 'SELECT f.rowid as facid, f.ref, f.type';
|
$sql = 'SELECT f.rowid as facid, f.ref, f.type';
|
||||||
$sql .= ', f.total as total_ht';
|
$sql .= ', f.total_ht';
|
||||||
$sql .= ', f.tva as total_tva';
|
$sql .= ', f.total_tva';
|
||||||
$sql .= ', f.total_ttc';
|
$sql .= ', f.total_ttc';
|
||||||
$sql .= ', f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as status';
|
$sql .= ', f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as status';
|
||||||
$sql .= ', s.nom, s.rowid as socid';
|
$sql .= ', s.nom, s.rowid as socid';
|
||||||
@ -1250,7 +1250,7 @@ if ($object->id > 0) {
|
|||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON f.rowid=pf.fk_facture';
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON f.rowid=pf.fk_facture';
|
||||||
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
|
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
|
||||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||||
$sql .= ' GROUP BY f.rowid, f.ref, f.type, f.total, f.tva, f.total_ttc,';
|
$sql .= ' GROUP BY f.rowid, f.ref, f.type, f.total_ht, f.total_tva, f.total_ttc,';
|
||||||
$sql .= ' f.datef, f.datec, f.paye, f.fk_statut,';
|
$sql .= ' f.datef, f.datec, f.paye, f.fk_statut,';
|
||||||
$sql .= ' s.nom, s.rowid';
|
$sql .= ' s.nom, s.rowid';
|
||||||
$sql .= " ORDER BY f.datef DESC, f.datec DESC";
|
$sql .= " ORDER BY f.datef DESC, f.datec DESC";
|
||||||
|
|||||||
@ -131,7 +131,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
|
|||||||
@ -131,7 +131,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
|
|||||||
@ -170,7 +170,7 @@ if (($action == 'searchfiles' || $action == 'dl')) {
|
|||||||
if (!empty($sql)) {
|
if (!empty($sql)) {
|
||||||
$sql .= " UNION ALL";
|
$sql .= " UNION ALL";
|
||||||
}
|
}
|
||||||
$sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total as total_ht, t.total_ttc, t.tva as total_vat, t.multicurrency_code as currency, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_CREDIT." as sens";
|
$sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total_ht, t.total_ttc, t.total_tva, t.multicurrency_code as currency, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_CREDIT." as sens";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
|
||||||
$sql .= " WHERE datef between ".$wheretail;
|
$sql .= " WHERE datef between ".$wheretail;
|
||||||
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
|
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
|
||||||
|
|||||||
1
htdocs/compta/bank/various_payment/index.html
Normal file
1
htdocs/compta/bank/various_payment/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
htdocs/compta/cashcontrol/class/index.html
Normal file
1
htdocs/compta/cashcontrol/class/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
htdocs/compta/cashcontrol/index.html
Normal file
1
htdocs/compta/cashcontrol/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -5037,7 +5037,7 @@ if ($action == 'create') {
|
|||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
print '<span class="opacitymedium">';
|
print '<span class="opacitymedium">';
|
||||||
print $langs->trans("Billed");
|
print $langs->trans("Billed");
|
||||||
print '</td><td class="right"><span class="amount">'.price($object->total_ttc).'</span></td><td> </td></tr>';
|
print '</td><td class="right">'.price($object->total_ttc).'</td><td> </td></tr>';
|
||||||
// Remainder to pay
|
// Remainder to pay
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
print '<span class="opacitymedium">';
|
print '<span class="opacitymedium">';
|
||||||
@ -5047,7 +5047,7 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'"><span class="amount">'.price($resteapayeraffiche).'</span></td>';
|
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td>';
|
||||||
print '<td class="nowrap"> </td></tr>';
|
print '<td class="nowrap"> </td></tr>';
|
||||||
|
|
||||||
// Retained warranty : usualy use on construction industry
|
// Retained warranty : usualy use on construction industry
|
||||||
@ -5079,7 +5079,7 @@ if ($action == 'create') {
|
|||||||
print ' :</td><td class="right"><span class="amount">'.price($sign * $totalpaye).'</span></td><td> </td></tr>';
|
print ' :</td><td class="right"><span class="amount">'.price($sign * $totalpaye).'</span></td><td> </td></tr>';
|
||||||
|
|
||||||
// Billed
|
// Billed
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right"><span class="amount">'.price($sign * $object->total_ttc).'</span></td><td> </td></tr>';
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($sign * $object->total_ttc).'</td><td> </td></tr>';
|
||||||
|
|
||||||
// Remainder to pay back
|
// Remainder to pay back
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
@ -5347,8 +5347,7 @@ if ($action == 'create') {
|
|||||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classify 'closed not completely paid' (possible si validee et pas encore classee payee)
|
// Classify 'closed not completely paid' (possible if validated and not yet filed paid)
|
||||||
|
|
||||||
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && $usercanissuepayment) {
|
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && $usercanissuepayment) {
|
||||||
if ($totalpaye > 0 || $totalcreditnotes > 0) {
|
if ($totalpaye > 0 || $totalcreditnotes > 0) {
|
||||||
// If one payment or one credit note was linked to this invoice
|
// If one payment or one credit note was linked to this invoice
|
||||||
|
|||||||
@ -85,9 +85,19 @@ class FactureRec extends CommonInvoice
|
|||||||
public $remise;
|
public $remise;
|
||||||
public $remise_absolue;
|
public $remise_absolue;
|
||||||
public $remise_percent;
|
public $remise_percent;
|
||||||
public $tva;
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @see $total_ht
|
||||||
|
*/
|
||||||
public $total;
|
public $total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @see $total_tva
|
||||||
|
*/
|
||||||
|
public $tva;
|
||||||
|
|
||||||
public $date_last_gen;
|
public $date_last_gen;
|
||||||
public $date_when;
|
public $date_when;
|
||||||
public $nb_gen_done;
|
public $nb_gen_done;
|
||||||
@ -164,10 +174,10 @@ class FactureRec extends CommonInvoice
|
|||||||
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
|
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
|
||||||
//'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
//'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
||||||
//'remise_absolue' =>array('type'=>'double', 'label'=>'Remise absolue', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
//'remise_absolue' =>array('type'=>'double', 'label'=>'Remise absolue', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
||||||
'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>55, 'isameasure'=>1),
|
'total_tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>55, 'isameasure'=>1),
|
||||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'isameasure'=>1),
|
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'isameasure'=>1),
|
||||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>65, 'isameasure'=>1),
|
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>65, 'isameasure'=>1),
|
||||||
'total' =>array('type'=>'double(24,8)', 'label'=>'Total', 'enabled'=>1, 'visible'=>-1, 'position'=>70, 'isameasure'=>1),
|
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total', 'enabled'=>1, 'visible'=>-1, 'position'=>70, 'isameasure'=>1),
|
||||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>75, 'isameasure'=>1),
|
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>75, 'isameasure'=>1),
|
||||||
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
|
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
|
||||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
|
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
|
||||||
@ -502,7 +512,7 @@ class FactureRec extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public function fetch($rowid, $ref = '', $ref_ext = '')
|
public function fetch($rowid, $ref = '', $ref_ext = '')
|
||||||
{
|
{
|
||||||
$sql = 'SELECT f.rowid, f.entity, f.titre as title, f.suspended, f.fk_soc, f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc';
|
$sql = 'SELECT f.rowid, f.entity, f.titre as title, f.suspended, f.fk_soc, f.total_tva, f.localtax1, f.localtax2, f.total_ht, f.total_ttc';
|
||||||
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
|
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
|
||||||
$sql .= ', f.date_lim_reglement as dlr';
|
$sql .= ', f.date_lim_reglement as dlr';
|
||||||
$sql .= ', f.note_private, f.note_public, f.fk_user_author';
|
$sql .= ', f.note_private, f.note_public, f.fk_user_author';
|
||||||
@ -545,8 +555,8 @@ class FactureRec extends CommonInvoice
|
|||||||
$this->remise_percent = $obj->remise_percent;
|
$this->remise_percent = $obj->remise_percent;
|
||||||
$this->remise_absolue = $obj->remise_absolue;
|
$this->remise_absolue = $obj->remise_absolue;
|
||||||
$this->remise = $obj->remise;
|
$this->remise = $obj->remise;
|
||||||
$this->total_ht = $obj->total;
|
$this->total_ht = $obj->total_ht;
|
||||||
$this->total_tva = $obj->tva;
|
$this->total_tva = $obj->total_tva;
|
||||||
$this->total_localtax1 = $obj->localtax1;
|
$this->total_localtax1 = $obj->localtax1;
|
||||||
$this->total_localtax2 = $obj->localtax2;
|
$this->total_localtax2 = $obj->localtax2;
|
||||||
$this->total_ttc = $obj->total_ttc;
|
$this->total_ttc = $obj->total_ttc;
|
||||||
|
|||||||
@ -157,10 +157,17 @@ class Facture extends CommonInvoice
|
|||||||
public $total_ttc = 0;
|
public $total_ttc = 0;
|
||||||
public $revenuestamp;
|
public $revenuestamp;
|
||||||
|
|
||||||
//! Fermeture apres paiement partiel: discount_vat, badcustomer, abandon
|
/**
|
||||||
//! Fermeture alors que aucun paiement: replaced (si remplace), abandon
|
* ! Closing after partial payment: discount_vat, badsupplier, abandon
|
||||||
|
* ! Closing when no payment: replaced, abandoned
|
||||||
|
* @var string Close code
|
||||||
|
*/
|
||||||
public $close_code;
|
public $close_code;
|
||||||
//! Commentaire si mis a paye sans paiement complet
|
|
||||||
|
/**
|
||||||
|
* ! Comment if paid without full payment
|
||||||
|
* @var string Close note
|
||||||
|
*/
|
||||||
public $close_note;
|
public $close_note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -303,8 +310,8 @@ class Facture extends CommonInvoice
|
|||||||
//'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
|
//'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
|
||||||
'close_code' =>array('type'=>'varchar(16)', 'label'=>'EarlyClosingReason', 'enabled'=>1, 'visible'=>-1, 'position'=>92),
|
'close_code' =>array('type'=>'varchar(16)', 'label'=>'EarlyClosingReason', 'enabled'=>1, 'visible'=>-1, 'position'=>92),
|
||||||
'close_note' =>array('type'=>'varchar(128)', 'label'=>'EarlyClosingComment', 'enabled'=>1, 'visible'=>-1, 'position'=>93),
|
'close_note' =>array('type'=>'varchar(128)', 'label'=>'EarlyClosingComment', 'enabled'=>1, 'visible'=>-1, 'position'=>93),
|
||||||
'total' =>array('type'=>'double(24,8)', 'label'=>'AmountHT', 'enabled'=>1, 'visible'=>-1, 'position'=>95, 'isameasure'=>1),
|
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'AmountHT', 'enabled'=>1, 'visible'=>-1, 'position'=>95, 'isameasure'=>1),
|
||||||
'tva' =>array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>100, 'isameasure'=>1),
|
'total_tva' =>array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>100, 'isameasure'=>1),
|
||||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LT1', 'enabled'=>1, 'visible'=>-1, 'position'=>110, 'isameasure'=>1),
|
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LT1', 'enabled'=>1, 'visible'=>-1, 'position'=>110, 'isameasure'=>1),
|
||||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LT2', 'enabled'=>1, 'visible'=>-1, 'position'=>120, 'isameasure'=>1),
|
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LT2', 'enabled'=>1, 'visible'=>-1, 'position'=>120, 'isameasure'=>1),
|
||||||
'revenuestamp' =>array('type'=>'double(24,8)', 'label'=>'RevenueStamp', 'enabled'=>1, 'visible'=>-1, 'position'=>115, 'isameasure'=>1),
|
'revenuestamp' =>array('type'=>'double(24,8)', 'label'=>'RevenueStamp', 'enabled'=>1, 'visible'=>-1, 'position'=>115, 'isameasure'=>1),
|
||||||
@ -1572,7 +1579,7 @@ class Facture extends CommonInvoice
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT f.rowid,f.entity,f.ref,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc';
|
$sql = 'SELECT f.rowid,f.entity,f.ref,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc';
|
||||||
$sql .= ', f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc, f.revenuestamp';
|
$sql .= ', f.total_tva, f.localtax1, f.localtax2, f.total_ht, f.total_ttc, f.revenuestamp';
|
||||||
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
|
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
|
||||||
$sql .= ', f.datef as df, f.date_pointoftax';
|
$sql .= ', f.datef as df, f.date_pointoftax';
|
||||||
$sql .= ', f.date_lim_reglement as dlr';
|
$sql .= ', f.date_lim_reglement as dlr';
|
||||||
@ -1632,8 +1639,8 @@ class Facture extends CommonInvoice
|
|||||||
$this->datem = $this->db->jdate($obj->datem);
|
$this->datem = $this->db->jdate($obj->datem);
|
||||||
$this->remise_percent = $obj->remise_percent;
|
$this->remise_percent = $obj->remise_percent;
|
||||||
$this->remise_absolue = $obj->remise_absolue;
|
$this->remise_absolue = $obj->remise_absolue;
|
||||||
$this->total_ht = $obj->total;
|
$this->total_ht = $obj->total_ht;
|
||||||
$this->total_tva = $obj->tva;
|
$this->total_tva = $obj->total_tva;
|
||||||
$this->total_localtax1 = $obj->localtax1;
|
$this->total_localtax1 = $obj->localtax1;
|
||||||
$this->total_localtax2 = $obj->localtax2;
|
$this->total_localtax2 = $obj->localtax2;
|
||||||
$this->total_ttc = $obj->total_ttc;
|
$this->total_ttc = $obj->total_ttc;
|
||||||
@ -1961,10 +1968,10 @@ class Facture extends CommonInvoice
|
|||||||
$sql .= " remise_absolue=".(isset($this->remise_absolue) ? $this->db->escape($this->remise_absolue) : "null").",";
|
$sql .= " remise_absolue=".(isset($this->remise_absolue) ? $this->db->escape($this->remise_absolue) : "null").",";
|
||||||
$sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").",";
|
$sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").",";
|
||||||
$sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").",";
|
$sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").",";
|
||||||
$sql .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").",";
|
$sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").",";
|
||||||
$sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").",";
|
$sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").",";
|
||||||
$sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").",";
|
$sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").",";
|
||||||
$sql .= " total=".(isset($this->total_ht) ? $this->total_ht : "null").",";
|
$sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").",";
|
||||||
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
|
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
|
||||||
$sql .= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '') ? $this->db->escape($this->revenuestamp) : "null").",";
|
$sql .= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '') ? $this->db->escape($this->revenuestamp) : "null").",";
|
||||||
$sql .= " fk_statut=".(isset($this->statut) ? $this->db->escape($this->statut) : "null").",";
|
$sql .= " fk_statut=".(isset($this->statut) ? $this->db->escape($this->statut) : "null").",";
|
||||||
@ -2237,14 +2244,14 @@ class Facture extends CommonInvoice
|
|||||||
$sql .= ' AND fk_facture_line IS NULL';
|
$sql .= ' AND fk_facture_line IS NULL';
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
// If invoice has consumned discounts
|
// If invoice has consumed discounts
|
||||||
$this->fetch_lines();
|
$this->fetch_lines();
|
||||||
$list_rowid_det = array();
|
$list_rowid_det = array();
|
||||||
foreach ($this->lines as $key => $invoiceline) {
|
foreach ($this->lines as $key => $invoiceline) {
|
||||||
$list_rowid_det[] = $invoiceline->id;
|
$list_rowid_det[] = $invoiceline->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Consumned discounts are freed
|
// Consumed discounts are freed
|
||||||
if (count($list_rowid_det)) {
|
if (count($list_rowid_det)) {
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
||||||
$sql .= ' SET fk_facture = NULL, fk_facture_line = NULL';
|
$sql .= ' SET fk_facture = NULL, fk_facture_line = NULL';
|
||||||
@ -2536,8 +2543,8 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
// On desaffecte de la facture les remises liees
|
// Bound discounts are deducted from the invoice
|
||||||
// car elles n'ont pas ete utilisees vu que la facture est abandonnee.
|
// as they have not been used since the invoice is abandoned.
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
||||||
$sql .= ' SET fk_facture = NULL';
|
$sql .= ' SET fk_facture = NULL';
|
||||||
$sql .= ' WHERE fk_facture = '.$this->id;
|
$sql .= ' WHERE fk_facture = '.$this->id;
|
||||||
@ -3659,7 +3666,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Libere remise liee a ligne de facture
|
// Free discount linked to invoice line
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
||||||
$sql .= ' SET fk_facture_line = NULL';
|
$sql .= ' SET fk_facture_line = NULL';
|
||||||
$sql .= ' WHERE fk_facture_line = '.((int) $rowid);
|
$sql .= ' WHERE fk_facture_line = '.((int) $rowid);
|
||||||
@ -4207,7 +4214,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$clause = " WHERE";
|
$clause = " WHERE";
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut, f.total";
|
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut, f.total_ht";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) {
|
if (!$user->rights->societe->client->voir && !$user->socid) {
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON f.fk_soc = sc.fk_soc";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON f.fk_soc = sc.fk_soc";
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class FactureStats extends Stats
|
|||||||
$object = new Facture($this->db);
|
$object = new Facture($this->db);
|
||||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as f";
|
$this->from = MAIN_DB_PREFIX.$object->table_element." as f";
|
||||||
$this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl";
|
$this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl";
|
||||||
$this->field = 'total';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
}
|
}
|
||||||
if ($mode == 'supplier') {
|
if ($mode == 'supplier') {
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -127,8 +127,8 @@ $permissiontoedit = $user->rights->facture->creer; // Used by the include of act
|
|||||||
$arrayfields = array(
|
$arrayfields = array(
|
||||||
'f.titre'=>array('label'=>"Ref", 'checked'=>1),
|
'f.titre'=>array('label'=>"Ref", 'checked'=>1),
|
||||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
|
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
|
||||||
'f.total'=>array('label'=>"AmountHT", 'checked'=>1),
|
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||||
'f.tva'=>array('label'=>"AmountVAT", 'checked'=>1),
|
'f.total_tva'=>array('label'=>"AmountVAT", 'checked'=>1),
|
||||||
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>1),
|
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>1),
|
||||||
'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0),
|
'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0),
|
||||||
'f.fk_cond_reglement'=>array('label'=>"PaymentTerm", 'checked'=>0),
|
'f.fk_cond_reglement'=>array('label'=>"PaymentTerm", 'checked'=>0),
|
||||||
@ -251,7 +251,7 @@ $today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['
|
|||||||
* List mode
|
* List mode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT s.nom as name, s.rowid as socid, f.rowid as facid, f.titre as title, f.total, f.tva as total_vat, f.total_ttc, f.frequency, f.unit_frequency,";
|
$sql = "SELECT s.nom as name, s.rowid as socid, f.rowid as facid, f.titre as title, f.total_ht, f.total_tva, f.total_ttc, f.frequency, f.unit_frequency,";
|
||||||
$sql .= " f.nb_gen_done, f.nb_gen_max, f.date_last_gen, f.date_when, f.suspended,";
|
$sql .= " f.nb_gen_done, f.nb_gen_max, f.date_last_gen, f.date_when, f.suspended,";
|
||||||
$sql .= " f.datec, f.tms,";
|
$sql .= " f.datec, f.tms,";
|
||||||
$sql .= " f.fk_cond_reglement, f.fk_mode_reglement";
|
$sql .= " f.fk_cond_reglement, f.fk_mode_reglement";
|
||||||
@ -287,10 +287,10 @@ if ($search_societe) {
|
|||||||
$sql .= natural_search('s.nom', $search_societe);
|
$sql .= natural_search('s.nom', $search_societe);
|
||||||
}
|
}
|
||||||
if ($search_montant_ht != '') {
|
if ($search_montant_ht != '') {
|
||||||
$sql .= natural_search('f.total', $search_montant_ht, 1);
|
$sql .= natural_search('f.total_ht', $search_montant_ht, 1);
|
||||||
}
|
}
|
||||||
if ($search_montant_vat != '') {
|
if ($search_montant_vat != '') {
|
||||||
$sql .= natural_search('f.tva', $search_montant_vat, 1);
|
$sql .= natural_search('f.total_tva', $search_montant_vat, 1);
|
||||||
}
|
}
|
||||||
if ($search_montant_ttc != '') {
|
if ($search_montant_ttc != '') {
|
||||||
$sql .= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
$sql .= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||||
@ -455,13 +455,13 @@ if ($resql) {
|
|||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print '<td class="liste_titre left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
print '<td class="liste_titre left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total']['checked'])) {
|
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
||||||
// Amount net
|
// Amount net
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.tva']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
// Amount Vat
|
// Amount Vat
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||||
@ -570,11 +570,11 @@ if ($resql) {
|
|||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total']['checked'])) {
|
if (!empty($arrayfields['f.total_total']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total']['label'], $_SERVER['PHP_SELF'], "f.total", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], "f.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.tva']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.tva']['label'], $_SERVER['PHP_SELF'], "f.tva", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.total_tva']['label'], $_SERVER['PHP_SELF'], "f.total_tva", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_ttc']['checked'])) {
|
if (!empty($arrayfields['f.total_ttc']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
@ -654,25 +654,25 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total']['checked'])) {
|
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
||||||
print '<td class="nowrap right amount">'.price($objp->total).'</td>'."\n";
|
print '<td class="nowrap right amount">'.price($objp->total).'</td>'."\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'f.total';
|
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
|
||||||
}
|
}
|
||||||
$totalarray['val']['f.total'] += $objp->total;
|
$totalarray['val']['f.total_ht'] += $objp->total_ht;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.tva']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
print '<td class="nowrap right amount">'.price($objp->total_vat).'</td>'."\n";
|
print '<td class="nowrap right amount">'.price($objp->total_vat).'</td>'."\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'f.tva';
|
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_tva';
|
||||||
}
|
}
|
||||||
$totalarray['val']['f.tva'] += $objp->total_vat;
|
$totalarray['val']['f.total_tva'] += $objp->total_tva;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_ttc']['checked'])) {
|
if (!empty($arrayfields['f.total_ttc']['checked'])) {
|
||||||
print '<td class="nowrap right amount">'.price($objp->total_ttc).'</td>'."\n";
|
print '<td class="nowrap right amount">'.price($objp->total_ttc).'</td>'."\n";
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2019-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -221,7 +221,7 @@ $arrayfields = array(
|
|||||||
'f.module_source'=>array('label'=>"POSModule", 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>((empty($conf->cashdesk->enabled) && empty($conf->takepos->enabled) && empty($conf->global->INVOICE_SHOW_POS)) ? 0 : 1), 'position'=>90),
|
'f.module_source'=>array('label'=>"POSModule", 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>((empty($conf->cashdesk->enabled) && empty($conf->takepos->enabled) && empty($conf->global->INVOICE_SHOW_POS)) ? 0 : 1), 'position'=>90),
|
||||||
'f.pos_source'=>array('label'=>"POSTerminal", 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>((empty($conf->cashdesk->enabled) && empty($conf->takepos->enabled) && empty($conf->global->INVOICE_SHOW_POS)) ? 0 : 1), 'position'=>91),
|
'f.pos_source'=>array('label'=>"POSTerminal", 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>((empty($conf->cashdesk->enabled) && empty($conf->takepos->enabled) && empty($conf->global->INVOICE_SHOW_POS)) ? 0 : 1), 'position'=>91),
|
||||||
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>95),
|
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>95),
|
||||||
'f.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>100),
|
'f.total_tva'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>100),
|
||||||
'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax1_assuj == "1"), 'position'=>110),
|
'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax1_assuj == "1"), 'position'=>110),
|
||||||
'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax2_assuj == "1"), 'position'=>120),
|
'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax2_assuj == "1"), 'position'=>120),
|
||||||
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>130),
|
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>130),
|
||||||
@ -473,7 +473,7 @@ $sql = 'SELECT';
|
|||||||
if ($sall || $search_product_category > 0 || $search_user > 0) {
|
if ($sall || $search_product_category > 0 || $search_user > 0) {
|
||||||
$sql = 'SELECT DISTINCT';
|
$sql = 'SELECT DISTINCT';
|
||||||
}
|
}
|
||||||
$sql .= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
$sql .= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,';
|
||||||
$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
|
$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
|
||||||
$sql .= ' f.fk_user_author,';
|
$sql .= ' f.fk_user_author,';
|
||||||
$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,';
|
$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,';
|
||||||
@ -602,10 +602,10 @@ if ($search_company_alias) {
|
|||||||
$sql .= natural_search('s.name_alias', $search_company_alias);
|
$sql .= natural_search('s.name_alias', $search_company_alias);
|
||||||
}
|
}
|
||||||
if ($search_montant_ht != '') {
|
if ($search_montant_ht != '') {
|
||||||
$sql .= natural_search('f.total', $search_montant_ht, 1);
|
$sql .= natural_search('f.total_ht', $search_montant_ht, 1);
|
||||||
}
|
}
|
||||||
if ($search_montant_vat != '') {
|
if ($search_montant_vat != '') {
|
||||||
$sql .= natural_search('f.tva', $search_montant_vat, 1);
|
$sql .= natural_search('f.total_tva', $search_montant_vat, 1);
|
||||||
}
|
}
|
||||||
if ($search_montant_localtax1 != '') {
|
if ($search_montant_localtax1 != '') {
|
||||||
$sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
$sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
||||||
@ -706,7 +706,7 @@ $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // No
|
|||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
if (!$sall) {
|
if (!$sall) {
|
||||||
$sql .= ' GROUP BY f.rowid, f.ref, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total, f.tva, f.total_ttc,';
|
$sql .= ' GROUP BY f.rowid, f.ref, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,';
|
||||||
$sql .= ' f.localtax1, f.localtax2,';
|
$sql .= ' f.localtax1, f.localtax2,';
|
||||||
$sql .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,';
|
$sql .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,';
|
||||||
$sql .= ' f.paye, f.fk_statut, f.close_code,';
|
$sql .= ' f.paye, f.fk_statut, f.close_code,';
|
||||||
@ -1204,7 +1204,7 @@ if ($resql) {
|
|||||||
print '<input class="flat" type="text" size="4" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
print '<input class="flat" type="text" size="4" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_vat']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
print '<input class="flat" type="text" size="4" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||||
@ -1408,10 +1408,10 @@ if ($resql) {
|
|||||||
print_liste_field_titre($arrayfields['f.pos_source']['label'], $_SERVER["PHP_SELF"], "f.pos_source", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.pos_source']['label'], $_SERVER["PHP_SELF"], "f.pos_source", "", $param, "", $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_vat']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.total_tva']['label'], $_SERVER['PHP_SELF'], 'f.total_tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
@ -1511,7 +1511,7 @@ if ($resql) {
|
|||||||
$facturestatic->ref_client = $obj->ref_client;
|
$facturestatic->ref_client = $obj->ref_client;
|
||||||
$facturestatic->type = $obj->type;
|
$facturestatic->type = $obj->type;
|
||||||
$facturestatic->total_ht = $obj->total_ht;
|
$facturestatic->total_ht = $obj->total_ht;
|
||||||
$facturestatic->total_tva = $obj->total_vat;
|
$facturestatic->total_tva = $obj->total_tva;
|
||||||
$facturestatic->total_ttc = $obj->total_ttc;
|
$facturestatic->total_ttc = $obj->total_ttc;
|
||||||
$facturestatic->multicurrency_code = $obj->multicurrency_code;
|
$facturestatic->multicurrency_code = $obj->multicurrency_code;
|
||||||
$facturestatic->multicurrency_tx = $obj->multicurrency_tx;
|
$facturestatic->multicurrency_tx = $obj->multicurrency_tx;
|
||||||
@ -1833,15 +1833,15 @@ if ($resql) {
|
|||||||
$totalarray['val']['f.total_ht'] += $obj->total_ht;
|
$totalarray['val']['f.total_ht'] += $obj->total_ht;
|
||||||
}
|
}
|
||||||
// Amount VAT
|
// Amount VAT
|
||||||
if (!empty($arrayfields['f.total_vat']['checked'])) {
|
if (!empty($arrayfields['f.total_tva']['checked'])) {
|
||||||
print '<td class="right nowraponall amount">'.price($obj->total_vat)."</td>\n";
|
print '<td class="right nowraponall amount">'.price($obj->total_vat)."</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat';
|
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_tva';
|
||||||
}
|
}
|
||||||
$totalarray['val']['f.total_vat'] += $obj->total_vat;
|
$totalarray['val']['f.total_tva'] += $obj->total_tva;
|
||||||
}
|
}
|
||||||
// Amount LocalTax1
|
// Amount LocalTax1
|
||||||
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
||||||
|
|||||||
@ -115,7 +115,7 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
|||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
$tmpinvoice = new Facture($db);
|
$tmpinvoice = new Facture($db);
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms";
|
$sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms";
|
||||||
$sql .= ", f.date_lim_reglement as datelimite";
|
$sql .= ", f.date_lim_reglement as datelimite";
|
||||||
$sql .= ", s.nom as name";
|
$sql .= ", s.nom as name";
|
||||||
$sql .= ", s.rowid as socid";
|
$sql .= ", s.rowid as socid";
|
||||||
@ -140,7 +140,7 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerLastModified', $parameters);
|
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerLastModified', $parameters);
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
||||||
$sql .= " s.nom, s.rowid, s.code_client, s.code_compta, s.email,";
|
$sql .= " s.nom, s.rowid, s.code_client, s.code_compta, s.email,";
|
||||||
$sql .= " cc.rowid, cc.code";
|
$sql .= " cc.rowid, cc.code";
|
||||||
$sql .= " ORDER BY f.tms DESC";
|
$sql .= " ORDER BY f.tms DESC";
|
||||||
@ -163,14 +163,14 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
|||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num) {
|
if ($num) {
|
||||||
$total_ttc = $totalam = $total = 0;
|
$total_ttc = $totalam = $total_ht = 0;
|
||||||
while ($i < $num && $i < $conf->liste_limit) {
|
while ($i < $num && $i < $conf->liste_limit) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
if ($i >= $max) {
|
if ($i >= $max) {
|
||||||
$othernb += 1;
|
$othernb += 1;
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$totalam += $obj->am;
|
$totalam += $obj->am;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
@ -306,7 +306,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
if ($num) {
|
if ($num) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$total = $total_ttc = $totalam = 0;
|
$total_ht = $total_ttc = $totalam = 0;
|
||||||
$othernb = 0;
|
$othernb = 0;
|
||||||
|
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
@ -315,7 +315,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S
|
|||||||
if ($i >= $max) {
|
if ($i >= $max) {
|
||||||
$othernb += 1;
|
$othernb += 1;
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S
|
|||||||
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||||
print '<td>'.$facstatic->getLibStatut(3).'</td>';
|
print '<td>'.$facstatic->getLibStatut(3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
$totalam += $obj->am;
|
$totalam += $obj->am;
|
||||||
$i++;
|
$i++;
|
||||||
@ -416,7 +416,7 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) {
|
|||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num) {
|
if ($num) {
|
||||||
$total_ttc = $totalam = $total = 0;
|
$total_ttc = $totalam = $total_ht = 0;
|
||||||
|
|
||||||
while ($i < $num && $i < $max) {
|
while ($i < $num && $i < $max) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
@ -424,7 +424,7 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) {
|
|||||||
if ($i >= $max) {
|
if ($i >= $max) {
|
||||||
$othernb += 1;
|
$othernb += 1;
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -515,7 +515,7 @@ if (!empty($conf->tax->enabled) && !empty($user->rights->tax->charges->lire)) {
|
|||||||
if ($i >= $max) {
|
if ($i >= $max) {
|
||||||
$othernb += 1;
|
$othernb += 1;
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -569,7 +569,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
|
|||||||
$commandestatic = new Commande($db);
|
$commandestatic = new Commande($db);
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$sql = "SELECT sum(f.total) as tot_fht, sum(f.total_ttc) as tot_fttc";
|
$sql = "SELECT sum(f.total_ht) as tot_fht, sum(f.total_ttc) as tot_fttc";
|
||||||
$sql .= ", s.nom as name, s.email";
|
$sql .= ", s.nom as name, s.email";
|
||||||
$sql .= ", s.rowid as socid";
|
$sql .= ", s.rowid as socid";
|
||||||
$sql .= ", s.code_client, s.code_compta";
|
$sql .= ", s.code_client, s.code_compta";
|
||||||
@ -634,7 +634,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
|
|||||||
if ($i >= $max) {
|
if ($i >= $max) {
|
||||||
$othernb += 1;
|
$othernb += 1;
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total_ht += $obj->total_ht;
|
||||||
$total_ttc += $obj->total_ttc;
|
$total_ttc += $obj->total_ttc;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
1
htdocs/compta/payment_vat/index.html
Normal file
1
htdocs/compta/payment_vat/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -371,7 +371,7 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||||||
print '<tr class="trforbreak"><td colspan="4">'.$langs->trans("CustomersInvoices").'</td></tr>';
|
print '<tr class="trforbreak"><td colspan="4">'.$langs->trans("CustomersInvoices").'</td></tr>';
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
$sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
$sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_soc = s.rowid";
|
$sql .= " WHERE f.fk_soc = s.rowid";
|
||||||
@ -1153,7 +1153,7 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
// VAT to pay
|
// VAT to pay
|
||||||
$amount = 0;
|
$amount = 0;
|
||||||
$sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.tva) as amount";
|
$sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_tva) as amount";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_statut IN (1,2)";
|
$sql .= " WHERE f.fk_statut IN (1,2)";
|
||||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
|||||||
@ -209,7 +209,7 @@ $subtotal_ht = 0;
|
|||||||
$subtotal_ttc = 0;
|
$subtotal_ttc = 0;
|
||||||
if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
$sql = "SELECT sum(f.total) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm";
|
$sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_soc = s.rowid";
|
$sql .= " WHERE f.fk_soc = s.rowid";
|
||||||
@ -390,7 +390,7 @@ $subtotal_ttc = 0;
|
|||||||
if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
// TVA collected to pay
|
// TVA collected to pay
|
||||||
$sql = "SELECT sum(f.tva) as amount, date_format(f.datef,'%Y-%m') as dm";
|
$sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_statut IN (1,2)";
|
$sql .= " WHERE f.fk_statut IN (1,2)";
|
||||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
|||||||
1
htdocs/compta/sociales/index.html
Normal file
1
htdocs/compta/sociales/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -231,7 +231,7 @@ foreach ($headerparams as $key => $value) {
|
|||||||
|
|
||||||
$catotal = 0;
|
$catotal = 0;
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
|
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid";
|
||||||
$sql .= " WHERE f.fk_statut in (1,2)";
|
$sql .= " WHERE f.fk_statut in (1,2)";
|
||||||
|
|||||||
@ -247,7 +247,7 @@ $name = array();
|
|||||||
$catotal = 0;
|
$catotal = 0;
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
$sql = "SELECT DISTINCT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,";
|
$sql = "SELECT DISTINCT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,";
|
||||||
$sql .= " sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
|
$sql .= " sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
|
||||||
if ($selected_cat === -2) { // Without any category
|
if ($selected_cat === -2) { // Without any category
|
||||||
$sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc";
|
$sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc";
|
||||||
|
|||||||
@ -199,7 +199,7 @@ if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') {
|
|||||||
|
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
$sql = "SELECT date_format(f.datef, '%Y-%m') as dm, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
|
$sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_statut in (1,2)";
|
$sql .= " WHERE f.fk_statut in (1,2)";
|
||||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
@ -668,7 +668,7 @@ print '</div>';
|
|||||||
Je commente toute cette partie car les chiffres affichees sont faux - Eldy.
|
Je commente toute cette partie car les chiffres affichees sont faux - Eldy.
|
||||||
En attendant correction.
|
En attendant correction.
|
||||||
|
|
||||||
$sql = "SELECT sum(f.total) as tot_fht,sum(f.total_ttc) as tot_fttc, p.rowid, p.ref, s.nom, s.rowid as socid, p.total_ht, p.total_ttc
|
$sql = "SELECT sum(f.total_ht) as tot_fht,sum(f.total_ttc) as tot_fttc, p.rowid, p.ref, s.nom, s.rowid as socid, p.total_ht, p.total_ttc
|
||||||
FROM ".MAIN_DB_PREFIX."commande AS p, ".MAIN_DB_PREFIX."societe AS s
|
FROM ".MAIN_DB_PREFIX."commande AS p, ".MAIN_DB_PREFIX."societe AS s
|
||||||
LEFT JOIN ".MAIN_DB_PREFIX."co_fa AS co_fa ON co_fa.fk_commande = p.rowid
|
LEFT JOIN ".MAIN_DB_PREFIX."co_fa AS co_fa ON co_fa.fk_commande = p.rowid
|
||||||
LEFT JOIN ".MAIN_DB_PREFIX."facture AS f ON co_fa.fk_facture = f.rowid
|
LEFT JOIN ".MAIN_DB_PREFIX."facture AS f ON co_fa.fk_facture = f.rowid
|
||||||
|
|||||||
@ -427,7 +427,7 @@ class Tva extends CommonObject
|
|||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
|
||||||
$sql = "SELECT sum(f.tva) as amount";
|
$sql = "SELECT sum(f.total_tva) as amount";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1";
|
||||||
if ($year) {
|
if ($year) {
|
||||||
$sql .= " AND f.datef >= '".$this->db->escape($year)."-01-01' AND f.datef <= '".$this->db->escape($year)."-12-31' ";
|
$sql .= " AND f.datef >= '".$this->db->escape($year)."-01-01' AND f.datef <= '".$this->db->escape($year)."-12-31' ";
|
||||||
|
|||||||
@ -187,7 +187,7 @@ if ($resql) {
|
|||||||
|
|
||||||
$colorseries = array();
|
$colorseries = array();
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
|
|||||||
@ -42,7 +42,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
|||||||
|
|
||||||
$boxid = GETPOST('boxid', 'int');
|
$boxid = GETPOST('boxid', 'int');
|
||||||
$boxorder = GETPOST('boxorder');
|
$boxorder = GETPOST('boxorder');
|
||||||
$userid = GETPOST('userid');
|
|
||||||
$zone = GETPOST('zone', 'int');
|
$zone = GETPOST('zone', 'int');
|
||||||
$userid = GETPOST('userid', 'int');
|
$userid = GETPOST('userid', 'int');
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@ class box_external_rss extends ModeleBoxes
|
|||||||
$this->max = $max;
|
$this->max = $max;
|
||||||
|
|
||||||
// On recupere numero de param de la boite
|
// On recupere numero de param de la boite
|
||||||
|
$reg = array();
|
||||||
preg_match('/^([0-9]+) /', $this->paramdef, $reg);
|
preg_match('/^([0-9]+) /', $this->paramdef, $reg);
|
||||||
$site = $reg[1];
|
$site = $reg[1];
|
||||||
|
|
||||||
|
|||||||
@ -89,8 +89,8 @@ class box_factures extends ModeleBoxes
|
|||||||
|
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$sql = "SELECT f.rowid as facid";
|
$sql = "SELECT f.rowid as facid";
|
||||||
$sql .= ", f.ref, f.type, f.total as total_ht";
|
$sql .= ", f.ref, f.type, f.total_ht";
|
||||||
$sql .= ", f.tva as total_tva";
|
$sql .= ", f.total_tva";
|
||||||
$sql .= ", f.total_ttc";
|
$sql .= ", f.total_ttc";
|
||||||
$sql .= ", f.datef as df";
|
$sql .= ", f.datef as df";
|
||||||
$sql .= ", f.paye, f.fk_statut as status, f.datec, f.tms";
|
$sql .= ", f.paye, f.fk_statut as status, f.datec, f.tms";
|
||||||
|
|||||||
@ -94,8 +94,8 @@ class box_factures_imp extends ModeleBoxes
|
|||||||
$sql .= ", f.ref, f.date_lim_reglement as datelimite";
|
$sql .= ", f.ref, f.date_lim_reglement as datelimite";
|
||||||
$sql .= ", f.type";
|
$sql .= ", f.type";
|
||||||
$sql .= ", f.datef as df";
|
$sql .= ", f.datef as df";
|
||||||
$sql .= ", f.total as total_ht";
|
$sql .= ", f.total_ht";
|
||||||
$sql .= ", f.tva as total_tva";
|
$sql .= ", f.total_tva";
|
||||||
$sql .= ", f.total_ttc";
|
$sql .= ", f.total_ttc";
|
||||||
$sql .= ", f.paye, f.fk_statut as status, f.rowid as facid";
|
$sql .= ", f.paye, f.fk_statut as status, f.rowid as facid";
|
||||||
$sql .= ", sum(pf.amount) as am";
|
$sql .= ", sum(pf.amount) as am";
|
||||||
@ -117,7 +117,7 @@ class box_factures_imp extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
$sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,";
|
$sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,";
|
||||||
$sql .= " f.ref, f.date_lim_reglement,";
|
$sql .= " f.ref, f.date_lim_reglement,";
|
||||||
$sql .= " f.type, f.datef, f.total, f.tva, f.total_ttc, f.paye, f.fk_statut, f.rowid";
|
$sql .= " f.type, f.datef, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.fk_statut, f.rowid";
|
||||||
//$sql.= " ORDER BY f.datef DESC, f.ref DESC ";
|
//$sql.= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||||
$sql .= " ORDER BY datelimite ASC, f.ref ASC ";
|
$sql .= " ORDER BY datelimite ASC, f.ref ASC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2016 Bahfir abbes <dolipar@dolipar.org>
|
* Copyright (C) 2016 Bahfir abbes <dolipar@dolipar.org>
|
||||||
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||||
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -3518,7 +3518,7 @@ abstract class CommonObject
|
|||||||
$fieldttc = 'total_ttc';
|
$fieldttc = 'total_ttc';
|
||||||
// Specific code for backward compatibility with old field names
|
// Specific code for backward compatibility with old field names
|
||||||
if ($this->element == 'facture' || $this->element == 'facturerec') {
|
if ($this->element == 'facture' || $this->element == 'facturerec') {
|
||||||
$fieldht = 'total';
|
$fieldtva = 'total_tva';
|
||||||
}
|
}
|
||||||
if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') {
|
if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') {
|
||||||
$fieldtva = 'total_tva';
|
$fieldtva = 'total_tva';
|
||||||
|
|||||||
@ -113,7 +113,7 @@ class DolGraph
|
|||||||
|
|
||||||
$color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
|
$color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
|
||||||
if (is_readable($color_file)) {
|
if (is_readable($color_file)) {
|
||||||
include_once $color_file;
|
include $color_file;
|
||||||
if (isset($theme_bordercolor)) {
|
if (isset($theme_bordercolor)) {
|
||||||
$this->bordercolor = $theme_bordercolor;
|
$this->bordercolor = $theme_bordercolor;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7677,8 +7677,8 @@ class Form
|
|||||||
$possiblelinks = array(
|
$possiblelinks = array(
|
||||||
'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('propal').')'),
|
'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('propal').')'),
|
||||||
'order'=>array('enabled'=>$conf->commande->enabled, 'perms'=>1, 'label'=>'LinkToOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande').')'),
|
'order'=>array('enabled'=>$conf->commande->enabled, 'perms'=>1, 'label'=>'LinkToOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande').')'),
|
||||||
'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
||||||
'invoice_template'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToTemplateInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.titre as ref, t.total as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_rec as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
'invoice_template'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToTemplateInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.titre as ref, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_rec as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
||||||
'contrat'=>array('enabled'=>$conf->contrat->enabled, 'perms'=>1, 'label'=>'LinkToContract',
|
'contrat'=>array('enabled'=>$conf->contrat->enabled, 'perms'=>1, 'label'=>'LinkToContract',
|
||||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_customer as ref_client, t.ref_supplier, SUM(td.total_ht) as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as t, ".MAIN_DB_PREFIX."contratdet as td WHERE t.fk_soc = s.rowid AND td.fk_contrat = t.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('contract').')'),
|
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_customer as ref_client, t.ref_supplier, SUM(td.total_ht) as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as t, ".MAIN_DB_PREFIX."contratdet as td WHERE t.fk_soc = s.rowid AND td.fk_contrat = t.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('contract').')'),
|
||||||
'fichinter'=>array('enabled'=>$conf->ficheinter->enabled, 'perms'=>1, 'label'=>'LinkToIntervention', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('intervention').')'),
|
'fichinter'=>array('enabled'=>$conf->ficheinter->enabled, 'perms'=>1, 'label'=>'LinkToIntervention', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('intervention').')'),
|
||||||
|
|||||||
@ -405,7 +405,7 @@ class SimpleOpenID
|
|||||||
$url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
|
$url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = getURLContent($url);
|
$response = getURLContent($url, 'GET', '', 1, array(), array('http', 'https'));
|
||||||
|
|
||||||
list($servers, $delegates) = $this->HTML2OpenIDServer($response);
|
list($servers, $delegates) = $this->HTML2OpenIDServer($response);
|
||||||
if (count($servers) == 0) {
|
if (count($servers) == 0) {
|
||||||
@ -525,7 +525,7 @@ class SimpleOpenID
|
|||||||
dol_syslog(get_class($this).'::sendDiscoveryRequestToGetXRDS get XRDS');
|
dol_syslog(get_class($this).'::sendDiscoveryRequestToGetXRDS get XRDS');
|
||||||
|
|
||||||
$addheaders = array('Accept: application/xrds+xml');
|
$addheaders = array('Accept: application/xrds+xml');
|
||||||
$response = getURLContent($url, 'GET', '', 1, $addheaders);
|
$response = getURLContent($url, 'GET', '', 1, $addheaders, array('http', 'https'), 0);
|
||||||
/* response should like this:
|
/* response should like this:
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
|
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
|
||||||
|
|||||||
@ -392,7 +392,6 @@ class SMTPs
|
|||||||
} else {
|
} else {
|
||||||
if (function_exists('stream_socket_client') && !empty($this->_options)) {
|
if (function_exists('stream_socket_client') && !empty($this->_options)) {
|
||||||
$socket_context = stream_context_create($this->_options); // An array of options for stream_context_create()
|
$socket_context = stream_context_create($this->_options); // An array of options for stream_context_create()
|
||||||
set_error_handler([$this, 'errorHandler']);
|
|
||||||
$this->socket = @stream_socket_client(
|
$this->socket = @stream_socket_client(
|
||||||
preg_replace('@tls://@i', '', $this->getHost()).// Host to 'hit', IP or domain
|
preg_replace('@tls://@i', '', $this->getHost()).// Host to 'hit', IP or domain
|
||||||
':'.$this->getPort(), // which Port number to use
|
':'.$this->getPort(), // which Port number to use
|
||||||
|
|||||||
@ -50,7 +50,7 @@ function dol_basename($pathfile)
|
|||||||
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview.*\.png)$','^\.')). Exclude is checked both into fullpath and into basename (So '^xxx' may exclude 'xxx/dirscanned/...' and dirscanned/xxx').
|
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview.*\.png)$','^\.')). Exclude is checked both into fullpath and into basename (So '^xxx' may exclude 'xxx/dirscanned/...' and dirscanned/xxx').
|
||||||
* @param string $sortcriteria Sort criteria ('','fullname','relativename','name','date','size')
|
* @param string $sortcriteria Sort criteria ('','fullname','relativename','name','date','size')
|
||||||
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
||||||
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only
|
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only, 4=Force load of perm
|
||||||
* @param int $nohook Disable all hooks
|
* @param int $nohook Disable all hooks
|
||||||
* @param string $relativename For recursive purpose only. Must be "" at first call.
|
* @param string $relativename For recursive purpose only. Must be "" at first call.
|
||||||
* @param string $donotfollowsymlinks Do not follow symbolic links
|
* @param string $donotfollowsymlinks Do not follow symbolic links
|
||||||
@ -67,6 +67,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl
|
|||||||
|
|
||||||
$loaddate = ($mode == 1 || $mode == 2) ?true:false;
|
$loaddate = ($mode == 1 || $mode == 2) ?true:false;
|
||||||
$loadsize = ($mode == 1 || $mode == 3) ?true:false;
|
$loadsize = ($mode == 1 || $mode == 3) ?true:false;
|
||||||
|
$loadperm = ($mode == 1 || $mode == 4) ?true:false;
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$path = preg_replace('/([\\/]+)$/i', '', $path);
|
$path = preg_replace('/([\\/]+)$/i', '', $path);
|
||||||
@ -141,6 +142,9 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl
|
|||||||
if ($loadsize || $sortcriteria == 'size') {
|
if ($loadsize || $sortcriteria == 'size') {
|
||||||
$filesize = dol_filesize($path."/".$file);
|
$filesize = dol_filesize($path."/".$file);
|
||||||
}
|
}
|
||||||
|
if ($loadperm || $sortcriteria == 'perm') {
|
||||||
|
$fileperm = dol_fileperm($path."/".$file);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$filter || preg_match('/'.$filter.'/i', $file)) { // We do not search key $filter into all $path, only into $file part
|
if (!$filter || preg_match('/'.$filter.'/i', $file)) { // We do not search key $filter into all $path, only into $file part
|
||||||
$reg = array();
|
$reg = array();
|
||||||
@ -154,6 +158,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl
|
|||||||
"fullname" => $path.'/'.$file,
|
"fullname" => $path.'/'.$file,
|
||||||
"date" => $filedate,
|
"date" => $filedate,
|
||||||
"size" => $filesize,
|
"size" => $filesize,
|
||||||
|
"perm" => $fileperm,
|
||||||
"type" => 'dir'
|
"type" => 'dir'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -587,6 +592,18 @@ function dol_filemtime($pathoffile)
|
|||||||
return @filemtime($newpathoffile); // @Is to avoid errors if files does not exists
|
return @filemtime($newpathoffile); // @Is to avoid errors if files does not exists
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return permissions of a file
|
||||||
|
*
|
||||||
|
* @param string $pathoffile Path of file
|
||||||
|
* @return integer File permissions
|
||||||
|
*/
|
||||||
|
function dol_fileperm($pathoffile)
|
||||||
|
{
|
||||||
|
$newpathoffile = dol_osencode($pathoffile);
|
||||||
|
return fileperms($newpathoffile);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make replacement of strings into a file.
|
* Make replacement of strings into a file.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1344,7 +1344,7 @@ function dol_ucwords($string, $encoding = "UTF-8")
|
|||||||
* @param string $message Line to log. ''=Show nothing
|
* @param string $message Line to log. ''=Show nothing
|
||||||
* @param int $level Log level
|
* @param int $level Log level
|
||||||
* On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr
|
* On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr
|
||||||
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
|
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_NOTICE=5, LOG_INFO=6, LOG_DEBUG=7
|
||||||
* @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1
|
* @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1
|
||||||
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
||||||
* @param string $restricttologhandler Force output of log only to this log handler
|
* @param string $restricttologhandler Force output of log only to this log handler
|
||||||
@ -1549,7 +1549,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||||||
if ($picto) {
|
if ($picto) {
|
||||||
$out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
|
$out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
|
||||||
}
|
}
|
||||||
$out .= '<span class="tabTitleText">'.dol_trunc($title, $limittitle).'</span>';
|
$out .= '<span class="tabTitleText">'.dol_escape_htmltag(dol_trunc($title, $limittitle)).'</span>';
|
||||||
$out .= '</a>';
|
$out .= '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1594,7 +1594,9 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($i < $limittoshow || $isactive) {
|
if ($i < $limittoshow || $isactive) {
|
||||||
|
// Add a new entry
|
||||||
$out .= '<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((!$isactive && !empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT)) ? ' hideonprint' : '').'"><!-- id tab = '.(empty($links[$i][2]) ? '' : $links[$i][2]).' -->';
|
$out .= '<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((!$isactive && !empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT)) ? ' hideonprint' : '').'"><!-- id tab = '.(empty($links[$i][2]) ? '' : $links[$i][2]).' -->';
|
||||||
|
|
||||||
if (isset($links[$i][2]) && $links[$i][2] == 'image') {
|
if (isset($links[$i][2]) && $links[$i][2] == 'image') {
|
||||||
if (!empty($links[$i][0])) {
|
if (!empty($links[$i][0])) {
|
||||||
$out .= '<a class="tabimage'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
$out .= '<a class="tabimage'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
||||||
@ -1603,16 +1605,18 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||||||
}
|
}
|
||||||
} elseif (!empty($links[$i][1])) {
|
} elseif (!empty($links[$i][1])) {
|
||||||
//print "x $i $active ".$links[$i][2]." z";
|
//print "x $i $active ".$links[$i][2]." z";
|
||||||
if ($isactive) {
|
$out .= '<div class="tab tab'.($isactive?'active':'unactive').'" style="margin: 0 !important">';
|
||||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tabactive tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">';
|
if (!empty($links[$i][0])) {
|
||||||
$out .= $links[$i][1];
|
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">';
|
||||||
$out .= '</a>'."\n";
|
}
|
||||||
} else {
|
$out .= $links[$i][1];
|
||||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tabunactive tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">';
|
if (!empty($links[$i][0])) {
|
||||||
$out .= $links[$i][1];
|
|
||||||
$out .= '</a>'."\n";
|
$out .= '</a>'."\n";
|
||||||
}
|
}
|
||||||
|
$out .= empty($links[$i][4]) ? '' : $links[$i][4];
|
||||||
|
$out .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
} else {
|
} else {
|
||||||
// The popup with the other tabs
|
// The popup with the other tabs
|
||||||
|
|||||||
@ -190,6 +190,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
|
|||||||
|
|
||||||
$info = curl_getinfo($ch); // Reading of request must be done after sending request
|
$info = curl_getinfo($ch); // Reading of request must be done after sending request
|
||||||
$http_code = $info['http_code'];
|
$http_code = $info['http_code'];
|
||||||
|
|
||||||
if ($followlocation && ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307)) {
|
if ($followlocation && ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307)) {
|
||||||
$newUrl = $info['redirect_url'];
|
$newUrl = $info['redirect_url'];
|
||||||
$maxRedirection--;
|
$maxRedirection--;
|
||||||
|
|||||||
@ -30,6 +30,23 @@ $maxheightmini = 72; // 16/9eme
|
|||||||
$quality = 80;
|
$quality = 80;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return if a filename is file name of a supported image format
|
||||||
|
*
|
||||||
|
* @param int $acceptsvg 0=Default (depends on setup), 1=Always accept SVG as image files
|
||||||
|
* @return string Return list fo image format
|
||||||
|
*/
|
||||||
|
function getListOfPossibleImageExt($acceptsvg = 0)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into product.class.php
|
||||||
|
if ($acceptsvg || !empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) {
|
||||||
|
$regeximgext .= '|\.svg'; // Not allowed by default. SVG can contains javascript
|
||||||
|
}
|
||||||
|
|
||||||
|
return $regeximgext;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a filename is file name of a supported image format
|
* Return if a filename is file name of a supported image format
|
||||||
@ -40,12 +57,7 @@ $quality = 80;
|
|||||||
*/
|
*/
|
||||||
function image_format_supported($file, $acceptsvg = 0)
|
function image_format_supported($file, $acceptsvg = 0)
|
||||||
{
|
{
|
||||||
global $conf;
|
$regeximgext = getListOfPossibleImageExt();
|
||||||
|
|
||||||
$regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into product.class.php
|
|
||||||
if ($acceptsvg || !empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) {
|
|
||||||
$regeximgext .= '|\.svg'; // Not allowed by default. SVG can contains javascript
|
|
||||||
}
|
|
||||||
|
|
||||||
// Case filename is not a format image
|
// Case filename is not a format image
|
||||||
$reg = array();
|
$reg = array();
|
||||||
|
|||||||
@ -270,6 +270,8 @@ function getCustomerInvoicePieChart($socid = 0)
|
|||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
$result = '<div class="div-table-responsive-no-min">';
|
$result = '<div class="div-table-responsive-no-min">';
|
||||||
$result .= '<table class="noborder nohover centpercent">';
|
$result .= '<table class="noborder nohover centpercent">';
|
||||||
$result .= '<tr class="liste_titre">';
|
$result .= '<tr class="liste_titre">';
|
||||||
@ -285,6 +287,19 @@ function getCustomerInvoicePieChart($socid = 0)
|
|||||||
$objectstatic->paye = $status == Facture::STATUS_CLOSED ? -1 : 0;
|
$objectstatic->paye = $status == Facture::STATUS_CLOSED ? -1 : 0;
|
||||||
|
|
||||||
$dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)];
|
$dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)];
|
||||||
|
if ($status == Facture::STATUS_DRAFT) {
|
||||||
|
$colorseries[$status] = '-'.$badgeStatus0;
|
||||||
|
}
|
||||||
|
if ($status == Facture::STATUS_VALIDATED) {
|
||||||
|
$colorseries[$status] = $badgeStatus1;
|
||||||
|
}
|
||||||
|
if ($status == Facture::STATUS_CLOSED) {
|
||||||
|
$colorseries[$status] = $badgeStatus9;
|
||||||
|
}
|
||||||
|
if ($status == Facture::STATUS_ABANDONED) {
|
||||||
|
$colorseries[$status] = $badgeStatus6;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$conf->use_javascript_ajax) {
|
if (!$conf->use_javascript_ajax) {
|
||||||
$result .= '<tr class="oddeven">';
|
$result .= '<tr class="oddeven">';
|
||||||
$result .= '<td>'.$objectstatic->getLibStatut(0).'</td>';
|
$result .= '<td>'.$objectstatic->getLibStatut(0).'</td>';
|
||||||
@ -296,6 +311,7 @@ function getCustomerInvoicePieChart($socid = 0)
|
|||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
$dolgraph = new DolGraph();
|
$dolgraph = new DolGraph();
|
||||||
$dolgraph->SetData($dataseries);
|
$dolgraph->SetData($dataseries);
|
||||||
|
$dolgraph->SetDataColor(array_values($colorseries));
|
||||||
$dolgraph->setShowLegend(2);
|
$dolgraph->setShowLegend(2);
|
||||||
$dolgraph->setShowPercent(1);
|
$dolgraph->setShowPercent(1);
|
||||||
$dolgraph->SetType(['pie']);
|
$dolgraph->SetType(['pie']);
|
||||||
@ -373,6 +389,8 @@ function getPurchaseInvoicePieChart($socid = 0)
|
|||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
$result = '<div class="div-table-responsive-no-min">';
|
$result = '<div class="div-table-responsive-no-min">';
|
||||||
$result .= '<table class="noborder nohover centpercent">';
|
$result .= '<table class="noborder nohover centpercent">';
|
||||||
|
|
||||||
@ -389,6 +407,19 @@ function getPurchaseInvoicePieChart($socid = 0)
|
|||||||
$objectstatic->paye = $status == FactureFournisseur::STATUS_CLOSED ? -1 : 0;
|
$objectstatic->paye = $status == FactureFournisseur::STATUS_CLOSED ? -1 : 0;
|
||||||
|
|
||||||
$dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)];
|
$dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)];
|
||||||
|
if ($status == FactureFournisseur::STATUS_DRAFT) {
|
||||||
|
$colorseries[$status] = '-'.$badgeStatus0;
|
||||||
|
}
|
||||||
|
if ($status == FactureFournisseur::STATUS_VALIDATED) {
|
||||||
|
$colorseries[$status] = $badgeStatus1;
|
||||||
|
}
|
||||||
|
if ($status == FactureFournisseur::STATUS_CLOSED) {
|
||||||
|
$colorseries[$status] = $badgeStatus9;
|
||||||
|
}
|
||||||
|
if ($status == FactureFournisseur::STATUS_ABANDONED) {
|
||||||
|
$colorseries[$status] = $badgeStatus6;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$conf->use_javascript_ajax) {
|
if (!$conf->use_javascript_ajax) {
|
||||||
$result .= '<tr class="oddeven">';
|
$result .= '<tr class="oddeven">';
|
||||||
$result .= '<td>'.$objectstatic->getLibStatut(0).'</td>';
|
$result .= '<td>'.$objectstatic->getLibStatut(0).'</td>';
|
||||||
@ -400,6 +431,7 @@ function getPurchaseInvoicePieChart($socid = 0)
|
|||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
$dolgraph = new DolGraph();
|
$dolgraph = new DolGraph();
|
||||||
$dolgraph->SetData($dataseries);
|
$dolgraph->SetData($dataseries);
|
||||||
|
$dolgraph->SetDataColor(array_values($colorseries));
|
||||||
$dolgraph->setShowLegend(2);
|
$dolgraph->setShowLegend(2);
|
||||||
$dolgraph->setShowPercent(1);
|
$dolgraph->setShowPercent(1);
|
||||||
$dolgraph->SetType(['pie']);
|
$dolgraph->SetType(['pie']);
|
||||||
@ -436,7 +468,7 @@ function getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0)
|
|||||||
$result = '';
|
$result = '';
|
||||||
$tmpinvoice = new Facture($db);
|
$tmpinvoice = new Facture($db);
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.ref, f.datef as date, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.ref_client";
|
$sql = "SELECT f.rowid, f.ref, f.datef as date, f.total_ht, f.total_tva, f.total_ttc, f.ref_client";
|
||||||
$sql .= ", f.type, f.fk_statut as status, f.paye";
|
$sql .= ", f.type, f.fk_statut as status, f.paye";
|
||||||
$sql .= ", s.nom as name";
|
$sql .= ", s.nom as name";
|
||||||
$sql .= ", s.rowid as socid, s.email";
|
$sql .= ", s.rowid as socid, s.email";
|
||||||
@ -463,7 +495,7 @@ function getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0)
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerDraft', $parameters);
|
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerDraft', $parameters);
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sql .= " GROUP BY f.rowid, f.ref, f.datef, f.total, f.tva, f.total_ttc, f.ref_client, f.type, f.fk_statut, f.paye,";
|
$sql .= " GROUP BY f.rowid, f.ref, f.datef, f.total_ht, f.total_tva, f.total_ttc, f.ref_client, f.type, f.fk_statut, f.paye,";
|
||||||
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,";
|
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,";
|
||||||
$sql .= " cc.rowid, cc.code";
|
$sql .= " cc.rowid, cc.code";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) {
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
@ -903,7 +935,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
|||||||
if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||||
$tmpinvoice = new Facture($db);
|
$tmpinvoice = new Facture($db);
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms";
|
$sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms";
|
||||||
$sql .= ", f.date_lim_reglement as datelimite";
|
$sql .= ", f.date_lim_reglement as datelimite";
|
||||||
$sql .= ", s.nom as name";
|
$sql .= ", s.nom as name";
|
||||||
$sql .= ", s.rowid as socid, s.email";
|
$sql .= ", s.rowid as socid, s.email";
|
||||||
@ -929,7 +961,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerUnpaid', $parameters);
|
$reshook = $hookmanager->executeHooks('printFieldListWhereCustomerUnpaid', $parameters);
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
||||||
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
|
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
|
||||||
$sql .= ", s.code_fournisseur, s.code_compta_fournisseur";
|
$sql .= ", s.code_fournisseur, s.code_compta_fournisseur";
|
||||||
$sql .= " ORDER BY f.datef ASC, f.ref ASC";
|
$sql .= " ORDER BY f.datef ASC, f.ref ASC";
|
||||||
@ -1117,7 +1149,7 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListWhereSupplierUnpaid', $parameters);
|
$reshook = $hookmanager->executeHooks('printFieldListWhereSupplierUnpaid', $parameters);
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,";
|
$sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,";
|
||||||
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
|
$sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
|
||||||
$sql .= " ORDER BY ff.date_lim_reglement ASC";
|
$sql .= " ORDER BY ff.date_lim_reglement ASC";
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,8 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
|||||||
if (count($object->fields)) {
|
if (count($object->fields)) {
|
||||||
foreach ($object->fields as $key => $val) {
|
foreach ($object->fields as $key => $val) {
|
||||||
$i++;
|
$i++;
|
||||||
$texttoinsert .= "\t\t'".$key."' => array('type'=>'".$val['type']."', 'label'=>'".$val['label']."',";
|
$texttoinsert .= "\t\t'".$key."' => array('type'=>'".$val['type']."',";
|
||||||
|
$texttoinsert .= " 'label'=>'".$val['label']."',";
|
||||||
$texttoinsert .= " 'enabled'=>'".($val['enabled'] !== '' ? $val['enabled'] : 1)."',";
|
$texttoinsert .= " 'enabled'=>'".($val['enabled'] !== '' ? $val['enabled'] : 1)."',";
|
||||||
$texttoinsert .= " 'position'=>".($val['position'] !== '' ? $val['position'] : 50).",";
|
$texttoinsert .= " 'position'=>".($val['position'] !== '' ? $val['position'] : 50).",";
|
||||||
$texttoinsert .= " 'notnull'=>".(empty($val['notnull']) ? 0 : $val['notnull']).",";
|
$texttoinsert .= " 'notnull'=>".(empty($val['notnull']) ? 0 : $val['notnull']).",";
|
||||||
@ -145,6 +146,12 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
|||||||
if ($val['css']) {
|
if ($val['css']) {
|
||||||
$texttoinsert .= " 'css'=>'".$val['css']."',";
|
$texttoinsert .= " 'css'=>'".$val['css']."',";
|
||||||
}
|
}
|
||||||
|
if ($val['cssview']) {
|
||||||
|
$texttoinsert .= " 'cssview'=>'".$val['cssview']."',";
|
||||||
|
}
|
||||||
|
if ($val['csslist']) {
|
||||||
|
$texttoinsert .= " 'csslist'=>'".$val['csslist']."',";
|
||||||
|
}
|
||||||
if ($val['help']) {
|
if ($val['help']) {
|
||||||
$texttoinsert .= " 'help'=>\"".preg_replace('/"/', '', $val['help'])."\",";
|
$texttoinsert .= " 'help'=>\"".preg_replace('/"/', '', $val['help'])."\",";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -173,7 +173,8 @@ function showOnlinePaymentUrl($type, $ref)
|
|||||||
|
|
||||||
$out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'</span><br>';
|
$out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'</span><br>';
|
||||||
$url = getOnlinePaymentUrl(0, $type, $ref);
|
$url = getOnlinePaymentUrl(0, $type, $ref);
|
||||||
$out .= '<div class="urllink"><input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'"></div>';
|
$out .= '<div class="urllink"><input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
|
||||||
|
$out .= '<a href="'.$url.'" target="_blank">'.img_picto('', 'globe').'</a></div>';
|
||||||
$out .= ajax_autoselect("onlinepaymenturl", 0);
|
$out .= ajax_autoselect("onlinepaymenturl", 0);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -534,7 +534,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check access by user to object.
|
* Check access by user to object.
|
||||||
* This function is also called by restrictedArea
|
* This function is also called by restrictedArea that check before if module is enabled and permissions of user compared to $action.
|
||||||
*
|
*
|
||||||
* @param User $user User to check
|
* @param User $user User to check
|
||||||
* @param array $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...)
|
* @param array $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...)
|
||||||
|
|||||||
@ -1023,7 +1023,7 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify
|
|||||||
|
|
||||||
if (empty($alreadygrabbed[$urltograbbis])) {
|
if (empty($alreadygrabbed[$urltograbbis])) {
|
||||||
if ($grabimages) {
|
if ($grabimages) {
|
||||||
$tmpgeturl = getURLContent($urltograbbis);
|
$tmpgeturl = getURLContent($urltograbbis, 'GET', '', 1, array(), array('http', 'https'), 0);
|
||||||
if ($tmpgeturl['curl_error_no']) {
|
if ($tmpgeturl['curl_error_no']) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
|
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
|
||||||
@ -1094,7 +1094,7 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify
|
|||||||
|
|
||||||
if (empty($alreadygrabbed[$urltograbbis])) {
|
if (empty($alreadygrabbed[$urltograbbis])) {
|
||||||
if ($grabimages) {
|
if ($grabimages) {
|
||||||
$tmpgeturl = getURLContent($urltograbbis);
|
$tmpgeturl = getURLContent($urltograbbis, 'GET', '', 1, array(), array('http', 'https'), 0);
|
||||||
if ($tmpgeturl['curl_error_no']) {
|
if ($tmpgeturl['curl_error_no']) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
|
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
|
||||||
|
|||||||
@ -106,7 +106,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
if ($cryptType == 'auto') {
|
if ($cryptType == 'auto') {
|
||||||
if (dol_verifyHash($passtyped, $passcrypted, '0')) {
|
if (dol_verifyHash($passtyped, $passcrypted, '0')) {
|
||||||
$passok = true;
|
$passok = true;
|
||||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - ".$cryptType." of pass is ok");
|
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1025,7 +1025,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
if ($mysoc->forme_juridique_code == 92) {
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||||
|
} else {
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||||
|
}
|
||||||
|
|
||||||
$posy = $pdf->GetY() + 4;
|
$posy = $pdf->GetY() + 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -195,7 +195,7 @@ class modApi extends DolibarrModules
|
|||||||
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
||||||
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
||||||
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
||||||
// 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
// 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
||||||
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
||||||
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
||||||
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
||||||
@ -203,7 +203,7 @@ class modApi extends DolibarrModules
|
|||||||
// $this->export_entities_array[$r]=array(
|
// $this->export_entities_array[$r]=array(
|
||||||
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
||||||
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
||||||
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",
|
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",
|
||||||
// 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",
|
// 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",
|
||||||
// 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",
|
// 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",
|
||||||
// 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
// 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
||||||
|
|||||||
@ -100,6 +100,7 @@ class modExternalRss extends DolibarrModules
|
|||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
while ($obj = $this->db->fetch_object($result)) {
|
while ($obj = $this->db->fetch_object($result)) {
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/EXTERNAL_RSS_TITLE_([0-9]+)/i', $obj->name, $reg)) {
|
if (preg_match('/EXTERNAL_RSS_TITLE_([0-9]+)/i', $obj->name, $reg)) {
|
||||||
// Definie la boite si on a trouvee une ancienne configuration
|
// Definie la boite si on a trouvee une ancienne configuration
|
||||||
//$this->boxes[$reg[1]][0] = "(ExternalRSSInformations)";
|
//$this->boxes[$reg[1]][0] = "(ExternalRSSInformations)";
|
||||||
|
|||||||
@ -220,8 +220,8 @@ class modFacture extends DolibarrModules
|
|||||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode',
|
's.code_compta_fournisseur'=>'SupplierAccountancyCode',
|
||||||
's.tva_intra'=>'VATIntra',
|
's.tva_intra'=>'VATIntra',
|
||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
||||||
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
|
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total_ht'=>"TotalHT",
|
||||||
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
||||||
'none.rest'=>'Rest',
|
'none.rest'=>'Rest',
|
||||||
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
||||||
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
|
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
|
||||||
@ -245,7 +245,7 @@ class modFacture extends DolibarrModules
|
|||||||
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
||||||
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
||||||
'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
||||||
'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric', 'f.close_code'=>'Text', 'f.close_note'=>'Text',
|
'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric', 'f.close_code'=>'Text', 'f.close_note'=>'Text',
|
||||||
'none.rest'=>"NumericCompute",
|
'none.rest'=>"NumericCompute",
|
||||||
'f.note_private'=>"Text", 'f.note_public'=>"Text", 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text',
|
'f.note_private'=>"Text", 'f.note_public'=>"Text", 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text',
|
||||||
'pj.ref'=>'Text', 'pj.title'=>'Text', 'fd.rowid'=>'Numeric', 'fd.label'=>'Text', 'fd.description'=>"Text", 'fd.subprice'=>"Numeric", 'fd.tva_tx'=>"Numeric",
|
'pj.ref'=>'Text', 'pj.title'=>'Text', 'fd.rowid'=>'Numeric', 'fd.label'=>'Text', 'fd.description'=>"Text", 'fd.subprice'=>"Numeric", 'fd.tva_tx'=>"Numeric",
|
||||||
@ -317,8 +317,8 @@ class modFacture extends DolibarrModules
|
|||||||
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
|
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
|
||||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
||||||
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
|
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total_ht'=>"TotalHT",
|
||||||
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
|
||||||
'none.rest'=>'Rest',
|
'none.rest'=>'Rest',
|
||||||
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin',
|
||||||
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef',
|
'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef',
|
||||||
@ -342,7 +342,7 @@ class modFacture extends DolibarrModules
|
|||||||
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
||||||
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
||||||
'f.rowid'=>"Numeric", 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
'f.rowid'=>"Numeric", 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
||||||
'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.close_code'=>'Text', 'f.close_note'=>'Text',
|
'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.close_code'=>'Text', 'f.close_note'=>'Text',
|
||||||
'none.rest'=>'NumericCompute',
|
'none.rest'=>'NumericCompute',
|
||||||
'f.note_private'=>"Text", 'f.note_public'=>"Text", 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text',
|
'f.note_private'=>"Text", 'f.note_public'=>"Text", 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text',
|
||||||
'pj.ref'=>'Text', 'pj.title'=>'Text', 'p.amount'=>'Numeric', 'pf.amount'=>'Numeric', 'p.rowid'=>'Numeric', 'p.ref'=>'Text', 'p.title'=>'Text', 'p.datep'=>'Date', 'p.num_paiement'=>'Numeric',
|
'pj.ref'=>'Text', 'pj.title'=>'Text', 'p.amount'=>'Numeric', 'pf.amount'=>'Numeric', 'p.rowid'=>'Numeric', 'p.ref'=>'Text', 'p.title'=>'Text', 'p.datep'=>'Date', 'p.num_paiement'=>'Numeric',
|
||||||
|
|||||||
@ -174,7 +174,7 @@ class modGravatar extends DolibarrModules
|
|||||||
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
||||||
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
||||||
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
||||||
// 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
// 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
||||||
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",
|
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",
|
||||||
// 'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",
|
// 'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",
|
||||||
// 'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
// 'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
||||||
@ -182,7 +182,7 @@ class modGravatar extends DolibarrModules
|
|||||||
// $this->export_entities_array[$r]=array(
|
// $this->export_entities_array[$r]=array(
|
||||||
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
||||||
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
||||||
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",
|
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",
|
||||||
// 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",
|
// 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",
|
||||||
// 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",
|
// 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",
|
||||||
// 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
// 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
||||||
|
|||||||
@ -243,7 +243,7 @@ class modHoliday extends DolibarrModules
|
|||||||
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
||||||
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
||||||
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
||||||
// 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
// 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
||||||
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
||||||
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
||||||
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
||||||
@ -251,7 +251,7 @@ class modHoliday extends DolibarrModules
|
|||||||
// $this->export_entities_array[$r]=array(
|
// $this->export_entities_array[$r]=array(
|
||||||
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
||||||
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
||||||
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",
|
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",
|
||||||
// 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",
|
// 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",
|
||||||
// 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",
|
// 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",
|
||||||
// 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
// 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
||||||
@ -260,7 +260,7 @@ class modHoliday extends DolibarrModules
|
|||||||
// 's.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.zip'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.phone'=>'soc_tel',
|
// 's.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.zip'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.phone'=>'soc_tel',
|
||||||
// 's.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy',
|
// 's.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy',
|
||||||
// 's.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",
|
// 's.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",
|
||||||
// 'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid',
|
// 'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.total_tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid',
|
||||||
// 'fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",
|
// 'fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",
|
||||||
// 'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid',
|
// 'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid',
|
||||||
// 'p.ref'=>'productref'
|
// 'p.ref'=>'productref'
|
||||||
|
|||||||
@ -221,7 +221,7 @@ class modMultiCurrency extends DolibarrModules
|
|||||||
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
||||||
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
||||||
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
||||||
// 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
// 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
||||||
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
||||||
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
||||||
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
||||||
@ -230,7 +230,7 @@ class modMultiCurrency extends DolibarrModules
|
|||||||
// 't.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric',
|
// 't.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric',
|
||||||
// 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text',
|
// 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text',
|
||||||
// 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text',
|
// 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text',
|
||||||
// 'f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",
|
// 'f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric",
|
||||||
// 'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",
|
// 'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",
|
||||||
// 'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",
|
// 'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",
|
||||||
// 'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text',
|
// 'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text',
|
||||||
@ -239,8 +239,8 @@ class modMultiCurrency extends DolibarrModules
|
|||||||
// $this->export_entities_array[$r]=array(
|
// $this->export_entities_array[$r]=array(
|
||||||
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
||||||
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
||||||
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",
|
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",
|
||||||
// 'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",
|
// 'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",
|
||||||
// 'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",
|
// 'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",
|
||||||
// 'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
// 'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
||||||
//);
|
//);
|
||||||
|
|||||||
@ -168,8 +168,8 @@ class modPayBox extends DolibarrModules
|
|||||||
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town',
|
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town',
|
||||||
// 's.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3',
|
// 's.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3',
|
||||||
// 's.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode',
|
// 's.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode',
|
||||||
// 'f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",
|
// 'f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",
|
||||||
// 'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId',
|
// 'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId',
|
||||||
// 'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",
|
// 'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",
|
||||||
// 'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef',
|
// 'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef',
|
||||||
// );
|
// );
|
||||||
@ -177,7 +177,7 @@ class modPayBox extends DolibarrModules
|
|||||||
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company',
|
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company',
|
||||||
// 's.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company',
|
// 's.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company',
|
||||||
// 's.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",
|
// 's.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",
|
||||||
// 'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice',
|
// 'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice',
|
||||||
// 'f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",
|
// 'f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",
|
||||||
// 'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",
|
// 'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",
|
||||||
// 'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product',
|
// 'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product',
|
||||||
|
|||||||
@ -175,7 +175,7 @@ class modPaypal extends DolibarrModules
|
|||||||
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
// 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
||||||
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
// 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
||||||
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
// 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",
|
||||||
// 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
// 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus',
|
||||||
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
// 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",
|
||||||
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
// 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",
|
||||||
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
// 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'
|
||||||
@ -183,8 +183,8 @@ class modPaypal extends DolibarrModules
|
|||||||
// $this->export_entities_array[$r]=array(
|
// $this->export_entities_array[$r]=array(
|
||||||
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
// 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
||||||
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
// 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
|
||||||
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",
|
// 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",
|
||||||
// 'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",
|
// 'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",
|
||||||
// 'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",
|
// 'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",
|
||||||
// 'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
// 'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'
|
||||||
// );
|
// );
|
||||||
|
|||||||
@ -1111,7 +1111,17 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||||
$pdf->SetXY($posx, $posy);
|
$pdf->SetXY($posx, $posy);
|
||||||
$pdf->SetTextColor(0, 0, 60);
|
$pdf->SetTextColor(0, 0, 60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierInvoice")." ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
|
$title = $outputlangs->transnoentities("PdfInvoiceTitle");
|
||||||
|
if ($object->type == 1) {
|
||||||
|
$title = $outputlangs->transnoentities("InvoiceReplacement");
|
||||||
|
}
|
||||||
|
if ($object->type == 2) {
|
||||||
|
$title = $outputlangs->transnoentities("InvoiceAvoir");
|
||||||
|
}
|
||||||
|
if ($object->type == 3) {
|
||||||
|
$title = $outputlangs->transnoentities("InvoiceDeposit");
|
||||||
|
}
|
||||||
|
$pdf->MultiCell(100, 3, $title." ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||||
$posy += 1;
|
$posy += 1;
|
||||||
|
|
||||||
if ($object->ref_supplier) {
|
if ($object->ref_supplier) {
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php
|
* \file htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php
|
||||||
* \ingroup commande
|
* \ingroup Supplier invoice
|
||||||
* \brief File containing the Tulip Class of numbering models of suppliers invoices references
|
* \brief File containing the Tulip Class of numbering models of suppliers invoices references
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||||||
$tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice"));
|
$tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice"));
|
||||||
$tooltip .= $langs->trans("GenericMaskCodes5");
|
$tooltip .= $langs->trans("GenericMaskCodes5");
|
||||||
|
|
||||||
// Parametrage du prefix
|
// Setting the prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')';
|
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')';
|
||||||
$texte .= ':</td>';
|
$texte .= ':</td>';
|
||||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||||
@ -99,7 +99,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||||||
|
|
||||||
$texte .= '</tr>';
|
$texte .= '</tr>';
|
||||||
|
|
||||||
// Parametrage du prefix des avoirs
|
// Prefix setting of credit note
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>';
|
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>';
|
||||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||||
$texte .= '</tr>';
|
$texte .= '</tr>';
|
||||||
@ -109,14 +109,13 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
|
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
|
||||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||||
$texte .= '</tr>';
|
$texte .= '</tr>';
|
||||||
|
|
||||||
|
|
||||||
// Parametrage du prefix des acomptes
|
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</td>';
|
|
||||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
|
||||||
$texte .= '</tr>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prefix setting of deposit
|
||||||
|
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</td>';
|
||||||
|
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||||
|
$texte .= '</tr>';
|
||||||
|
|
||||||
$texte .= '</table>';
|
$texte .= '</table>';
|
||||||
$texte .= '</form>';
|
$texte .= '</form>';
|
||||||
|
|
||||||
|
|||||||
@ -182,6 +182,9 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||||||
if ($object->element == 'mo') {
|
if ($object->element == 'mo') {
|
||||||
$permok = $user->rights->mrp->write;
|
$permok = $user->rights->mrp->write;
|
||||||
}
|
}
|
||||||
|
if ($object->element == 'contact') {
|
||||||
|
$permok = $user->rights->societe->contact->creer;
|
||||||
|
}
|
||||||
|
|
||||||
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
|
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
|
||||||
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra]))
|
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra]))
|
||||||
|
|||||||
@ -120,7 +120,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This is usel
|
|||||||
$dataseries = array();
|
$dataseries = array();
|
||||||
$colorseries = array();
|
$colorseries = array();
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -129,7 +129,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
|
|||||||
@ -507,7 +507,7 @@ if ($object->id > 0) {
|
|||||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
//Query from product/liste.php
|
//Query from product/liste.php
|
||||||
$sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity,';
|
$sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity, p.tosell as status, p.tobuy as status_buy, p.tobatch as status_batch,';
|
||||||
$sql .= ' pfp.tms, pfp.ref_fourn as supplier_ref, pfp.price, pfp.quantity, pfp.unitprice';
|
$sql .= ' pfp.tms, pfp.ref_fourn as supplier_ref, pfp.price, pfp.quantity, pfp.unitprice';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp';
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pfp.fk_product";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pfp.fk_product";
|
||||||
@ -539,6 +539,9 @@ if ($object->id > 0) {
|
|||||||
$productstatic->label = $objp->label;
|
$productstatic->label = $objp->label;
|
||||||
$productstatic->type = $objp->fk_product_type;
|
$productstatic->type = $objp->fk_product_type;
|
||||||
$productstatic->entity = $objp->entity;
|
$productstatic->entity = $objp->entity;
|
||||||
|
$productstatic->status = $objp->status;
|
||||||
|
$productstatic->status_buy = $objp->status_buy;
|
||||||
|
$productstatic->status_batch = $objp->status_batch;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||||
* Copyright (C) 2015-2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015-2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
@ -34,6 +34,8 @@
|
|||||||
* \brief File of class to manage suppliers invoices
|
* \brief File of class to manage suppliers invoices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
@ -124,6 +126,19 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public $statut;
|
public $statut;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ! Closing after partial payment: discount_vat, badsupplier, abandon
|
||||||
|
* ! Closing when no payment: replaced, abandoned
|
||||||
|
* @var string Close code
|
||||||
|
*/
|
||||||
|
public $close_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ! Comment if paid without full payment
|
||||||
|
* @var string Close note
|
||||||
|
*/
|
||||||
|
public $close_note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to 1 if the invoice is completely paid, otherwise is 0
|
* Set to 1 if the invoice is completely paid, otherwise is 0
|
||||||
* @var int
|
* @var int
|
||||||
@ -311,7 +326,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
* Classified paid.
|
* Classified paid.
|
||||||
* If paid partially, $this->close_code can be:
|
* If paid partially, $this->close_code can be:
|
||||||
* - CLOSECODE_DISCOUNTVAT
|
* - CLOSECODE_DISCOUNTVAT
|
||||||
* - CLOSECODE_BADDEBT
|
* - CLOSECODE_BADCREDIT
|
||||||
* If paid completelly, this->close_code will be null
|
* If paid completelly, this->close_code will be null
|
||||||
*/
|
*/
|
||||||
const STATUS_CLOSED = 2;
|
const STATUS_CLOSED = 2;
|
||||||
@ -319,7 +334,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
/**
|
/**
|
||||||
* Classified abandoned and no payment done.
|
* Classified abandoned and no payment done.
|
||||||
* $this->close_code can be:
|
* $this->close_code can be:
|
||||||
* - CLOSECODE_BADDEBT
|
* - CLOSECODE_BADCREDIT
|
||||||
* - CLOSECODE_ABANDONED
|
* - CLOSECODE_ABANDONED
|
||||||
* - CLOSECODE_REPLACED
|
* - CLOSECODE_REPLACED
|
||||||
*/
|
*/
|
||||||
@ -1318,36 +1333,53 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public function setPaid($user, $close_code = '', $close_note = '')
|
public function setPaid($user, $close_code = '', $close_note = '')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
if ($this->paye != 1) {
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn';
|
$now = dol_now();
|
||||||
$sql .= ' SET paye = 1, fk_statut = '.self::STATUS_CLOSED;
|
|
||||||
$sql .= ' WHERE rowid = '.$this->id;
|
|
||||||
|
|
||||||
dol_syslog("FactureFournisseur::set_paid", LOG_DEBUG);
|
dol_syslog("FactureFournisseur::set_paid", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if ($resql) {
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn SET';
|
||||||
// Call trigger
|
$sql .= ' fk_statut = '.self::STATUS_CLOSED;
|
||||||
$result = $this->call_trigger('BILL_SUPPLIER_PAYED', $user);
|
if (!$close_code) {
|
||||||
if ($result < 0) {
|
$sql .= ', paye=1';
|
||||||
$error++;
|
|
||||||
}
|
}
|
||||||
// End call triggers
|
if ($close_code) {
|
||||||
} else {
|
$sql .= ", close_code='".$this->db->escape($close_code)."'";
|
||||||
$error++;
|
}
|
||||||
$this->error = $this->db->error();
|
if ($close_note) {
|
||||||
dol_print_error($this->db);
|
$sql .= ", close_note='".$this->db->escape($close_note)."'";
|
||||||
}
|
}
|
||||||
|
$sql .= ', fk_user_closing = '.$user->id;
|
||||||
|
$sql .= ", date_closing = '".$this->db->idate($now)."'";
|
||||||
|
$sql .= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
if (!$error) {
|
$resql = $this->db->query($sql);
|
||||||
$this->db->commit();
|
if ($resql) {
|
||||||
return 1;
|
// Call trigger
|
||||||
|
$result = $this->call_trigger('BILL_SUPPLIER_PAYED', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
// End call triggers
|
||||||
|
} else {
|
||||||
|
$error++;
|
||||||
|
$this->error = $this->db->error();
|
||||||
|
dol_print_error($this->db);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$this->db->commit();
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->db->rollback();
|
return 0;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1385,7 +1417,9 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn';
|
||||||
$sql .= ' SET paye=0, fk_statut=1, close_code=null, close_note=null';
|
$sql .= ' SET paye=0, fk_statut='.self::STATUS_VALIDATED.', close_code=null, close_note=null';
|
||||||
|
$sql .= ' date_closing=null,';
|
||||||
|
$sql .= ' fk_user_closing=null';
|
||||||
$sql .= ' WHERE rowid = '.$this->id;
|
$sql .= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
dol_syslog("FactureFournisseur::set_unpaid", LOG_DEBUG);
|
dol_syslog("FactureFournisseur::set_unpaid", LOG_DEBUG);
|
||||||
@ -1399,8 +1433,8 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
// End call triggers
|
// End call triggers
|
||||||
} else {
|
} else {
|
||||||
$error++;
|
$error++;
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->error();
|
||||||
dol_syslog("FactureFournisseur::set_unpaid ".$this->error);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
@ -1412,6 +1446,64 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tag invoice as canceled, with no payment on it (example for replacement invoice or payment never received) + call trigger BILL_CANCEL
|
||||||
|
* Warning, if option to decrease stock on invoice was set, this function does not change stock (it might be a cancel because
|
||||||
|
* of no payment even if merchandises were sent).
|
||||||
|
*
|
||||||
|
* @param User $user Object user making change
|
||||||
|
* @param string $close_code Code of closing invoice (CLOSECODE_REPLACED, CLOSECODE_...)
|
||||||
|
* @param string $close_note Comment
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function setCanceled($user, $close_code = '', $close_note = '')
|
||||||
|
{
|
||||||
|
dol_syslog(get_class($this)."::setCanceled rowid=".((int) $this->id), LOG_DEBUG);
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn SET';
|
||||||
|
$sql .= ' fk_statut='.self::STATUS_ABANDONED;
|
||||||
|
if ($close_code) {
|
||||||
|
$sql .= ", close_code='".$this->db->escape($close_code)."'";
|
||||||
|
}
|
||||||
|
if ($close_note) {
|
||||||
|
$sql .= ", close_note='".$this->db->escape($close_note)."'";
|
||||||
|
}
|
||||||
|
$sql .= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
// Bound discounts are deducted from the invoice
|
||||||
|
// as they have not been used since the invoice is abandoned.
|
||||||
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
||||||
|
$sql .= ' SET fk_invoice_supplier = NULL';
|
||||||
|
$sql .= ' WHERE fk_invoice_supplier = '.$this->id;
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
// Call trigger
|
||||||
|
$result = $this->call_trigger('BILL_SUPPLIER_CANCEL', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
// End call triggers
|
||||||
|
|
||||||
|
$this->db->commit();
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
$this->error = $this->db->error()." sql=".$sql;
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->error = $this->db->error()." sql=".$sql;
|
||||||
|
$this->db->rollback();
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag invoice as validated + call trigger BILL_VALIDATE
|
* Tag invoice as validated + call trigger BILL_VALIDATE
|
||||||
*
|
*
|
||||||
@ -2703,6 +2795,10 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$object->ref_client = '';
|
$object->ref_client = '';
|
||||||
$object->close_code = '';
|
$object->close_code = '';
|
||||||
$object->close_note = '';
|
$object->close_note = '';
|
||||||
|
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1) {
|
||||||
|
$object->note_private = '';
|
||||||
|
$object->note_public = '';
|
||||||
|
}
|
||||||
|
|
||||||
// Loop on each line of new invoice
|
// Loop on each line of new invoice
|
||||||
foreach ($object->lines as $i => $line) {
|
foreach ($object->lines as $i => $line) {
|
||||||
|
|||||||
@ -115,7 +115,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
@ -112,18 +112,18 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture',
|
|||||||
|
|
||||||
// Common permissions
|
// Common permissions
|
||||||
$usercanread = $user->rights->fournisseur->facture->lire;
|
$usercanread = $user->rights->fournisseur->facture->lire;
|
||||||
$usercancreate = $user->rights->fournisseur->facture->creer;
|
$usercancreate = $user->rights->fournisseur->facture->creer;
|
||||||
$usercandelete = $user->rights->fournisseur->facture->supprimer;
|
$usercandelete = $user->rights->fournisseur->facture->supprimer;
|
||||||
|
|
||||||
// Advanced permissions
|
// Advanced permissions
|
||||||
$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate)));
|
$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate)));
|
||||||
$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->fournisseur->supplier_invoice_advance->send);
|
$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->fournisseur->supplier_invoice_advance->send);
|
||||||
|
|
||||||
// Permissions for includes
|
// Permissions for includes
|
||||||
$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php
|
||||||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||||
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
|
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
|
||||||
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -283,6 +283,32 @@ if (empty($reshook)) {
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
} elseif ($action == 'confirm_paid_partially' && $confirm == 'yes') {
|
||||||
|
// Classif "paid partialy"
|
||||||
|
$object->fetch($id);
|
||||||
|
$close_code = GETPOST("close_code", 'restricthtml');
|
||||||
|
$close_note = GETPOST("close_note", 'restricthtml');
|
||||||
|
if ($close_code) {
|
||||||
|
$result = $object->setPaid($user, $close_code, $close_note);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors');
|
||||||
|
}
|
||||||
|
} elseif ($action == 'confirm_canceled' && $confirm == 'yes') {
|
||||||
|
// Classify "abandoned"
|
||||||
|
$object->fetch($id);
|
||||||
|
$close_code = GETPOST("close_code", 'restricthtml');
|
||||||
|
$close_note = GETPOST("close_note", 'restricthtml');
|
||||||
|
if ($close_code) {
|
||||||
|
$result = $object->setCanceled($user, $close_code, $close_note);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set supplier ref
|
// Set supplier ref
|
||||||
@ -497,11 +523,15 @@ if (empty($reshook)) {
|
|||||||
// Loop on each vat rate
|
// Loop on each vat rate
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
if ($line->product_type < 9 && $line->total_ht != 0) { // Remove lines with product_type greater than or equal to 9
|
if ($line->product_type < 9 && $line->total_ht != 0) { // Remove lines with product_type greater than or equal to 9 and no need to create discount if amount is null
|
||||||
// no need to create discount if amount is null
|
$keyforvatrate = $line->tva_tx.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : '');
|
||||||
|
|
||||||
$amount_ht[$line->tva_tx] += $line->total_ht;
|
$amount_ht[$line->tva_tx] += $line->total_ht;
|
||||||
$amount_tva[$line->tva_tx] += $line->total_tva;
|
$amount_tva[$line->tva_tx] += $line->total_tva;
|
||||||
$amount_ttc[$line->tva_tx] += $line->total_ttc;
|
$amount_ttc[$line->tva_tx] += $line->total_ttc;
|
||||||
|
$multicurrency_amount_ht[$keyforvatrate] += $line->multicurrency_total_ht;
|
||||||
|
$multicurrency_amount_tva[$keyforvatrate] += $line->multicurrency_total_tva;
|
||||||
|
$multicurrency_amount_ttc[$keyforvatrate] += $line->multicurrency_total_ttc;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -515,6 +545,9 @@ if (empty($reshook)) {
|
|||||||
$amount_ht[$vatrate] = price2num($amount_ht[$vatrate] * $ratio, 'MU');
|
$amount_ht[$vatrate] = price2num($amount_ht[$vatrate] * $ratio, 'MU');
|
||||||
$amount_tva[$vatrate] = price2num($amount_tva[$vatrate] * $ratio, 'MU');
|
$amount_tva[$vatrate] = price2num($amount_tva[$vatrate] * $ratio, 'MU');
|
||||||
$amount_ttc[$vatrate] = price2num($amount_ttc[$vatrate] * $ratio, 'MU');
|
$amount_ttc[$vatrate] = price2num($amount_ttc[$vatrate] * $ratio, 'MU');
|
||||||
|
$multicurrency_amount_ht[$vatrate] = price2num($multicurrency_amount_ht[$vatrate] * $ratio, 'MU');
|
||||||
|
$multicurrency_amount_tva[$vatrate] = price2num($multicurrency_amount_tva[$vatrate] * $ratio, 'MU');
|
||||||
|
$multicurrency_amount_ttc[$vatrate] = price2num($multicurrency_amount_ttc[$vatrate] * $ratio, 'MU');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -574,6 +607,7 @@ if (empty($reshook)) {
|
|||||||
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
||||||
$discount->amount_tva = 0;
|
$discount->amount_tva = 0;
|
||||||
$discount->tva_tx = 0;
|
$discount->tva_tx = 0;
|
||||||
|
$discount->vat_src_code = '';
|
||||||
|
|
||||||
$result = $discount->create($user);
|
$result = $discount->create($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -585,7 +619,20 @@ if (empty($reshook)) {
|
|||||||
$discount->amount_ht = abs($amount_ht[$tva_tx]);
|
$discount->amount_ht = abs($amount_ht[$tva_tx]);
|
||||||
$discount->amount_tva = abs($amount_tva[$tva_tx]);
|
$discount->amount_tva = abs($amount_tva[$tva_tx]);
|
||||||
$discount->amount_ttc = abs($amount_ttc[$tva_tx]);
|
$discount->amount_ttc = abs($amount_ttc[$tva_tx]);
|
||||||
|
$discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]);
|
||||||
|
$discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]);
|
||||||
|
$discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]);
|
||||||
|
|
||||||
|
// Clean vat code
|
||||||
|
$reg = array();
|
||||||
|
$vat_src_code = '';
|
||||||
|
if (preg_match('/\((.*)\)/', $tva_tx, $reg)) {
|
||||||
|
$vat_src_code = $reg[1];
|
||||||
|
$tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx); // Remove code into vatrate.
|
||||||
|
}
|
||||||
|
|
||||||
$discount->tva_tx = abs($tva_tx);
|
$discount->tva_tx = abs($tva_tx);
|
||||||
|
$discount->vat_src_code = $vat_src_code;
|
||||||
|
|
||||||
$result = $discount->create($user);
|
$result = $discount->create($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -628,7 +675,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($action == 'add' && $usercancreate) {
|
} elseif ($action == 'add' && $usercancreate) {
|
||||||
// Create
|
// Insert new invoice in database
|
||||||
if ($socid > 0) {
|
if ($socid > 0) {
|
||||||
$object->socid = GETPOST('socid', 'int');
|
$object->socid = GETPOST('socid', 'int');
|
||||||
}
|
}
|
||||||
@ -813,7 +860,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Standard or deposit
|
// Standard invoice or Deposit invoice, created from a Predefined template invoice
|
||||||
if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT) {
|
if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT) {
|
||||||
if (GETPOST('socid', 'int') < 1) {
|
if (GETPOST('socid', 'int') < 1) {
|
||||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors');
|
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors');
|
||||||
@ -843,24 +890,26 @@ if (empty($reshook)) {
|
|||||||
$tmpproject = GETPOST('projectid', 'int');
|
$tmpproject = GETPOST('projectid', 'int');
|
||||||
|
|
||||||
// Creation invoice
|
// Creation invoice
|
||||||
$object->ref = GETPOST('ref', 'nohtml');
|
$object->socid = GETPOST('socid', 'int');
|
||||||
$object->ref_supplier = GETPOST('ref_supplier', 'nohtml');
|
$object->type = GETPOST('type');
|
||||||
$object->socid = GETPOST('socid', 'int');
|
$object->ref = GETPOST('ref', 'nohtml');
|
||||||
$object->libelle = GETPOST('label', 'nohtml'); // deprecated
|
$object->ref_supplier = GETPOST('ref_supplier', 'nohtml');
|
||||||
$object->label = GETPOST('label', 'nohtml');
|
$object->socid = GETPOST('socid', 'int');
|
||||||
$object->date = $dateinvoice;
|
$object->libelle = GETPOST('label', 'nohtml'); // deprecated
|
||||||
$object->date_echeance = $datedue;
|
$object->label = GETPOST('label', 'nohtml');
|
||||||
$object->note_public = GETPOST('note_public', 'restricthtml');
|
$object->date = $dateinvoice;
|
||||||
$object->note_private = GETPOST('note_private', 'restricthtml');
|
$object->date_echeance = $datedue;
|
||||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
$object->note_public = GETPOST('note_public', 'restricthtml');
|
||||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
$object->note_private = GETPOST('note_private', 'restricthtml');
|
||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||||
$object->fk_project = ($tmpproject > 0) ? $tmpproject : null;
|
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
$object->fk_project = ($tmpproject > 0) ? $tmpproject : null;
|
||||||
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
|
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
||||||
$object->transport_mode_id = GETPOST('transport_mode_id');
|
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
||||||
|
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
|
||||||
|
$object->transport_mode_id = GETPOST('transport_mode_id');
|
||||||
|
|
||||||
// Auto calculation of date due if not filled by user
|
// Auto calculation of date due if not filled by user
|
||||||
if (empty($object->date_echeance)) {
|
if (empty($object->date_echeance)) {
|
||||||
@ -935,6 +984,123 @@ if (empty($reshook)) {
|
|||||||
$srcobject = new $classname($db);
|
$srcobject = new $classname($db);
|
||||||
|
|
||||||
$result = $srcobject->fetch(GETPOST('originid', 'int'));
|
$result = $srcobject->fetch(GETPOST('originid', 'int'));
|
||||||
|
|
||||||
|
// If deposit invoice - down payment with 1 line (fixed amount or percent)
|
||||||
|
if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) {
|
||||||
|
// Define the array $amountdeposit
|
||||||
|
$amountdeposit = array();
|
||||||
|
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA)) {
|
||||||
|
if ($typeamount == 'amount') {
|
||||||
|
$amount = $valuedeposit;
|
||||||
|
} else {
|
||||||
|
$amount = $srcobject->total_ttc * ($valuedeposit / 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
$TTotalByTva = array();
|
||||||
|
foreach ($srcobject->lines as &$line) {
|
||||||
|
if (!empty($line->special_code)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$TTotalByTva[$line->tva_tx] += $line->total_ttc;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($TTotalByTva as $tva => &$total) {
|
||||||
|
$coef = $total / $srcobject->total_ttc; // Calc coef
|
||||||
|
$am = $amount * $coef;
|
||||||
|
$amount_ttc_diff += $am;
|
||||||
|
$amountdeposit[$tva] += $am / (1 + $tva / 100); // Convert into HT for the addline
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($typeamount == 'amount') {
|
||||||
|
$amountdeposit[0] = $valuedeposit;
|
||||||
|
} elseif ($typeamount == 'variable') {
|
||||||
|
if ($result > 0) {
|
||||||
|
$totalamount = 0;
|
||||||
|
$lines = $srcobject->lines;
|
||||||
|
$numlines = count($lines);
|
||||||
|
for ($i = 0; $i < $numlines; $i++) {
|
||||||
|
$qualified = 1;
|
||||||
|
if (empty($lines[$i]->qty)) {
|
||||||
|
$qualified = 0; // We discard qty=0, it is an option
|
||||||
|
}
|
||||||
|
if (!empty($lines[$i]->special_code)) {
|
||||||
|
$qualified = 0; // We discard special_code (frais port, ecotaxe, option, ...)
|
||||||
|
}
|
||||||
|
if ($qualified) {
|
||||||
|
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
|
||||||
|
$tva_tx = $lines[$i]->tva_tx;
|
||||||
|
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($totalamount == 0) {
|
||||||
|
$amountdeposit[0] = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setEventMessages($srcobject->error, $srcobject->errors, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$amount_ttc_diff = $amountdeposit[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($amountdeposit as $tva => $amount) {
|
||||||
|
if (empty($amount)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$arraylist = array(
|
||||||
|
'amount' => 'FixAmount',
|
||||||
|
'variable' => 'VarAmount'
|
||||||
|
);
|
||||||
|
$descline = '(DEPOSIT)';
|
||||||
|
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
|
||||||
|
if ($typeamount == 'amount') {
|
||||||
|
$descline .= ' ('.price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
|
||||||
|
} elseif ($typeamount == 'variable') {
|
||||||
|
$descline .= ' ('.$valuedeposit.'%)';
|
||||||
|
}
|
||||||
|
|
||||||
|
$descline .= ' - '.$srcobject->ref;
|
||||||
|
$result = $object->addline(
|
||||||
|
$descline,
|
||||||
|
$amount, // subprice
|
||||||
|
$tva, // vat rate
|
||||||
|
0, // localtax1_tx
|
||||||
|
0, // localtax2_tx
|
||||||
|
1, // quantity
|
||||||
|
(empty($conf->global->INVOICE_PRODUCTID_DEPOSIT) ? 0 : $conf->global->INVOICE_PRODUCTID_DEPOSIT), // fk_product
|
||||||
|
0, // remise_percent
|
||||||
|
0, // date_start
|
||||||
|
0, // date_end
|
||||||
|
0,
|
||||||
|
$lines[$i]->info_bits, // info_bits
|
||||||
|
'HT',
|
||||||
|
0, // product_type
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
$object->origin,
|
||||||
|
0,
|
||||||
|
'',
|
||||||
|
$lines[$i]->special_code,
|
||||||
|
0
|
||||||
|
//,$langs->trans('Deposit') //Deprecated
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$diff = $object->total_ttc - $amount_ttc_diff;
|
||||||
|
|
||||||
|
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA) && $diff != 0) {
|
||||||
|
$object->fetch_lines();
|
||||||
|
$subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx / 100);
|
||||||
|
$object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$lines = $srcobject->lines;
|
$lines = $srcobject->lines;
|
||||||
if (empty($lines) && method_exists($srcobject, 'fetch_lines')) {
|
if (empty($lines) && method_exists($srcobject, 'fetch_lines')) {
|
||||||
@ -1798,40 +1964,64 @@ if ($action == 'create') {
|
|||||||
print $desc;
|
print $desc;
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
|
|
||||||
/* Not yet supported
|
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid)))) {
|
||||||
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid))))
|
// Deposit - Down payment
|
||||||
{
|
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) {
|
||||||
// Deposit
|
|
||||||
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT))
|
|
||||||
{
|
|
||||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||||
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
|
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
|
||||||
print '<script type="text/javascript" language="javascript">
|
print '<script type="text/javascript" language="javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jQuery("#typedeposit, #valuedeposit").click(function() {
|
jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() {
|
||||||
|
jQuery("#radio_standard").prop("checked", true);
|
||||||
|
});
|
||||||
|
jQuery("#typedeposit, #valuedeposit").click(function() {
|
||||||
|
jQuery("#radio_deposit").prop("checked", true);
|
||||||
|
});
|
||||||
|
jQuery("#typedeposit").change(function() {
|
||||||
|
console.log("We change type of down payment");
|
||||||
jQuery("#radio_deposit").prop("checked", true);
|
jQuery("#radio_deposit").prop("checked", true);
|
||||||
|
setRadioForTypeOfInvoice();
|
||||||
});
|
});
|
||||||
});
|
jQuery("#radio_standard, #radio_deposit, #radio_replacement, #radio_template").change(function() {
|
||||||
</script>';
|
setRadioForTypeOfInvoice();
|
||||||
|
});
|
||||||
|
function setRadioForTypeOfInvoice() {
|
||||||
|
console.log("Change radio");
|
||||||
|
if (jQuery("#radio_deposit").prop("checked") && (jQuery("#typedeposit").val() == \'amount\' || jQuery("#typedeposit").val() == \'variable\')) {
|
||||||
|
jQuery(".checkforselect").prop("disabled", true);
|
||||||
|
jQuery(".checkforselect").prop("checked", false);
|
||||||
|
} else {
|
||||||
|
jQuery(".checkforselect").prop("disabled", false);
|
||||||
|
jQuery(".checkforselect").prop("checked", true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
|
||||||
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
|
$tmp = $tmp.'<label for="radio_deposit" >'.$langs->trans("InvoiceDeposit").'</label>';
|
||||||
print '<table class="nobordernopadding"><tr><td>';
|
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
|
||||||
|
print '<table class="nobordernopadding"><tr>';
|
||||||
|
print '<td>';
|
||||||
print $desc;
|
print $desc;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (($origin == 'propal') || ($origin == 'commande'))
|
if (($origin == 'propal') || ($origin == 'commande')) {
|
||||||
{
|
print '<td class="nowrap" style="padding-left: 15px">';
|
||||||
print '<td class="nowrap" style="padding-left: 5px">';
|
$arraylist = array(
|
||||||
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
'amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')),
|
||||||
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')),
|
||||||
|
'variablealllines' => $langs->transnoentitiesnoconv('VarAmountAllLines')
|
||||||
|
);
|
||||||
|
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit', 'aZ09'), 0, 0, 0, '', 1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="nowrap" style="padding-left: 5px">';
|
||||||
|
print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="' . GETPOST('valuedeposit', 'int') . '"/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
|
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</tr></table>';
|
||||||
|
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/* Not yet supported for supplier
|
/* Not yet supported for supplier
|
||||||
if ($societe->id > 0)
|
if ($societe->id > 0)
|
||||||
@ -2340,10 +2530,68 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Confirmation set paid
|
// Confirmation set paid
|
||||||
if ($action == 'paid') {
|
if ($action == 'paid' && $resteapayer <= 0) {
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'paid' && $resteapayer > 0) {
|
||||||
|
$close = array();
|
||||||
|
// Code
|
||||||
|
$i = 0;
|
||||||
|
$close[$i]['code'] = 'discount_vat'; // escompte
|
||||||
|
$i++;
|
||||||
|
$close[$i]['code'] = 'badsupplier';
|
||||||
|
$i++;
|
||||||
|
$close[$i]['code'] = 'other';
|
||||||
|
$i++;
|
||||||
|
// Help
|
||||||
|
$i = 0;
|
||||||
|
$close[$i]['label'] = $langs->trans("HelpEscompte").'<br><br>'.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc");
|
||||||
|
$i++;
|
||||||
|
$close[$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadSupplierDesc");
|
||||||
|
$i++;
|
||||||
|
$close[$i]['label'] = $langs->trans("Other");
|
||||||
|
$i++;
|
||||||
|
// Text
|
||||||
|
$i = 0;
|
||||||
|
$close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1);
|
||||||
|
$i++;
|
||||||
|
$close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1);
|
||||||
|
$i++;
|
||||||
|
$close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("Other"), $close[$i]['label'], 1);
|
||||||
|
$i++;
|
||||||
|
// arrayreasons[code]=reason
|
||||||
|
foreach ($close as $key => $val) {
|
||||||
|
$arrayreasons[$close[$key]['code']] = $close[$key]['reason'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a form table
|
||||||
|
$formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300'));
|
||||||
|
// Incomplete payment. We ask if the reason is discount or other
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 310);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Confirmation of the abandoned classification
|
||||||
|
if ($action == 'canceled') {
|
||||||
|
// Code
|
||||||
|
$close[1]['code'] = 'badsupplier';
|
||||||
|
$close[2]['code'] = 'abandon';
|
||||||
|
// Help
|
||||||
|
$close[1]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadSupplierDesc");
|
||||||
|
$close[2]['label'] = $langs->trans("ConfirmClassifyAbandonReasonOtherDesc");
|
||||||
|
// Text
|
||||||
|
$close[1]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadSupplier", $object->ref), $close[1]['label'], 1);
|
||||||
|
$close[2]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close[2]['label'], 1);
|
||||||
|
// arrayreasons
|
||||||
|
$arrayreasons[$close[1]['code']] = $close[1]['reason'];
|
||||||
|
$arrayreasons[$close[2]['code']] = $close[2]['reason'];
|
||||||
|
|
||||||
|
// Create a form table
|
||||||
|
$formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300'));
|
||||||
|
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes", 1, 250);
|
||||||
|
}
|
||||||
|
|
||||||
// Confirmation de la suppression de la facture fournisseur
|
// Confirmation de la suppression de la facture fournisseur
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||||
@ -3109,9 +3357,9 @@ if ($action == 'create') {
|
|||||||
$ventilExportCompta = $object->getVentilExportCompta(); // Should be 0 since the sum of payments are zero. But we keep the protection.
|
$ventilExportCompta = $object->getVentilExportCompta(); // Should be 0 since the sum of payments are zero. But we keep the protection.
|
||||||
|
|
||||||
if ($ventilExportCompta == 0) {
|
if ($ventilExportCompta == 0) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a></div>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Modify').'</span></div>';
|
print '<span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Modify').'</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3120,15 +3368,29 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
// Reopen a standard paid invoice
|
// Reopen a standard paid invoice
|
||||||
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT
|
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT
|
||||||
|| ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id)))
|
|| ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id))
|
||||||
|
|| ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discount->id)))
|
||||||
&& ($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED)) { // A paid invoice (partially or completely)
|
&& ($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED)) { // A paid invoice (partially or completely)
|
||||||
if (!$facidnext && $object->close_code != 'replaced' && $usercancreate) { // Not replaced by another invoice
|
if (!$facidnext && $object->close_code != 'replaced' && $usercancreate) { // Not replaced by another invoice
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a></div>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a>';
|
||||||
} else {
|
} else {
|
||||||
if ($usercancreate) {
|
if ($usercancreate) {
|
||||||
print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span></div>';
|
print '<span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span>';
|
||||||
} elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
|
} elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
|
||||||
print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip">'.$langs->trans('ReOpen').'</span></div>';
|
print '<span class="butActionRefused classfortooltip">'.$langs->trans('ReOpen').'</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate
|
||||||
|
if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_DRAFT) {
|
||||||
|
if (count($object->lines)) {
|
||||||
|
if ($usercanvalidate) {
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid"';
|
||||||
|
print '>'.$langs->trans('Validate').'</a>';
|
||||||
|
} else {
|
||||||
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"';
|
||||||
|
print '>'.$langs->trans('Validate').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3137,24 +3399,16 @@ if ($action == 'create') {
|
|||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
if (($object->statut == FactureFournisseur::STATUS_VALIDATED || $object->statut == FactureFournisseur::STATUS_CLOSED)) {
|
if (($object->statut == FactureFournisseur::STATUS_VALIDATED || $object->statut == FactureFournisseur::STATUS_CLOSED)) {
|
||||||
if ($usercansend) {
|
if ($usercansend) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip">'.$langs->trans('SendMail').'</a></div>';
|
print '<span class="butActionRefused classfortooltip">'.$langs->trans('SendMail').'</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make payments
|
// Create payment
|
||||||
if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) {
|
if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&action=create'.($object->fk_account > 0 ? '&accountid='.$object->fk_account : '').'">'.$langs->trans('DoPayment').'</a></div>'; // must use facid because id is for payment id not invoice
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.DOL_URL_ROOT.'/fourn/facture/paiement.php?facid='.$object->id.'&action=create'.($object->fk_account > 0 ? '&accountid='.$object->fk_account : '').'">'.$langs->trans('DoPayment').'</a>'; // must use facid because id is for payment id not invoice
|
||||||
}
|
|
||||||
|
|
||||||
// Classify paid
|
|
||||||
if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) {
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid"';
|
|
||||||
print '>'.$langs->trans('ClassifyPaid').'</a></div>';
|
|
||||||
|
|
||||||
//print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverse back money or convert to reduction
|
// Reverse back money or convert to reduction
|
||||||
@ -3162,37 +3416,43 @@ if ($action == 'create') {
|
|||||||
// For credit note only
|
// For credit note only
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0) {
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0) {
|
||||||
if ($resteapayer == 0) {
|
if ($resteapayer == 0) {
|
||||||
print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseRemainderToPayIsZero").'">'.$langs->trans('DoPaymentBack').'</span></div>';
|
print '<span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseRemainderToPayIsZero").'">'.$langs->trans('DoPaymentBack').'</span>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&action=create&accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a></div>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/paiement.php?facid='.$object->id.'&action=create&accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For standard invoice with excess paid
|
// For standard invoice with excess paid
|
||||||
if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $usercancreate && empty($discount->id)) {
|
if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $usercancreate && empty($discount->id)) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertExcessPaidToReduc').'</a></div>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertExcessPaidToReduc').'</a>';
|
||||||
}
|
}
|
||||||
// For credit note
|
// For credit note
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercancreate
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercancreate
|
||||||
&& (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) || $object->getSommePaiement() == 0)
|
&& (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) || $object->getSommePaiement() == 0)
|
||||||
) {
|
) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReducSupplier2")).'">'.$langs->trans('ConvertToReduc').'</a></div>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReducSupplier2")).'">'.$langs->trans('ConvertToReduc').'</a>';
|
||||||
}
|
}
|
||||||
// For deposit invoice
|
// For deposit invoice
|
||||||
if ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 1 && $resteapayer == 0 && $usercancreate && empty($discount->id)) {
|
if ($object->type == FactureFournisseur::TYPE_DEPOSIT && $usercancreate && $object->statut > 0 && empty($discount->id)) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a></div>';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate
|
// Classify paid
|
||||||
if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_DRAFT) {
|
if (($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && (($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0)))
|
||||||
if (count($object->lines)) {
|
|| ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && empty($discount->id))
|
||||||
if ($usercanvalidate) {
|
) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid"';
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
||||||
print '>'.$langs->trans('Validate').'</a></div>';
|
}
|
||||||
} else {
|
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"';
|
// Classify 'closed not completely paid' (possible if validated and not yet filed paid)
|
||||||
print '>'.$langs->trans('Validate').'</a></div>';
|
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0) {
|
||||||
|
if ($totalpaye > 0 || $totalcreditnotes > 0) {
|
||||||
|
// If one payment or one credit note was linked to this invoice
|
||||||
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaidPartially').'</a>';
|
||||||
|
} else {
|
||||||
|
if (empty($conf->global->INVOICE_CAN_NEVER_BE_CANCELED)) {
|
||||||
|
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=canceled">'.$langs->trans('ClassifyCanceled').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3203,34 +3463,34 @@ if ($action == 'create') {
|
|||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a></div>';
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Clone
|
|
||||||
if ($action != 'edit' && $usercancreate) {
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=clone&socid='.$object->socid.'">'.$langs->trans('ToClone').'</a></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a credit note
|
// Create a credit note
|
||||||
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut > 0 && $usercancreate) {
|
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut > 0 && $usercancreate) {
|
||||||
if (!$objectidnext) {
|
if (!$objectidnext) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&fac_avoir='.$object->id.'&action=create&type=2'.($object->fk_project > 0 ? '&projectid='.$object->fk_project : '').'">'.$langs->trans("CreateCreditNote").'</a></div>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&fac_avoir='.$object->id.'&action=create&type=2'.($object->fk_project > 0 ? '&projectid='.$object->fk_project : '').'">'.$langs->trans("CreateCreditNote").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clone
|
||||||
|
if ($action != 'edit' && $usercancreate) {
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=clone&socid='.$object->socid.'">'.$langs->trans('ToClone').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
$isErasable = $object->is_erasable();
|
$isErasable = $object->is_erasable();
|
||||||
if ($action != 'confirm_edit' && ($user->rights->fournisseur->facture->supprimer || ($usercancreate && $isErasable == 1))) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
|
if ($action != 'confirm_edit' && ($user->rights->fournisseur->facture->supprimer || ($usercancreate && $isErasable == 1))) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
|
||||||
//var_dump($isErasable);
|
//var_dump($isErasable);
|
||||||
if ($isErasable == -4) {
|
if ($isErasable == -4) {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecausePayments").'">'.$langs->trans('Delete').'</a></div>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecausePayments").'">'.$langs->trans('Delete').'</a>';
|
||||||
} elseif ($isErasable == -3) { // Should never happen with supplier invoice
|
} elseif ($isErasable == -3) { // Should never happen with supplier invoice
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastSituationInvoice").'">'.$langs->trans('Delete').'</a></div>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastSituationInvoice").'">'.$langs->trans('Delete').'</a>';
|
||||||
} elseif ($isErasable == -2) { // Should never happen with supplier invoice
|
} elseif ($isErasable == -2) { // Should never happen with supplier invoice
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastInvoice").'">'.$langs->trans('Delete').'</a></div>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastInvoice").'">'.$langs->trans('Delete').'</a>';
|
||||||
} elseif ($isErasable == -1) {
|
} elseif ($isErasable == -1) {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Delete').'</a></div>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Delete').'</a>';
|
||||||
} elseif ($isErasable <= 0) { // Any other cases
|
} elseif ($isErasable <= 0) { // Any other cases
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotErasable").'">'.$langs->trans('Delete').'</a></div>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotErasable").'">'.$langs->trans('Delete').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a></div>';
|
print '<a class="butActionDelete'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -171,7 +171,7 @@ $arrayfields = array(
|
|||||||
'f.date_lim_reglement'=>array('label'=>$langs->trans("DateDue"), 'checked'=>1),
|
'f.date_lim_reglement'=>array('label'=>$langs->trans("DateDue"), 'checked'=>1),
|
||||||
'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0),
|
'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0),
|
||||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>-1),
|
||||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||||
@ -1255,7 +1255,7 @@ if ($resql) {
|
|||||||
print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_vat']['checked'])) {
|
if (!empty($arrayfields['f.total_vat']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.total_tva', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
@ -1398,7 +1398,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Supplier ref
|
// Supplier ref
|
||||||
if (!empty($arrayfields['f.ref_supplier']['checked'])) {
|
if (!empty($arrayfields['f.ref_supplier']['checked'])) {
|
||||||
print '<td class="nowrap tdoverflowmax200">';
|
print '<td class="nowrap tdoverflowmax150" title="'.dol_escape_htmltag($obj->ref_supplier).'">';
|
||||||
print $obj->ref_supplier;
|
print $obj->ref_supplier;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -1522,7 +1522,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Payment condition
|
// Payment condition
|
||||||
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
||||||
print '<td>';
|
print '<td class="tdoverflowmax125">';
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', '', -1);
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', '', -1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -1531,7 +1531,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
// Payment mode
|
// Payment mode
|
||||||
if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
|
if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
|
||||||
print '<td>';
|
print '<td class="tdoverflowmax125">';
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1);
|
$form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
|
|||||||
1
htdocs/fourn/js/index.html
Normal file
1
htdocs/fourn/js/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -60,7 +60,11 @@
|
|||||||
-- Bolivia
|
-- Bolivia
|
||||||
-- Brazil -> for Departmements
|
-- Brazil -> for Departmements
|
||||||
-- Canada -> for Departmements
|
-- Canada -> for Departmements
|
||||||
|
-- Chile
|
||||||
-- Colombie -> for Departmements
|
-- Colombie -> for Departmements
|
||||||
|
-- France
|
||||||
|
-- Germany -> for Departmements
|
||||||
|
-- Greece
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -126,30 +130,68 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 5
|
|||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 14, 1401, '', 0, 'Canada');
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 14, 1401, '', 0, 'Canada');
|
||||||
|
|
||||||
|
|
||||||
|
-- Chile Regions (id country=67)
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6701, NULL, NULL, 'Tarapacá');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6702, NULL, NULL, 'Antofagasta');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6703, NULL, NULL, 'Atacama');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6704, NULL, NULL, 'Coquimbo');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6705, NULL, NULL, 'Valparaíso');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6706, NULL, NULL, 'General Bernardo O Higgins');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6707, NULL, NULL, 'Maule');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6708, NULL, NULL, 'Biobío');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6709, NULL, NULL, 'Raucanía');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6710, NULL, NULL, 'Los Lagos');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6711, NULL, NULL, 'Aysén General Carlos Ibáñez del Campo');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6712, NULL, NULL, 'Magallanes y Antártica Chilena');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6713, NULL, NULL, 'Metropolitana de Santiago');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6714, NULL, NULL, 'Los Ríos');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6715, NULL, NULL, 'Arica y Parinacota');
|
||||||
|
|
||||||
|
|
||||||
-- Colombie Regions (id country=70)
|
-- Colombie Regions (id country=70)
|
||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 70, 7001, '', 0, 'Colombie');
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 70, 7001, '', 0, 'Colombie');
|
||||||
|
|
||||||
|
|
||||||
-- Regions France (id country=1)
|
-- France Regions (id country=1)
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 1,'97105',3,'Guadeloupe');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 1, '97105', 3, 'Guadeloupe');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 2,'97209',3,'Martinique');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 2, '97209', 3, 'Martinique');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 3,'97302',3,'Guyane');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 3, '97302', 3, 'Guyane');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 4,'97411',3,'Réunion');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 4, '97411', 3, 'Réunion');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 6,'97601',3,'Mayotte');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 6, '97601', 3, 'Mayotte');
|
||||||
|
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 11,'75056',1,'Île-de-France');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 11, '75056', 1, 'Île-de-France');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 24,'45234',2,'Centre-Val de Loire');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 24, '45234', 2, 'Centre-Val de Loire');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 27,'21231',0,'Bourgogne-Franche-Comté');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 27, '21231', 0, 'Bourgogne-Franche-Comté');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 28,'76540',0,'Normandie');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 28, '76540', 0, 'Normandie');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 32,'59350',4,'Hauts-de-France');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 32, '59350', 4, 'Hauts-de-France');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 44,'67482',2,'Grand Est');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 44, '67482', 2, 'Grand Est');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 52,'44109',4,'Pays de la Loire');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 52, '44109', 4, 'Pays de la Loire');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 53,'35238',0,'Bretagne');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 53, '35238', 0, 'Bretagne');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 75,'33063',0,'Nouvelle-Aquitaine');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 75, '33063', 0, 'Nouvelle-Aquitaine');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 76,'31355',1,'Occitanie');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 76, '31355', 1, 'Occitanie');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 84,'69123',1,'Auvergne-Rhône-Alpes');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 84, '69123', 1, 'Auvergne-Rhône-Alpes');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 93,'13055',0,'Provence-Alpes-Côte d''Azur');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 93, '13055', 0, 'Provence-Alpes-Côte d''Azur');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 94,'2A004',0,'Corse');
|
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 94, '2A004', 0, 'Corse');
|
||||||
|
|
||||||
|
|
||||||
|
-- Germany Regions (id country=5)
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 5, 501, '', 0, 'Deutschland');
|
||||||
|
|
||||||
|
|
||||||
|
-- Greece Regions (id_country=102)
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10201, NULL, NULL, 'Αττική');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10202, NULL, NULL, 'Στερεά Ελλάδα');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10203, NULL, NULL, 'Κεντρική Μακεδονία');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10204, NULL, NULL, 'Κρήτη');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10205, NULL, NULL, 'Ανατολική Μακεδονία και Θράκη');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10206, NULL, NULL, 'Ήπειρος');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10207, NULL, NULL, 'Ιόνια νησιά');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10208, NULL, NULL, 'Βόρειο Αιγαίο');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10209, NULL, NULL, 'Πελοπόννησος');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10210, NULL, NULL, 'Νότιο Αιγαίο');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10211, NULL, NULL, 'Δυτική Ελλάδα');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10212, NULL, NULL, 'Θεσσαλία');
|
||||||
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10213, NULL, NULL, 'Δυτική Μακεδονία');
|
||||||
|
|
||||||
|
|
||||||
-- Regions Italy (id country=3)
|
-- Regions Italy (id country=3)
|
||||||
@ -174,6 +216,7 @@ insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 31
|
|||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 319, NULL, 1, 'Valle d Aosta');
|
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 319, NULL, 1, 'Valle d Aosta');
|
||||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 320, NULL, 1, 'Veneto');
|
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 320, NULL, 1, 'Veneto');
|
||||||
|
|
||||||
|
|
||||||
-- Regions Spain (id country=4)
|
-- Regions Spain (id country=4)
|
||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 401, '', 0, 'Andalucia', 1);
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 401, '', 0, 'Andalucia', 1);
|
||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 402, '', 0, 'Aragón', 1);
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 402, '', 0, 'Aragón', 1);
|
||||||
@ -196,23 +239,6 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
|
|||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 419, '', 0, 'Pais Vasco', 1);
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 419, '', 0, 'Pais Vasco', 1);
|
||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 420, '', 0, 'Otros', 1);
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 420, '', 0, 'Otros', 1);
|
||||||
|
|
||||||
-- Regions Germany (id country=5)
|
|
||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 5, 501, '', 0, 'Deutschland', 1);
|
|
||||||
|
|
||||||
-- Regions Greece (id_country=102)
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10201, 102, NULL, NULL, 'Αττική', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10202, 102, NULL, NULL, 'Στερεά Ελλάδα', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10203, 102, NULL, NULL, 'Κεντρική Μακεδονία', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10204, 102, NULL, NULL, 'Κρήτη', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10205, 102, NULL, NULL, 'Ανατολική Μακεδονία και Θράκη', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10206, 102, NULL, NULL, 'Ήπειρος', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10207, 102, NULL, NULL, 'Ιόνια νησιά', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10208, 102, NULL, NULL, 'Βόρειο Αιγαίο', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10209, 102, NULL, NULL, 'Πελοπόννησος', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10210, 102, NULL, NULL, 'Νότιο Αιγαίο', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10211, 102, NULL, NULL, 'Δυτική Ελλάδα', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10212, 102, NULL, NULL, 'Θεσσαλία', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10213, 102, NULL, NULL, 'Δυτική Μακεδονία', 1);
|
|
||||||
|
|
||||||
-- Regions Switzerland (id country=6)
|
-- Regions Switzerland (id country=6)
|
||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 6, 601, '', 1, 'Cantons', 1);
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 6, 601, '', 1, 'Cantons', 1);
|
||||||
@ -257,23 +283,6 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
|
|||||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 17, 1701, '', 0,'Provincies van Nederland ', 1);
|
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 17, 1701, '', 0,'Provincies van Nederland ', 1);
|
||||||
|
|
||||||
|
|
||||||
-- Regions Chile (id country=67)
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6701, 67, NULL, NULL, 'Tarapacá', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6702, 67, NULL, NULL, 'Antofagasta', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6703, 67, NULL, NULL, 'Atacama', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6704, 67, NULL, NULL, 'Coquimbo', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6705, 67, NULL, NULL, 'Valparaíso', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6706, 67, NULL, NULL, 'General Bernardo O Higgins', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6707, 67, NULL, NULL, 'Maule', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6708, 67, NULL, NULL, 'Biobío', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6709, 67, NULL, NULL, 'Raucanía', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6710, 67, NULL, NULL, 'Los Lagos', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6711, 67, NULL, NULL, 'Aysén General Carlos Ibáñez del Campo', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6712, 67, NULL, NULL, 'Magallanes y Antártica Chilena', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6713, 67, NULL, NULL, 'Metropolitana de Santiago', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6714, 67, NULL, NULL, 'Los Ríos', 1);
|
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6715, 67, NULL, NULL, 'Arica y Parinacota', 1);
|
|
||||||
|
|
||||||
-- Regions San Salvador (id country=86)
|
-- Regions San Salvador (id country=86)
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8601, 86, NULL, NULL, 'Central', 1);
|
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8601, 86, NULL, NULL, 'Central', 1);
|
||||||
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8602, 86, NULL, NULL, 'Oriental', 1);
|
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8602, 86, NULL, NULL, 'Oriental', 1);
|
||||||
|
|||||||
@ -45,9 +45,14 @@
|
|||||||
-- Belgium
|
-- Belgium
|
||||||
-- Brazil
|
-- Brazil
|
||||||
-- Canada
|
-- Canada
|
||||||
|
-- Chile
|
||||||
-- Colombia
|
-- Colombia
|
||||||
-- France
|
-- France
|
||||||
-- Germany
|
-- Germany
|
||||||
|
-- Honduras
|
||||||
|
-- (Italy)
|
||||||
|
-- Luxembourg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- TEMPLATE -------------------------------------------------------------------------------------------------------------
|
-- TEMPLATE -------------------------------------------------------------------------------------------------------------
|
||||||
@ -203,17 +208,17 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
|
|||||||
|
|
||||||
|
|
||||||
-- Belgium Provinces (id country=2)
|
-- Belgium Provinces (id country=2)
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201,'01','',1,'ANVERS','Anvers');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '01','',1,'ANVERS','Anvers');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (203,'02','',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (203, '02','',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202,'03','',2,'BRABANT-WALLON','Brabant-Wallon');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '03','',2,'BRABANT-WALLON','Brabant-Wallon');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201,'04','',1,'BRABANT-FLAMAND','Brabant-Flamand');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '04','',1,'BRABANT-FLAMAND','Brabant-Flamand');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201,'05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201,'06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202,'07','',2,'HAINAUT','Hainaut');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '07','',2,'HAINAUT','Hainaut');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201,'08','',2,'LIEGE','Liège');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '08','',2,'LIEGE','Liège');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202,'09','',1,'LIMBOURG','Limbourg');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '09','',1,'LIMBOURG','Limbourg');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202,'10','',2,'LUXEMBOURG','Luxembourg');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '10','',2,'LUXEMBOURG','Luxembourg');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201,'11','',2,'NAMUR','Namur');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '11','',2,'NAMUR','Namur');
|
||||||
|
|
||||||
|
|
||||||
-- Brazil Provinces (id country=56)
|
-- Brazil Provinces (id country=56)
|
||||||
@ -247,16 +252,73 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
|
|||||||
|
|
||||||
|
|
||||||
-- Canada Provinces & Territories (id country=14)
|
-- Canada Provinces & Territories (id country=14)
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'ON','',1,'','Ontario');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'ON','',1,'','Ontario');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'QC','',1,'','Quebec');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'QC','',1,'','Quebec');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'NS','',1,'','Nova Scotia');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'NS','',1,'','Nova Scotia');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'NB','',1,'','New Brunswick');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'NB','',1,'','New Brunswick');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'MB','',1,'','Manitoba');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'MB','',1,'','Manitoba');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'BC','',1,'','British Columbia');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'BC','',1,'','British Columbia');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'PE','',1,'','Prince Edward Island');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'PE','',1,'','Prince Edward Island');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'SK','',1,'','Saskatchewan');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'SK','',1,'','Saskatchewan');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'AB','',1,'','Alberta');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'AB','',1,'','Alberta');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'NL','',1,'','Newfoundland and Labrador');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'NL','',1,'','Newfoundland and Labrador');
|
||||||
|
|
||||||
|
|
||||||
|
-- Chile Provinces (id country=67)
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6701, '011', '', 0, '011', 'Iquique');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6701, '014', '', 0, '014', 'Tamarugal');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6702, '021', '', 0, '021', 'Antofagasa');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6702, '022', '', 0, '022', 'El Loa');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6702, '023', '', 0, '023', 'Tocopilla');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6703, '031', '', 0, '031', 'Copiapó');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6703, '032', '', 0, '032', 'Chañaral');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6703, '033', '', 0, '033', 'Huasco');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6704, '041', '', 0, '041', 'Elqui');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6704, '042', '', 0, '042', 'Choapa');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6704, '043', '', 0, '043', 'Limarí');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '051', '', 0, '051', 'Valparaíso');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '052', '', 0, '052', 'Isla de Pascua');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '053', '', 0, '053', 'Los Andes');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '054', '', 0, '054', 'Petorca');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '055', '', 0, '055', 'Quillota');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '056', '', 0, '056', 'San Antonio');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '057', '', 0, '057', 'San Felipe de Aconcagua');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '058', '', 0, '058', 'Marga Marga');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6706, '061', '', 0, '061', 'Cachapoal');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6706, '062', '', 0, '062', 'Cardenal Caro');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6706, '063', '', 0, '063', 'Colchagua');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '071', '', 0, '071', 'Talca');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '072', '', 0, '072', 'Cauquenes');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '073', '', 0, '073', 'Curicó');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '074', '', 0, '074', 'Linares');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '081', '', 0, '081', 'Concepción');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '082', '', 0, '082', 'Arauco');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '083', '', 0, '083', 'Biobío');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '084', '', 0, '084', 'Ñuble');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6709, '091', '', 0, '091', 'Cautín');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6709, '092', '', 0, '092', 'Malleco');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '101', '', 0, '101', 'Llanquihue');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '102', '', 0, '102', 'Chiloé');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '103', '', 0, '103', 'Osorno');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '104', '', 0, '104', 'Palena');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '111', '', 0, '111', 'Coihaique');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '112', '', 0, '112', 'Aisén');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '113', '', 0, '113', 'Capitán Prat');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '114', '', 0, '114', 'General Carrera');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '121', '', 0, '121', 'Magallanes');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '122', '', 0, '122', 'Antártica Chilena');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '123', '', 0, '123', 'Tierra del Fuego');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '124', '', 0, '124', 'Última Esperanza');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '131', '', 0, '131', 'Santiago');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '132', '', 0, '132', 'Cordillera');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '133', '', 0, '133', 'Chacabuco');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '134', '', 0, '134', 'Maipo');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '135', '', 0, '135', 'Melipilla');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '136', '', 0, '136', 'Talagante');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6714, '141', '', 0, '141', 'Valdivia');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6714, '142', '', 0, '142', 'Ranco');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6715, '151', '', 0, '151', 'Arica');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6715, '152', '', 0, '152', 'Parinacota');
|
||||||
|
|
||||||
|
|
||||||
-- Colombia Departamentos (id country=70)
|
-- Colombia Departamentos (id country=70)
|
||||||
@ -296,11 +358,11 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
|
|||||||
|
|
||||||
|
|
||||||
-- France Departements (id country=1)
|
-- France Departements (id country=1)
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 1,'971','97105',3,'GUADELOUPE','Guadeloupe');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 1, '971','97105',3,'GUADELOUPE','Guadeloupe');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 2, '972','97209',3,'MARTINIQUE','Martinique');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 3, '973','97302',3,'GUYANE','Guyane');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 4,'974','97411',3,'REUNION','Réunion');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 4, '974','97411',3,'REUNION','Réunion');
|
||||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte');
|
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 6, '976','97601',3,'MAYOTTE','Mayotte');
|
||||||
|
|
||||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (84,'01','01053',5,'AIN','Ain');
|
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (84,'01','01053',5,'AIN','Ain');
|
||||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (32,'02','02408',5,'AISNE','Aisne');
|
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (32,'02','02408',5,'AISNE','Aisne');
|
||||||
@ -419,6 +481,28 @@ INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (5
|
|||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'TH', 'THÜRINGEN', 'Thüringen');
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'TH', 'THÜRINGEN', 'Thüringen');
|
||||||
|
|
||||||
|
|
||||||
|
-- Honduras Departamentos (id country=114)
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'AT', '', 0, 'AT', 'Atlántida');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CH', '', 0, 'CH', 'Choluteca');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CL', '', 0, 'CL', 'Colón');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CM', '', 0, 'CM', 'Comayagua');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CO', '', 0, 'CO', 'Copán');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CR', '', 0, 'CR', 'Cortés');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'EP', '', 0, 'EP', 'El Paraíso');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'FM', '', 0, 'FM', 'Francisco Morazán');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'GD', '', 0, 'GD', 'Gracias a Dios');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'IN', '', 0, 'IN', 'Intibucá');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'IB', '', 0, 'IB', 'Islas de la Bahía');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'LP', '', 0, 'LP', 'La Paz');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'LM', '', 0, 'LM', 'Lempira');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'OC', '', 0, 'OC', 'Ocotepeque');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'OL', '', 0, 'OL', 'Olancho');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'SB', '', 0, 'SB', 'Santa Bárbara');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'VL', '', 0, 'VL', 'Valle');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'YO', '', 0, 'YO', 'Yoro');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'DC', '', 0, 'DC', 'Distrito Central');
|
||||||
|
|
||||||
|
|
||||||
-- Provinces Italy (id=3)
|
-- Provinces Italy (id=3)
|
||||||
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AG',315,NULL,NULL,NULL,'AGRIGENTO');
|
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AG',315,NULL,NULL,NULL,'AGRIGENTO');
|
||||||
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AL',312,NULL,NULL,NULL,'ALESSANDRIA');
|
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AL',312,NULL,NULL,NULL,'ALESSANDRIA');
|
||||||
@ -532,6 +616,21 @@ insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom
|
|||||||
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VT',307,NULL,NULL,NULL,'VITERBO');
|
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VT',307,NULL,NULL,NULL,'VITERBO');
|
||||||
|
|
||||||
|
|
||||||
|
-- Luxembourg Cantons (id country=140)
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0001', '', 0, '', 'Clervaux');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0002', '', 0, '', 'Diekirch');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0003', '', 0, '', 'Redange');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0004', '', 0, '', 'Vianden');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0005', '', 0, '', 'Wiltz');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14002, 'LU0006', '', 0, '', 'Echternach');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14002, 'LU0007', '', 0, '', 'Grevenmacher');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14002, 'LU0008', '', 0, '', 'Remich');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0009', '', 0, '', 'Capellen');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0010', '', 0, '', 'Esch-sur-Alzette');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0011', '', 0, '', 'Luxembourg');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0012', '', 0, '', 'Mersch');
|
||||||
|
|
||||||
|
|
||||||
-- Provinces Maroc - Moroco (id country=12)
|
-- Provinces Maroc - Moroco (id country=12)
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA', 1209, '', 0, '', 'Province de Benslimane', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA', 1209, '', 0, '', 'Province de Benslimane', 1);
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA1', 1209, '', 0, '', 'Province de Berrechid', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA1', 1209, '', 0, '', 'Province de Berrechid', 1);
|
||||||
@ -642,6 +741,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
|||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1);
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1);
|
||||||
|
|
||||||
|
|
||||||
-- Provinces Bolivia (id country=52)
|
-- Provinces Bolivia (id country=52)
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1);
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1);
|
||||||
@ -881,33 +981,35 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc
|
|||||||
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('64', 10204, '', 0, '', 'Ρέθυμνο', 1);
|
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('64', 10204, '', 0, '', 'Ρέθυμνο', 1);
|
||||||
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('65', 10204, '', 0, '', 'Χανιά', 1);
|
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('65', 10204, '', 0, '', 'Χανιά', 1);
|
||||||
|
|
||||||
-- Cantons Switzerland (id country=6)
|
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AG','ARGOVIE','Argovie',1);
|
-- Switzerland Cantons (id country=6)
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AI','APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'AG','ARGOVIE','Argovie');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AR','APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'AI','APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'BE','BERNE','Berne',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'AR','APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'BL','BALE CAMPAGNE','Bâle Campagne',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'BE','BERNE','Berne');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'BS','BALE VILLE','Bâle Ville',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'BL','BALE CAMPAGNE','Bâle Campagne');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'FR','FRIBOURG','Fribourg',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'BS','BALE VILLE','Bâle Ville');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'GE','GENEVE','Genève',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'FR','FRIBOURG','Fribourg');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'GL','GLARIS','Glaris',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'GE','GENEVE','Genève');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'GR','GRISONS','Grisons',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'GL','GLARIS','Glaris');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'JU','JURA','Jura',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'GR','GRISONS','Grisons');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'LU','LUCERNE','Lucerne',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'JU','JURA','Jura');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'NE','NEUCHATEL','Neuchâtel',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'LU','LUCERNE','Lucerne');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'NW','NIDWALD','Nidwald',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'NE','NEUCHATEL','Neuchâtel');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'OW','OBWALD','Obwald',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'NW','NIDWALD','Nidwald');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SG','SAINT-GALL','Saint-Gall',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'OW','OBWALD','Obwald');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SH','SCHAFFHOUSE','Schaffhouse',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SG','SAINT-GALL','Saint-Gall');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SO','SOLEURE','Soleure',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SH','SCHAFFHOUSE','Schaffhouse');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SZ','SCHWYZ','Schwyz',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SO','SOLEURE','Soleure');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'TG','THURGOVIE','Thurgovie',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SZ','SCHWYZ','Schwyz');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'TI','TESSIN','Tessin',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'TG','THURGOVIE','Thurgovie');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'UR','URI','Uri',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'TI','TESSIN','Tessin');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'VD','VAUD','Vaud',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'UR','URI','Uri');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'VS','VALAIS','Valais',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'VD','VAUD','Vaud');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'ZG','ZUG','Zug',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'VS','VALAIS','Valais');
|
||||||
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'ZH','ZURICH','Zürich',1);
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'ZG','ZUG','Zug');
|
||||||
|
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'ZH','ZURICH','Zürich');
|
||||||
|
|
||||||
|
|
||||||
-- Provinces GB (id country=7)
|
-- Provinces GB (id country=7)
|
||||||
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('701', 701, NULL, 0,NULL, 'Bedfordshire', 1);
|
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('701', 701, NULL, 0,NULL, 'Bedfordshire', 1);
|
||||||
@ -1083,19 +1185,21 @@ insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
|||||||
insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) values ('WI', 1101, '', 0, 'WISCONSIN', 'Wisconsin', 1);
|
insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) values ('WI', 1101, '', 0, 'WISCONSIN', 'Wisconsin', 1);
|
||||||
insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) values ('WY', 1101, '', 0, 'WYOMING', 'Wyoming', 1);
|
insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) values ('WY', 1101, '', 0, 'WYOMING', 'Wyoming', 1);
|
||||||
|
|
||||||
|
|
||||||
-- Provincies van het Koninkrijk der Nederlanden (id country=17)
|
-- Provincies van het Koninkrijk der Nederlanden (id country=17)
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('GR',1701,NULL,NULL,NULL,'Groningen',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('GR',1701,NULL,NULL,NULL,'Groningen');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('FR',1701,NULL,NULL,NULL,'Friesland',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('FR',1701,NULL,NULL,NULL,'Friesland');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('DR',1701,NULL,NULL,NULL,'Drenthe',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('DR',1701,NULL,NULL,NULL,'Drenthe');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('OV',1701,NULL,NULL,NULL,'Overijssel',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('OV',1701,NULL,NULL,NULL,'Overijssel');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('GD',1701,NULL,NULL,NULL,'Gelderland',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('GD',1701,NULL,NULL,NULL,'Gelderland');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('FL',1701,NULL,NULL,NULL,'Flevoland',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('FL',1701,NULL,NULL,NULL,'Flevoland');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('UT',1701,NULL,NULL,NULL,'Utrecht',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('UT',1701,NULL,NULL,NULL,'Utrecht');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('NH',1701,NULL,NULL,NULL,'Noord-Holland',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('NH',1701,NULL,NULL,NULL,'Noord-Holland');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('ZH',1701,NULL,NULL,NULL,'Zuid-Holland',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('ZH',1701,NULL,NULL,NULL,'Zuid-Holland');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('ZL',1701,NULL,NULL,NULL,'Zeeland',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('ZL',1701,NULL,NULL,NULL,'Zeeland');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('NB',1701,NULL,NULL,NULL,'Noord-Brabant',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('NB',1701,NULL,NULL,NULL,'Noord-Brabant');
|
||||||
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('LB',1701,NULL,NULL,NULL,'Limburg',1);
|
INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom) VALUES ('LB',1701,NULL,NULL,NULL,'Limburg');
|
||||||
|
|
||||||
|
|
||||||
-- San Salvador (id country=86)
|
-- San Salvador (id country=86)
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SS', 8601, '', 0, '', 'San Salvador', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SS', 8601, '', 0, '', 'San Salvador', 1);
|
||||||
@ -1114,62 +1218,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
|||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CU', 8601, '', 0, '', 'Cuscatlan', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CU', 8601, '', 0, '', 'Cuscatlan', 1);
|
||||||
|
|
||||||
|
|
||||||
-- Provinces Chile (id country=67)
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('151', 6715, '', 0, '151', 'Arica', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('152', 6715, '', 0, '152', 'Parinacota', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('011', 6701, '', 0, '011', 'Iquique', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('014', 6701, '', 0, '014', 'Tamarugal', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('021', 6702, '', 0, '021', 'Antofagasa', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('022', 6702, '', 0, '022', 'El Loa', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('023', 6702, '', 0, '023', 'Tocopilla', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('031', 6703, '', 0, '031', 'Copiapó', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('032', 6703, '', 0, '032', 'Chañaral', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('033', 6703, '', 0, '033', 'Huasco', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('041', 6704, '', 0, '041', 'Elqui', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('042', 6704, '', 0, '042', 'Choapa', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('043', 6704, '', 0, '043', 'Limarí', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('051', 6705, '', 0, '051', 'Valparaíso', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('052', 6705, '', 0, '052', 'Isla de Pascua', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('053', 6705, '', 0, '053', 'Los Andes', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('054', 6705, '', 0, '054', 'Petorca', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('055', 6705, '', 0, '055', 'Quillota', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('056', 6705, '', 0, '056', 'San Antonio', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('057', 6705, '', 0, '057', 'San Felipe de Aconcagua', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('058', 6705, '', 0, '058', 'Marga Marga', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('061', 6706, '', 0, '061', 'Cachapoal', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('062', 6706, '', 0, '062', 'Cardenal Caro', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('063', 6706, '', 0, '063', 'Colchagua', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('071', 6707, '', 0, '071', 'Talca', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('072', 6707, '', 0, '072', 'Cauquenes', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('073', 6707, '', 0, '073', 'Curicó', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('074', 6707, '', 0, '074', 'Linares', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('081', 6708, '', 0, '081', 'Concepción', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('082', 6708, '', 0, '082', 'Arauco', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('083', 6708, '', 0, '083', 'Biobío', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('084', 6708, '', 0, '084', 'Ñuble', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('091', 6709, '', 0, '091', 'Cautín', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('092', 6709, '', 0, '092', 'Malleco', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('141', 6714, '', 0, '141', 'Valdivia', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('142', 6714, '', 0, '142', 'Ranco', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('101', 6710, '', 0, '101', 'Llanquihue', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('102', 6710, '', 0, '102', 'Chiloé', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('103', 6710, '', 0, '103', 'Osorno', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('104', 6710, '', 0, '104', 'Palena', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 6711, '', 0, '111', 'Coihaique', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 6711, '', 0, '112', 'Aisén', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('113', 6711, '', 0, '113', 'Capitán Prat', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('114', 6711, '', 0, '114', 'General Carrera', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('121', 6712, '', 0, '121', 'Magallanes', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('122', 6712, '', 0, '122', 'Antártica Chilena', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('123', 6712, '', 0, '123', 'Tierra del Fuego', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('124', 6712, '', 0, '124', 'Última Esperanza', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('131', 6713, '', 0, '131', 'Santiago', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('132', 6713, '', 0, '132', 'Cordillera', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('133', 6713, '', 0, '133', 'Chacabuco', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('134', 6713, '', 0, '134', 'Maipo', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('135', 6713, '', 0, '135', 'Melipilla', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('136', 6713, '', 0, '136', 'Talagante', 1);
|
|
||||||
|
|
||||||
-- Provinces India (id country=117)
|
-- Provinces India (id country=117)
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AN', 11701, NULL, 0, 'AN', 'Andaman & Nicobar', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AN', 11701, NULL, 0, 'AN', 'Andaman & Nicobar', 1);
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AP', 11701, NULL, 0, 'AP', 'Andhra Pradesh', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AP', 11701, NULL, 0, 'AP', 'Andhra Pradesh', 1);
|
||||||
@ -1279,27 +1327,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
|||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ZAC', 15401, '', 0, 'ZAC', 'Zacatecas', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ZAC', 15401, '', 0, 'ZAC', 'Zacatecas', 1);
|
||||||
|
|
||||||
|
|
||||||
-- Provinces Honduras (id country=114)
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AT', 11401, '', 0, 'AT', 'Atlántida', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CH', 11401, '', 0, 'CH', 'Choluteca', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CL', 11401, '', 0, 'CL', 'Colón', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CM', 11401, '', 0, 'CM', 'Comayagua', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CO', 11401, '', 0, 'CO', 'Copán', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CR', 11401, '', 0, 'CR', 'Cortés', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('EP', 11401, '', 0, 'EP', 'El Paraíso', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('FM', 11401, '', 0, 'FM', 'Francisco Morazán', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GD', 11401, '', 0, 'GD', 'Gracias a Dios', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IN', 11401, '', 0, 'IN', 'Intibucá', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IB', 11401, '', 0, 'IB', 'Islas de la Bahía', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LP', 11401, '', 0, 'LP', 'La Paz', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LM', 11401, '', 0, 'LM', 'Lempira', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('OC', 11401, '', 0, 'OC', 'Ocotepeque', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('OL', 11401, '', 0, 'OL', 'Olancho', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SB', 11401, '', 0, 'SB', 'Santa Bárbara', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VL', 11401, '', 0, 'VL', 'Valle', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('YO', 11401, '', 0, 'YO', 'Yoro', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DC', 11401, '', 0, 'DC', 'Distrito Central', 1);
|
|
||||||
|
|
||||||
-- Provinces Romania (id country=188)
|
-- Provinces Romania (id country=188)
|
||||||
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AB', 18801, '', 0, '', 'Alba', 1);
|
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AB', 18801, '', 0, '', 'Alba', 1);
|
||||||
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AR', 18801, '', 0, '', 'Arad', 1);
|
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AR', 18801, '', 0, '', 'Arad', 1);
|
||||||
@ -1371,19 +1398,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
|
|||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1);
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1);
|
||||||
|
|
||||||
-- Cantons Luxembourg (id country=140)
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0001', 14001, '', 0, '', 'Clervaux', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0002', 14001, '', 0, '', 'Diekirch', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0003', 14001, '', 0, '', 'Redange', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0004', 14001, '', 0, '', 'Vianden', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0005', 14001, '', 0, '', 'Wiltz', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0006', 14002, '', 0, '', 'Echternach', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0007', 14002, '', 0, '', 'Grevenmacher', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0008', 14002, '', 0, '', 'Remich', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0009', 14003, '', 0, '', 'Capellen', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0010', 14003, '', 0, '', 'Esch-sur-Alzette', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0011', 14003, '', 0, '', 'Luxembourg', 1);
|
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0012', 14003, '', 0, '', 'Mersch', 1);
|
|
||||||
|
|
||||||
-- Provinces Peru (id country=181)
|
-- Provinces Peru (id country=181)
|
||||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('0101', 18101, '', 0, '', 'Chachapoyas', 1);
|
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('0101', 18101, '', 0, '', 'Chachapoyas', 1);
|
||||||
|
|||||||
@ -226,6 +226,10 @@ ALTER TABLE llx_supplier_proposal CHANGE COLUMN tva total_tva double(24,8) defau
|
|||||||
ALTER TABLE llx_supplier_proposal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
ALTER TABLE llx_supplier_proposal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
||||||
ALTER TABLE llx_propal CHANGE COLUMN tva total_tva double(24,8) default 0;
|
ALTER TABLE llx_propal CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||||
ALTER TABLE llx_propal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
ALTER TABLE llx_propal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
||||||
|
ALTER TABLE llx_facture CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||||
|
ALTER TABLE llx_facture CHANGE COLUMN total total_ht double(24,8) default 0;
|
||||||
|
ALTER TABLE llx_facture_rec CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||||
|
ALTER TABLE llx_facture_rec CHANGE COLUMN total total_ht double(24,8) default 0;
|
||||||
ALTER TABLE llx_commande_fournisseur CHANGE COLUMN tva total_tva double(24,8) default 0;
|
ALTER TABLE llx_commande_fournisseur CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||||
|
|
||||||
|
|
||||||
@ -365,3 +369,6 @@ ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) NULL;
|
|||||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
|
||||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
|
||||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_fourn ADD COLUMN date_closing datetime DEFAULT NULL after date_valid;
|
||||||
|
ALTER TABLE llx_facture_fourn ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid;
|
||||||
|
|||||||
@ -50,11 +50,11 @@ create table llx_facture
|
|||||||
close_code varchar(16), -- Code motif cloture sans paiement complet
|
close_code varchar(16), -- Code motif cloture sans paiement complet
|
||||||
close_note varchar(128), -- Commentaire cloture sans paiement complet
|
close_note varchar(128), -- Commentaire cloture sans paiement complet
|
||||||
|
|
||||||
tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale
|
total_tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale
|
||||||
localtax1 double(24,8) DEFAULT 0, -- amount total localtax1
|
localtax1 double(24,8) DEFAULT 0, -- amount total localtax1
|
||||||
localtax2 double(24,8) DEFAULT 0, -- amount total localtax2
|
localtax2 double(24,8) DEFAULT 0, -- amount total localtax2
|
||||||
revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp
|
revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp
|
||||||
total double(24,8) DEFAULT 0, -- amount total ht apres remise totale
|
total_ht double(24,8) DEFAULT 0, -- amount total ht apres remise totale
|
||||||
total_ttc double(24,8) DEFAULT 0, -- amount total ttc apres remise totale
|
total_ttc double(24,8) DEFAULT 0, -- amount total ttc apres remise totale
|
||||||
|
|
||||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
fk_statut smallint DEFAULT 0 NOT NULL,
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
-- Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
-- Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -32,10 +33,11 @@ create table llx_facture_fourn
|
|||||||
fk_soc integer NOT NULL,
|
fk_soc integer NOT NULL,
|
||||||
|
|
||||||
datec datetime, -- date de creation de la facture
|
datec datetime, -- date de creation de la facture
|
||||||
datef date, -- date de la facture
|
datef date, -- date invoice
|
||||||
date_pointoftax date DEFAULT NULL, -- date point of tax (for GB)
|
date_pointoftax date DEFAULT NULL, -- date point of tax (for GB)
|
||||||
date_valid date, -- date validation
|
date_valid date, -- date validation
|
||||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
|
||||||
|
date_closing datetime, -- date closing
|
||||||
libelle varchar(255),
|
libelle varchar(255),
|
||||||
paye smallint DEFAULT 0 NOT NULL,
|
paye smallint DEFAULT 0 NOT NULL,
|
||||||
amount double(24,8) DEFAULT 0 NOT NULL,
|
amount double(24,8) DEFAULT 0 NOT NULL,
|
||||||
@ -57,14 +59,15 @@ create table llx_facture_fourn
|
|||||||
fk_user_author integer, -- user making creation
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_modif integer, -- user making last change
|
fk_user_modif integer, -- user making last change
|
||||||
fk_user_valid integer, -- user validating
|
fk_user_valid integer, -- user validating
|
||||||
|
fk_user_closing integer, -- user closing
|
||||||
|
|
||||||
fk_facture_source integer, -- facture origine si facture avoir
|
fk_facture_source integer, -- facture origine si facture avoir
|
||||||
fk_projet integer, -- projet auquel est associee la facture
|
fk_projet integer, -- projet auquel est associee la facture
|
||||||
|
|
||||||
fk_account integer, -- bank account
|
fk_account integer, -- bank account
|
||||||
fk_cond_reglement integer, -- condition de reglement (30 jours, fin de mois ...)
|
fk_cond_reglement integer, -- condition de reglement (30 jours, fin de mois ...)
|
||||||
fk_mode_reglement integer, -- mode de reglement (CHQ, VIR, ...)
|
fk_mode_reglement integer, -- mode de reglement (CHQ, VIR, ...)
|
||||||
date_lim_reglement date, -- date limite de reglement
|
date_lim_reglement date, -- date limite de reglement
|
||||||
|
|
||||||
note_private text,
|
note_private text,
|
||||||
note_public text,
|
note_public text,
|
||||||
|
|||||||
@ -36,11 +36,11 @@ create table llx_facture_rec
|
|||||||
remise_absolue real DEFAULT 0,
|
remise_absolue real DEFAULT 0,
|
||||||
|
|
||||||
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here.
|
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here.
|
||||||
tva double(24,8) DEFAULT 0,
|
total_tva double(24,8) DEFAULT 0,
|
||||||
localtax1 double(24,8) DEFAULT 0, -- amount localtax1
|
localtax1 double(24,8) DEFAULT 0, -- amount localtax1
|
||||||
localtax2 double(24,8) DEFAULT 0, -- amount localtax2
|
localtax2 double(24,8) DEFAULT 0, -- amount localtax2
|
||||||
revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp
|
revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp
|
||||||
total double(24,8) DEFAULT 0,
|
total_ht double(24,8) DEFAULT 0,
|
||||||
total_ttc double(24,8) DEFAULT 0,
|
total_ttc double(24,8) DEFAULT 0,
|
||||||
|
|
||||||
fk_user_author integer, -- user creating
|
fk_user_author integer, -- user creating
|
||||||
|
|||||||
@ -286,7 +286,7 @@ class IntracommReport extends CommonObject
|
|||||||
global $mysoc, $conf;
|
global $mysoc, $conf;
|
||||||
|
|
||||||
if ($type == 'expedition' || $exporttype == 'des') {
|
if ($type == 'expedition' || $exporttype == 'des') {
|
||||||
$sql = 'SELECT f.ref as refinvoice, f.total as total_ht';
|
$sql = 'SELECT f.ref as refinvoice, f.total_ht';
|
||||||
$table = 'facture';
|
$table = 'facture';
|
||||||
$table_extraf = 'facture_extrafields';
|
$table_extraf = 'facture_extrafields';
|
||||||
$tabledet = 'facturedet';
|
$tabledet = 'facturedet';
|
||||||
|
|||||||
@ -1184,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie
|
|||||||
SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features).
|
SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features).
|
||||||
SetupDescription4=<a href="%s">%s -> %s</a><br><br>This software is a suite of many modules/applications. The modules related to your needs must be enabled and configured. Menu entries will appears with the activation of these modules.
|
SetupDescription4=<a href="%s">%s -> %s</a><br><br>This software is a suite of many modules/applications. The modules related to your needs must be enabled and configured. Menu entries will appears with the activation of these modules.
|
||||||
SetupDescription5=Other Setup menu entries manage optional parameters.
|
SetupDescription5=Other Setup menu entries manage optional parameters.
|
||||||
LogEvents=Security audit events
|
AuditedSecurityEvents=Security events that are audited
|
||||||
|
NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s
|
||||||
Audit=Audit
|
Audit=Audit
|
||||||
InfoDolibarr=About Dolibarr
|
InfoDolibarr=About Dolibarr
|
||||||
InfoBrowser=About Browser
|
InfoBrowser=About Browser
|
||||||
@ -2061,6 +2062,7 @@ UseDebugBar=Use the debug bar
|
|||||||
DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console
|
DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console
|
||||||
WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output
|
WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output
|
||||||
ModuleActivated=Module %s is activated and slows the interface
|
ModuleActivated=Module %s is activated and slows the interface
|
||||||
|
ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose)
|
||||||
IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s.
|
IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s.
|
||||||
AntivirusEnabledOnUpload=Antivirus enabled on uploaded files
|
AntivirusEnabledOnUpload=Antivirus enabled on uploaded files
|
||||||
EXPORTS_SHARE_MODELS=Export models are share with everybody
|
EXPORTS_SHARE_MODELS=Export models are share with everybody
|
||||||
@ -2114,4 +2116,4 @@ ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by
|
|||||||
MailToSendEventOrganization=Event Organization
|
MailToSendEventOrganization=Event Organization
|
||||||
AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form
|
AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form
|
||||||
YouShouldDisablePHPFunctions=You should disable PHP functions
|
YouShouldDisablePHPFunctions=You should disable PHP functions
|
||||||
IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job for example), you shoud disable PHP functions
|
IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions
|
||||||
|
|||||||
@ -133,7 +133,9 @@ IncludeDocGeneration=I want to generate some documents from the object
|
|||||||
IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record.
|
IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record.
|
||||||
ShowOnCombobox=Show value into combobox
|
ShowOnCombobox=Show value into combobox
|
||||||
KeyForTooltip=Key for tooltip
|
KeyForTooltip=Key for tooltip
|
||||||
CSSClass=CSS Class
|
CSSClass=CSS for edit/create form
|
||||||
|
CSSViewClass=CSS for read form
|
||||||
|
CSSListClass=CSS for list
|
||||||
NotEditable=Not editable
|
NotEditable=Not editable
|
||||||
ForeignKey=Foreign key
|
ForeignKey=Foreign key
|
||||||
TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example)
|
TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example)
|
||||||
|
|||||||
@ -25,6 +25,6 @@ ShowCurrentStockOfLot=Show current stock for couple product/lot
|
|||||||
ShowLogOfMovementIfLot=Show log of movements for couple product/lot
|
ShowLogOfMovementIfLot=Show log of movements for couple product/lot
|
||||||
StockDetailPerBatch=Stock detail per lot
|
StockDetailPerBatch=Stock detail per lot
|
||||||
SerialNumberAlreadyInUse=Serial number %s is already used for product %s
|
SerialNumberAlreadyInUse=Serial number %s is already used for product %s
|
||||||
TooManyQtyForSerialNumber=You can only have one product %s for serial number %S
|
TooManyQtyForSerialNumber=You can only have one product %s for serial number %s
|
||||||
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
||||||
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
||||||
@ -241,7 +241,7 @@ StockAtDatePastDesc=You can view here the stock (real stock) at a given date in
|
|||||||
StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future
|
StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future
|
||||||
CurrentStock=Current stock
|
CurrentStock=Current stock
|
||||||
InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged
|
InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged
|
||||||
UpdateByScaning=Update by scaning
|
UpdateByScaning=Fill real qty by scaning
|
||||||
UpdateByScaningProductBarcode=Update by scan (product barcode)
|
UpdateByScaningProductBarcode=Update by scan (product barcode)
|
||||||
UpdateByScaningLot=Update by scan (lot|serial barcode)
|
UpdateByScaningLot=Update by scan (lot|serial barcode)
|
||||||
DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement.
|
DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement.
|
||||||
@ -251,5 +251,6 @@ SelectAStockMovementFileToImport=select a stock movement file to import
|
|||||||
InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>"
|
InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>"
|
||||||
LabelOfInventoryMovemement=Inventory %s
|
LabelOfInventoryMovemement=Inventory %s
|
||||||
ReOpen=Reopen
|
ReOpen=Reopen
|
||||||
ConfirmFinish=Confirm closing
|
ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock.
|
||||||
ObjectNotFound=%s not found
|
ObjectNotFound=%s not found
|
||||||
|
MakeMovementsAndClose=Generate movements and close
|
||||||
@ -141,3 +141,11 @@ GenerateSitemaps=Generate website sitemap file
|
|||||||
ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file...
|
ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file...
|
||||||
ConfirmSitemapsCreation=Confirm sitemap generation
|
ConfirmSitemapsCreation=Confirm sitemap generation
|
||||||
SitemapGenerated=Sitemap Generated
|
SitemapGenerated=Sitemap Generated
|
||||||
|
ImportFavicon=Favicon
|
||||||
|
ErrorFaviconType=Favicon must be png
|
||||||
|
ErrorFaviconSize=Favicon must be of size 32x32
|
||||||
|
FaviconTooltip=Upload an image which needs to be a png of 32x32
|
||||||
|
GenerateImgWebp=Convert all images into webp
|
||||||
|
ConfirmGenerateImgWebp=If you confirm, you will generate all website's images in webp format...
|
||||||
|
ConfirmImgWebpCreation=Confirm all images convertion
|
||||||
|
SucessConvertImgWebp=Images successfully converted
|
||||||
|
|||||||
@ -464,6 +464,7 @@ PaymentByChequeOrderedToShort=Règlement TTC par chèque à l'ordre de
|
|||||||
SendTo=envoyé à
|
SendTo=envoyé à
|
||||||
PaymentByTransferOnThisBankAccount=Règlement par virement sur le compte bancaire suivant
|
PaymentByTransferOnThisBankAccount=Règlement par virement sur le compte bancaire suivant
|
||||||
VATIsNotUsedForInvoice=* TVA non applicable art-293B du CGI
|
VATIsNotUsedForInvoice=* TVA non applicable art-293B du CGI
|
||||||
|
VATIsNotUsedForInvoiceAsso=* TVA non applicable art-261-7 du CGI
|
||||||
LawApplicationPart1=Par application de la loi 80.335 du 12/05/80
|
LawApplicationPart1=Par application de la loi 80.335 du 12/05/80
|
||||||
LawApplicationPart2=les marchandises demeurent la propriété du
|
LawApplicationPart2=les marchandises demeurent la propriété du
|
||||||
LawApplicationPart3=vendeur jusqu'à complet encaissement de
|
LawApplicationPart3=vendeur jusqu'à complet encaissement de
|
||||||
|
|||||||
@ -92,6 +92,7 @@ SearchAllDesc=Le champ doit-il être utilisé pour effectuer une recherche à pa
|
|||||||
SpecDefDesc=Entrez ici toute la documentation que vous souhaitez joindre au module et qui n'a pas encore été définis dans d'autres onglets. Vous pouvez utiliser .md ou, mieux, la syntaxe enrichie .asciidoc.
|
SpecDefDesc=Entrez ici toute la documentation que vous souhaitez joindre au module et qui n'a pas encore été définis dans d'autres onglets. Vous pouvez utiliser .md ou, mieux, la syntaxe enrichie .asciidoc.
|
||||||
LanguageDefDesc=Entrez dans ces fichiers, toutes les clés et la traduction pour chaque fichier de langue.
|
LanguageDefDesc=Entrez dans ces fichiers, toutes les clés et la traduction pour chaque fichier de langue.
|
||||||
MenusDefDesc=Définissez ici les menus fournis par votre module
|
MenusDefDesc=Définissez ici les menus fournis par votre module
|
||||||
|
ImportExportProfiles=You will find here the Export or Import profiles provided by your module
|
||||||
DictionariesDefDesc=Définissez ici les dictionnaires fournis par le module
|
DictionariesDefDesc=Définissez ici les dictionnaires fournis par le module
|
||||||
PermissionsDefDesc=Définissez ici les nouvelles permissions fournies par votre module
|
PermissionsDefDesc=Définissez ici les nouvelles permissions fournies par votre module
|
||||||
MenusDefDescTooltip=Les menus fournis par votre module / application sont définis dans le tableau <strong>$this->menus</strong> dans le fichier descripteur de module. Vous pouvez modifier manuellement ce fichier ou utiliser l'éditeur intégré. <br><br> Remarque: une fois définis (et les modules réactivés), les menus sont également visibles dans l'éditeur de menus mis à la disposition des utilisateurs administrateurs sur %s.
|
MenusDefDescTooltip=Les menus fournis par votre module / application sont définis dans le tableau <strong>$this->menus</strong> dans le fichier descripteur de module. Vous pouvez modifier manuellement ce fichier ou utiliser l'éditeur intégré. <br><br> Remarque: une fois définis (et les modules réactivés), les menus sont également visibles dans l'éditeur de menus mis à la disposition des utilisateurs administrateurs sur %s.
|
||||||
|
|||||||
@ -456,13 +456,13 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
|
|||||||
) {
|
) {
|
||||||
if (!GETPOST('token', 'alpha')) { // If token is not provided or empty
|
if (!GETPOST('token', 'alpha')) { // If token is not provided or empty
|
||||||
if (GETPOST('uploadform', 'int')) {
|
if (GETPOST('uploadform', 'int')) {
|
||||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused. File size too large.");
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused. File size too large.");
|
||||||
$langs->loadLangs(array("errors", "install"));
|
$langs->loadLangs(array("errors", "install"));
|
||||||
print $langs->trans("ErrorFileSizeTooLarge").' ';
|
print $langs->trans("ErrorFileSizeTooLarge").' ';
|
||||||
print $langs->trans("ErrorGoBackAndCorrectParameters");
|
print $langs->trans("ErrorGoBackAndCorrectParameters");
|
||||||
die;
|
die;
|
||||||
} else {
|
} else {
|
||||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.");
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.", LOG_WARNING);
|
||||||
if (defined('CSRFCHECK_WITH_TOKEN')) {
|
if (defined('CSRFCHECK_WITH_TOKEN')) {
|
||||||
print "Access to a page that needs a token (constant CSRFCHECK_WITH_TOKEN is defined) is refused by CSRF protection in main.inc.php. Token not provided.\n";
|
print "Access to a page that needs a token (constant CSRFCHECK_WITH_TOKEN is defined) is refused by CSRF protection in main.inc.php. Token not provided.\n";
|
||||||
} else {
|
} else {
|
||||||
@ -477,7 +477,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
|
|||||||
$sessiontokenforthisurl = (empty($_SESSION['token']) ? '' : $_SESSION['token']);
|
$sessiontokenforthisurl = (empty($_SESSION['token']) ? '' : $_SESSION['token']);
|
||||||
// TODO Get the sessiontokenforthisurl into the array of session token
|
// TODO Get the sessiontokenforthisurl into the array of session token
|
||||||
if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $sessiontokenforthisurl) {
|
if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $sessiontokenforthisurl) {
|
||||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused due to invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING);
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused due to invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING);
|
||||||
//print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers.
|
//print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers.
|
||||||
setEventMessages('SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry', null, 'warnings');
|
setEventMessages('SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry', null, 'warnings');
|
||||||
//if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."<br>\n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings');
|
//if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."<br>\n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings');
|
||||||
@ -742,7 +742,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
// End test login / passwords
|
// End test login / passwords
|
||||||
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
|
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
|
||||||
// No data to test login, so we show the login page.
|
// No data to test login, so we show the login page.
|
||||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit");
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_INFO);
|
||||||
if (defined('NOREDIRECTBYMAINTOLOGIN')) {
|
if (defined('NOREDIRECTBYMAINTOLOGIN')) {
|
||||||
return 'ERROR_NOT_LOGGED';
|
return 'ERROR_NOT_LOGGED';
|
||||||
} else {
|
} else {
|
||||||
@ -1111,7 +1111,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
$user->getrights();
|
$user->getrights();
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').' NOTOKENRENEWAL='.(defined('NOTOKENRENEWAL') ?constant('NOTOKENRENEWAL') : ''));
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE);
|
||||||
//Another call for easy debugg
|
//Another call for easy debugg
|
||||||
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));
|
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));
|
||||||
|
|
||||||
|
|||||||
@ -216,7 +216,7 @@ $invoice_status_except_list = array(Facture::STATUS_DRAFT, Facture::STATUS_ABAND
|
|||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
|
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
|
||||||
if ($client) {
|
if ($client) {
|
||||||
$sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
$sql .= " f.rowid as facid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||||
}
|
}
|
||||||
$sql .= " sum(d.total_ht) as selling_price,";
|
$sql .= " sum(d.total_ht) as selling_price,";
|
||||||
// Note: qty and buy_price_ht is always positive (if not, your database may be corrupted, you can update this)
|
// Note: qty and buy_price_ht is always positive (if not, your database may be corrupted, you can update this)
|
||||||
@ -263,7 +263,7 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr
|
|||||||
$sql .= " AND d.buy_price_ht <> 0";
|
$sql .= " AND d.buy_price_ht <> 0";
|
||||||
}
|
}
|
||||||
if ($client) {
|
if ($client) {
|
||||||
$sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut";
|
$sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut";
|
||||||
} else {
|
} else {
|
||||||
$sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client";
|
$sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,7 +179,7 @@ if ($id > 0) {
|
|||||||
$sql .= " d.fk_product,";
|
$sql .= " d.fk_product,";
|
||||||
}
|
}
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
$sql .= " f.rowid as facid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||||
}
|
}
|
||||||
$sql .= " SUM(d.total_ht) as selling_price,";
|
$sql .= " SUM(d.total_ht) as selling_price,";
|
||||||
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
|
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
|
||||||
@ -216,7 +216,7 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr
|
|||||||
$sql .= " AND d.buy_price_ht <> 0";
|
$sql .= " AND d.buy_price_ht <> 0";
|
||||||
}
|
}
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity, d.fk_product, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut";
|
$sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity, d.fk_product, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut";
|
||||||
} else {
|
} else {
|
||||||
$sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity";
|
$sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,18 +76,18 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$result = $object->fetch($id, $ref);
|
$result = $object->fetch($id, $ref);
|
||||||
|
|
||||||
$title = $langs->trans('ProductServiceCard');
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$help_url = '';
|
||||||
$shortlabel = dol_trunc($object->label, 16);
|
$shortlabel = dol_trunc($object->label, 16);
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) {
|
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) {
|
||||||
$title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card');
|
$title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card');
|
||||||
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
||||||
}
|
}
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||||
$title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card');
|
$title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card');
|
||||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader('', $title, $helpurl);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* En mode visu
|
* En mode visu
|
||||||
@ -137,7 +137,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,";
|
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,";
|
||||||
$sql .= " f.rowid as facid, f.ref, f.total as total_ht,";
|
$sql .= " f.rowid as facid, f.ref, f.total_ht,";
|
||||||
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) {
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
$sql .= " sc.fk_soc, sc.fk_user,";
|
$sql .= " sc.fk_soc, sc.fk_user,";
|
||||||
@ -169,7 +169,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||||
$sql .= " AND d.buy_price_ht <> 0";
|
$sql .= " AND d.buy_price_ht <> 0";
|
||||||
}
|
}
|
||||||
$sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut, f.type";
|
$sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) {
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
$sql .= ", sc.fk_soc, sc.fk_user";
|
$sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,7 +160,7 @@ if ($socid > 0) {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,";
|
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,";
|
||||||
$sql .= " f.rowid as facid, f.ref, f.total as total_ht,";
|
$sql .= " f.rowid as facid, f.ref, f.total_ht,";
|
||||||
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
||||||
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
|
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
|
||||||
$sql .= " sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // always positive
|
$sql .= " sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // always positive
|
||||||
@ -179,7 +179,7 @@ if ($socid > 0) {
|
|||||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||||
$sql .= " AND d.buy_price_ht <> 0";
|
$sql .= " AND d.buy_price_ht <> 0";
|
||||||
}
|
}
|
||||||
$sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut, f.type";
|
$sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type";
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|||||||
@ -746,7 +746,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray',
|
|||||||
* 'position' is the sort order of field.
|
* 'position' is the sort order of field.
|
||||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
* 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200'
|
||||||
* 'help' is a string visible as a tooltip on field
|
* 'help' is a string visible as a tooltip on field
|
||||||
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
|
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
|
||||||
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
||||||
@ -1245,7 +1245,8 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) {
|
|||||||
'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}'
|
'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}'
|
||||||
'visible'=>GETPOST('propvisible', 'int'), 'enabled'=>GETPOST('propenabled', 'int'),
|
'visible'=>GETPOST('propvisible', 'int'), 'enabled'=>GETPOST('propenabled', 'int'),
|
||||||
'position'=>GETPOST('propposition', 'int'), 'notnull'=>GETPOST('propnotnull', 'int'), 'index'=>GETPOST('propindex', 'int'), 'searchall'=>GETPOST('propsearchall', 'int'),
|
'position'=>GETPOST('propposition', 'int'), 'notnull'=>GETPOST('propnotnull', 'int'), 'index'=>GETPOST('propindex', 'int'), 'searchall'=>GETPOST('propsearchall', 'int'),
|
||||||
'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'), 'help'=>GETPOST('prophelp', 'alpha')
|
'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'), 'help'=>GETPOST('prophelp', 'alpha'),
|
||||||
|
'css'=>GETPOST('propcss', 'aZ09'), 'cssview'=>GETPOST('propcssview', 'aZ09'), 'csslist'=>GETPOST('propcsslist', 'aZ09')
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) {
|
if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) {
|
||||||
@ -1708,10 +1709,9 @@ $head[$h][2] = 'initmodule';
|
|||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$linktoenabledisable = '';
|
$linktoenabledisable = '';
|
||||||
$modulestatusinfo = '';
|
|
||||||
|
|
||||||
if (is_array($listofmodules) && count($listofmodules) > 0) {
|
if (is_array($listofmodules) && count($listofmodules) > 0) {
|
||||||
// Define $linktoenabledisable and $modulestatusinfo
|
// Define $linktoenabledisable
|
||||||
$modulelowercase = strtolower($module);
|
$modulelowercase = strtolower($module);
|
||||||
$const_name = 'MAIN_MODULE_'.strtoupper($module);
|
$const_name = 'MAIN_MODULE_'.strtoupper($module);
|
||||||
|
|
||||||
@ -1732,6 +1732,8 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
|
|||||||
$linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1);
|
$linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1);
|
||||||
$linktoenabledisable .= '</a>';
|
$linktoenabledisable .= '</a>';
|
||||||
|
|
||||||
|
$linktoenabledisable .= $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning');
|
||||||
|
|
||||||
$objMod = $moduleobj;
|
$objMod = $moduleobj;
|
||||||
$backtourlparam = '';
|
$backtourlparam = '';
|
||||||
$backtourlparam .= ($backtourlparam ? '&' : '?').'module='.$module; // No urlencode here, done later
|
$backtourlparam .= ($backtourlparam ? '&' : '?').'module='.$module; // No urlencode here, done later
|
||||||
@ -1751,38 +1753,33 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
|
|||||||
} else {
|
} else {
|
||||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) {
|
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) {
|
||||||
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
|
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
|
||||||
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
|
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
|
||||||
} else {
|
} else {
|
||||||
// Case standard admin page (not a page provided by the
|
// Case standard admin page (not a page provided by the
|
||||||
// module but a page provided by dolibarr)
|
// module but a page provided by dolibarr)
|
||||||
$urltouse = DOL_URL_ROOT.'/admin/'.$urlpage;
|
$urltouse = DOL_URL_ROOT.'/admin/'.$urlpage;
|
||||||
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
|
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) {
|
} elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) {
|
||||||
$linktoenabledisable .= ' <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
|
$linktoenabledisable .= ' <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=set&token='.newToken().'&value=mod'.$module.$param.'">';
|
$linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=set&token='.newToken().'&value=mod'.$module.$param.'">';
|
||||||
$linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', '', false, 0, 0, '', 'classfortooltip', 1);
|
$linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1);
|
||||||
$linktoenabledisable .= "</a>\n";
|
$linktoenabledisable .= "</a>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->$modulelowercase->enabled)) {
|
|
||||||
$modulestatusinfo = $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loop to show tab of each module
|
// Loop to show tab of each module
|
||||||
foreach ($listofmodules as $tmpmodule => $tmpmodulearray) {
|
foreach ($listofmodules as $tmpmodule => $tmpmodulearray) {
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?module='.$tmpmodulearray['modulenamewithcase'].($forceddirread ? '@'.$dirread : '');
|
$head[$h][0] = $_SERVER["PHP_SELF"].'?module='.$tmpmodulearray['modulenamewithcase'].($forceddirread ? '@'.$dirread : '');
|
||||||
$head[$h][1] = $tmpmodulearray['modulenamewithcase'];
|
$head[$h][1] = $tmpmodulearray['modulenamewithcase'];
|
||||||
$head[$h][2] = $tmpmodulearray['modulenamewithcase'];
|
$head[$h][2] = $tmpmodulearray['modulenamewithcase'];
|
||||||
|
|
||||||
/*if ($tmpmodule == $modulelowercase) {
|
if ($tmpmodulearray['modulenamewithcase'] == $module) {
|
||||||
$head[$h][1] .= ' '.$modulestatusinfo;
|
$head[$h][4] = '<span class="inline-block">'.$linktoenabledisable.'</span>';
|
||||||
$head[$h][1] .= ' '.$linktoenabledisable;
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
@ -1793,6 +1790,7 @@ $head[$h][1] = $langs->trans("DangerZone");
|
|||||||
$head[$h][2] = 'deletemodule';
|
$head[$h][2] = 'deletemodule';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|
||||||
print dol_get_fiche_head($head, $module, '', -1, '', 0, $infomodulesfound, '', 8); // Modules
|
print dol_get_fiche_head($head, $module, '', -1, '', 0, $infomodulesfound, '', 8); // Modules
|
||||||
|
|
||||||
if ($module == 'initmodule') {
|
if ($module == 'initmodule') {
|
||||||
@ -1875,6 +1873,11 @@ if ($module == 'initmodule') {
|
|||||||
$head2[$h][2] = 'widgets';
|
$head2[$h][2] = 'widgets';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=exportimport&module='.$module.($forceddirread ? '@'.$dirread : '');
|
||||||
|
$head2[$h][1] = $langs->trans("Export").'-'.$langs->trans("Import");
|
||||||
|
$head2[$h][2] = 'exportimport';
|
||||||
|
$h++;
|
||||||
|
|
||||||
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=css&module='.$module.($forceddirread ? '@'.$dirread : '');
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=css&module='.$module.($forceddirread ? '@'.$dirread : '');
|
||||||
$head2[$h][1] = $langs->trans("CSS");
|
$head2[$h][1] = $langs->trans("CSS");
|
||||||
$head2[$h][2] = 'css';
|
$head2[$h][2] = 'css';
|
||||||
@ -1905,11 +1908,7 @@ if ($module == 'initmodule') {
|
|||||||
$head2[$h][2] = 'buildpackage';
|
$head2[$h][2] = 'buildpackage';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Link to enable / disable
|
print '<!-- Section for a given module -->';
|
||||||
print '<div class="center">'.$modulestatusinfo;
|
|
||||||
print ' '.$linktoenabledisable.'</div>';
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
// Note module is inside $dirread
|
// Note module is inside $dirread
|
||||||
|
|
||||||
@ -2608,6 +2607,7 @@ if ($module == 'initmodule') {
|
|||||||
print '<th class="center">'.$form->textwithpicto($langs->trans("IsAMeasure"), $langs->trans("IsAMeasureDesc")).'</th>';
|
print '<th class="center">'.$form->textwithpicto($langs->trans("IsAMeasure"), $langs->trans("IsAMeasureDesc")).'</th>';
|
||||||
print '<th class="center">'.$langs->trans("CSSClass").'</th>';
|
print '<th class="center">'.$langs->trans("CSSClass").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("CSSViewClass").'</th>';
|
print '<th class="center">'.$langs->trans("CSSViewClass").'</th>';
|
||||||
|
print '<th class="center">'.$langs->trans("CSSListClass").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("KeyForTooltip").'</th>';
|
print '<th class="center">'.$langs->trans("KeyForTooltip").'</th>';
|
||||||
print '<th class="center">'.$langs->trans("ShowOnCombobox").'</th>';
|
print '<th class="center">'.$langs->trans("ShowOnCombobox").'</th>';
|
||||||
//print '<th class="center">'.$langs->trans("Disabled").'</th>';
|
//print '<th class="center">'.$langs->trans("Disabled").'</th>';
|
||||||
@ -2639,6 +2639,7 @@ if ($module == 'initmodule') {
|
|||||||
print '<td class="center"><input class="text" size="2" name="propisameasure" value="'.dol_escape_htmltag(GETPOST('propisameasure', 'alpha')).'"></td>';
|
print '<td class="center"><input class="text" size="2" name="propisameasure" value="'.dol_escape_htmltag(GETPOST('propisameasure', 'alpha')).'"></td>';
|
||||||
print '<td class="center"><input class="text" size="2" name="propcss" value="'.dol_escape_htmltag(GETPOST('propcss', 'alpha')).'"></td>';
|
print '<td class="center"><input class="text" size="2" name="propcss" value="'.dol_escape_htmltag(GETPOST('propcss', 'alpha')).'"></td>';
|
||||||
print '<td class="center"><input class="text" size="2" name="propcssview" value="'.dol_escape_htmltag(GETPOST('propcssview', 'alpha')).'"></td>';
|
print '<td class="center"><input class="text" size="2" name="propcssview" value="'.dol_escape_htmltag(GETPOST('propcssview', 'alpha')).'"></td>';
|
||||||
|
print '<td class="center"><input class="text" size="2" name="propcsslist" value="'.dol_escape_htmltag(GETPOST('propcsslist', 'alpha')).'"></td>';
|
||||||
print '<td class="center"><input class="text" size="2" name="prophelp" value="'.dol_escape_htmltag(GETPOST('prophelp', 'alpha')).'"></td>';
|
print '<td class="center"><input class="text" size="2" name="prophelp" value="'.dol_escape_htmltag(GETPOST('prophelp', 'alpha')).'"></td>';
|
||||||
print '<td class="center"><input class="text" size="2" name="propshowoncombobox" value="'.dol_escape_htmltag(GETPOST('propshowoncombobox', 'alpha')).'"></td>';
|
print '<td class="center"><input class="text" size="2" name="propshowoncombobox" value="'.dol_escape_htmltag(GETPOST('propshowoncombobox', 'alpha')).'"></td>';
|
||||||
//print '<td class="center"><input class="text" size="2" name="propdisabled" value="'.dol_escape_htmltag(GETPOST('propdisabled', 'alpha')).'"></td>';
|
//print '<td class="center"><input class="text" size="2" name="propdisabled" value="'.dol_escape_htmltag(GETPOST('propdisabled', 'alpha')).'"></td>';
|
||||||
@ -2679,6 +2680,7 @@ if ($module == 'initmodule') {
|
|||||||
$propisameasure = $propval['isameasure'];
|
$propisameasure = $propval['isameasure'];
|
||||||
$propcss = $propval['css'];
|
$propcss = $propval['css'];
|
||||||
$propcssview = $propval['cssview'];
|
$propcssview = $propval['cssview'];
|
||||||
|
$propcsslist = $propval['csslist'];
|
||||||
$prophelp = $propval['help'];
|
$prophelp = $propval['help'];
|
||||||
$propshowoncombobox = $propval['showoncombobox'];
|
$propshowoncombobox = $propval['showoncombobox'];
|
||||||
//$propdisabled=$propval['disabled'];
|
//$propdisabled=$propval['disabled'];
|
||||||
@ -2738,6 +2740,9 @@ if ($module == 'initmodule') {
|
|||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print $propcssview ? dol_escape_htmltag($propcssview) : '';
|
print $propcssview ? dol_escape_htmltag($propcssview) : '';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
print '<td class="center">';
|
||||||
|
print $propcsslist ? dol_escape_htmltag($propcsslist) : '';
|
||||||
|
print '</td>';
|
||||||
print '<td class="tdoverflowmax200">';
|
print '<td class="tdoverflowmax200">';
|
||||||
print $prophelp ? dol_escape_htmltag($prophelp) : '';
|
print $prophelp ? dol_escape_htmltag($prophelp) : '';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -3336,6 +3341,45 @@ if ($module == 'initmodule') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($tab == 'exportimport') {
|
||||||
|
$pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath'];
|
||||||
|
|
||||||
|
$exportlist = $moduleobj->export_label;
|
||||||
|
$importlist = $moduleobj->import_label;
|
||||||
|
|
||||||
|
if ($action != 'editfile' || empty($file)) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->transnoentities('ImportExportProfiles').'</span><br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>';
|
||||||
|
print ' <a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||||
|
print '<br>';
|
||||||
|
} else {
|
||||||
|
$fullpathoffile = dol_buildpath($file, 0);
|
||||||
|
|
||||||
|
$content = file_get_contents($fullpathoffile);
|
||||||
|
|
||||||
|
// New module
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
print '<input type="hidden" name="action" value="savefile">';
|
||||||
|
print '<input type="hidden" name="file" value="'.dol_escape_htmltag($file).'">';
|
||||||
|
print '<input type="hidden" name="tab" value="'.$tab.'">';
|
||||||
|
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||||
|
|
||||||
|
$doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%');
|
||||||
|
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ?GETPOST('format', 'aZ09') : 'html'));
|
||||||
|
print '<br>';
|
||||||
|
print '<center>';
|
||||||
|
print '<input type="submit" class="button buttonforacesave button-save" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||||
|
print ' ';
|
||||||
|
print '<input type="submit" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
|
||||||
|
print '</center>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($tab == 'cli') {
|
if ($tab == 'cli') {
|
||||||
$clifiles = array();
|
$clifiles = array();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user