Merge branch 'develop' into patch-422
This commit is contained in:
commit
d0abcf594c
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -18,6 +18,7 @@
|
||||
*.pp text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.conf text eol=lf
|
||||
|
||||
.bash_aliases text eol=lf
|
||||
|
||||
@ -26,6 +27,7 @@
|
||||
*.ico binary
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.odt binary
|
||||
*.odf binary
|
||||
*.frm binary
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#HTMLDOC 1.8.27
|
||||
-t pdf14 -f "../../doc/dolibarr_en.pdf" --webpage --no-title --logoimage "../../doc/images/dolibarr_256x256.png" --linkcolor #2200c0 --linkstyle plain --size Universal --left 0.30in --right 0.30in --top 0.40in --bottom 0.30in --header ... --header1 ... --footer c/d --nup 1 --tocheader ... --tocfooter ... --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 10.0 --fontspacing 1.0 --headingfont Helvetica --bodyfont Helvetica --headfootsize 9.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow
|
||||
http://wiki.dolibarr.org/index.php/Main_Page
|
||||
http://wiki.dolibarr.org/index.php/What_Dolibarr_Do
|
||||
https://wiki.dolibarr.org/index.php/Home
|
||||
https://wiki.dolibarr.org/index.php/What_Dolibarr_Does
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Format of sitemap file is available at
|
||||
# http://www.sitemaps.org/protocol.html
|
||||
# https://www.sitemaps.org/protocol.html
|
||||
|
||||
# To build a sitemap from urllist-bing.txt, run
|
||||
# google-sitemapgen --config=config-bing.xml --testing
|
||||
|
||||
@ -102,8 +102,8 @@ for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
|
||||
$produit->ref = ($produit->type?'S':'P').time().$s;
|
||||
$produit->label = 'Label '.time().$s;
|
||||
$produit->description = 'Description '.time().$s;
|
||||
$produit->price = mt_rand(1, 1000);
|
||||
$produit->tva_tx = "19.6";
|
||||
$produit->price = mt_rand(1, 999.99);
|
||||
$produit->tva_tx = "20.0";
|
||||
$ret=$produit->create($user);
|
||||
if ($ret < 0) {
|
||||
print "Error $ret - ".$produit->error."\n";
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
Spain https://incwell.eu/en/company-formation-spain/
|
||||
|
||||
France https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise
|
||||
|
||||
@ -6,7 +6,10 @@ Benutzeranleitung
|
||||
--------------------------------
|
||||
|
||||
Alle Dolibarr-Informationen sind online verfuegbar ueber die Webseiten:
|
||||
https://www.dolibarr.de
|
||||
oder
|
||||
https://www.dolibarr.org
|
||||
https://wiki.dolibarr.org
|
||||
|
||||
|
||||
https://www.dolibarr.de (de) oder https://www.dolibarr.org (intl)
|
||||
|
||||
|
||||
https://wiki.dolibarr.org/index.php/Hauptseite (de)
|
||||
|
||||
|
||||
@ -237,8 +237,6 @@ class DolibarrApi
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Check user access to a resource
|
||||
*
|
||||
* Check access by user to a given resource
|
||||
*
|
||||
* @param string $resource element to check
|
||||
|
||||
@ -56,20 +56,23 @@ $label = GETPOST('label', 'alpha');
|
||||
$actioncode = GETPOST('actioncode');
|
||||
$fk_user = GETPOST('userid', 'int');
|
||||
|
||||
$object = new ChargeSociales($db);
|
||||
if ($id > 0) {
|
||||
$object->fetch($id);
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges');
|
||||
$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges');
|
||||
|
||||
$object = new ChargeSociales($db);
|
||||
|
||||
/* *************************************************************************** */
|
||||
/* */
|
||||
/* Actions */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Classify paid
|
||||
if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes') {
|
||||
|
||||
@ -45,13 +45,6 @@ $id = GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges');
|
||||
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -79,6 +72,12 @@ if ($id > 0) {
|
||||
$upload_dir = $conf->tax->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'tax';
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -36,14 +36,17 @@ $langs->loadLangs(array('compta', 'bills'));
|
||||
$id = GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$object = new ChargeSociales($db);
|
||||
if ($id > 0) {
|
||||
$object->fetch($id);
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges');
|
||||
|
||||
$object = new ChargeSociales($db);
|
||||
$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -28,14 +28,6 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Security check
|
||||
$socid = isset($_GET["socid"]) ? $_GET["socid"] : '';
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||
@ -125,6 +117,14 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
$hookmanager->initHooks(array('sclist'));
|
||||
$object = new ChargeSociales($db);
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', 'chargesociales', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -38,7 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||
|
||||
|
||||
$hookmanager = new HookManager($db);
|
||||
|
||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
@ -47,12 +46,6 @@ $hookmanager->initHooks(array('specialexpensesindex'));
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'bills', 'hrm'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
|
||||
|
||||
$year = GETPOST("year", 'int');
|
||||
$search_sc_type = GETPOST('search_sc_type', 'int');
|
||||
|
||||
@ -60,7 +53,7 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) {
|
||||
if (empty($page) || $page < 0) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
@ -73,9 +66,11 @@ if (!$sortorder) {
|
||||
$sortorder = "DESC";
|
||||
}
|
||||
|
||||
if (empty($conf->tax->enabled) || empty($user->rights->tax->charges->lire)) {
|
||||
accessforbidden();
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', 'chargesociales', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
@ -104,8 +99,9 @@ $accountlinestatic = new AccountLine($db);
|
||||
$formsocialcontrib = new FormSocialContrib($db);
|
||||
|
||||
$title = $langs->trans("SocialContributionsPayments");
|
||||
$help_url = '';
|
||||
|
||||
llxHeader('', $title);
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
|
||||
$param = '';
|
||||
@ -300,10 +296,12 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
|
||||
// Type payment
|
||||
print '<td>';
|
||||
$labelpayment = '';
|
||||
if ($obj->payment_code) {
|
||||
print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
|
||||
$labelpayment = $langs->trans("PaymentTypeShort".$obj->payment_code);
|
||||
}
|
||||
print '<td class="tdoverflowmax150" title="'.$labelpayment.'">';
|
||||
print $labelpayment;
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$obj->num_payment.'</td>';
|
||||
@ -311,12 +309,12 @@ while ($i < min($num, $limit)) {
|
||||
// Account
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
// Bank transaction
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
$accountlinestatic->id = $obj->fk_bank;
|
||||
print $accountlinestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
if ($obj->bid > 0) {
|
||||
$accountstatic->id = $obj->bid;
|
||||
$accountstatic->ref = $obj->bref;
|
||||
@ -334,12 +332,14 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Expected to pay
|
||||
print '<td class="right">'.price($obj->total).'</td>';
|
||||
print '<td class="right"><span class="amount">'.price($obj->total).'</span></td>';
|
||||
|
||||
// Paid
|
||||
print '<td class="right">';
|
||||
if ($obj->totalpaye) {
|
||||
print price($obj->totalpaye);
|
||||
print '<span class="amount">'.price($obj->totalpaye).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -57,18 +57,21 @@ if (empty($refund)) {
|
||||
$datev = dol_mktime(12, 0, 0, GETPOST("datevmonth", 'int'), GETPOST("datevday", 'int'), GETPOST("datevyear", 'int'));
|
||||
$datep = dol_mktime(12, 0, 0, GETPOST("datepmonth", 'int'), GETPOST("datepday", 'int'), GETPOST("datepyear", 'int'));
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('taxvatcard', 'globalcard'));
|
||||
|
||||
if ($id > 0) {
|
||||
$object->fetch($id);
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('taxvatcard', 'globalcard'));
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/**
|
||||
@ -330,6 +333,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -338,7 +342,8 @@ $form = new Form($db);
|
||||
|
||||
$title = $langs->trans("VAT")." - ".$langs->trans("Card");
|
||||
$help_url = '';
|
||||
llxHeader("", $title, $helpurl);
|
||||
|
||||
llxHeader("", $title, $help_url);
|
||||
|
||||
|
||||
if ($id) {
|
||||
@ -438,6 +443,7 @@ if ($action == 'create') {
|
||||
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
print '<tr><td class="fieldrequired" id="label_fk_account">'.$langs->trans("BankAccount").'</td><td>';
|
||||
print img_picto('', 'bank_account', 'pictofixedwidth');
|
||||
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1); // List of bank account available
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ $socid = GETPOSTINT('socid');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
|
||||
@ -496,14 +496,14 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
|
||||
// Total HT
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap right">';
|
||||
print '<td class="nowrap right"><span class="amount">';
|
||||
print price($fields['totalht']);
|
||||
if (price2num($fields['ftotal_ttc'])) {
|
||||
//print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - ";
|
||||
$ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']);
|
||||
//print ' ('.round($ratiolineinvoice*100,2).'%)';
|
||||
}
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
}
|
||||
|
||||
// Payment
|
||||
@ -523,7 +523,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) {
|
||||
$ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']);
|
||||
}
|
||||
print price(price2num($fields['payment_amount'], 'MT'));
|
||||
print '<span class="amount">'.price(price2num($fields['payment_amount'], 'MT')).'</span>';
|
||||
if (isset($fields['payment_amount'])) {
|
||||
print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
|
||||
}
|
||||
@ -532,17 +532,17 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
}
|
||||
|
||||
// Total collected
|
||||
print '<td class="nowrap right">';
|
||||
print '<td class="nowrap right"><span class="amount">';
|
||||
$temp_ht = $fields['totalht'] * $ratiopaymentinvoice;
|
||||
print price(price2num($temp_ht, 'MT'), 1);
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
|
||||
// VAT
|
||||
print '<td class="nowrap right">';
|
||||
print '<td class="nowrap right"><span class="amount">';
|
||||
$temp_vat = $fields['vat'] * $ratiopaymentinvoice;
|
||||
print price(price2num($temp_vat, 'MT'), 1);
|
||||
//print price($fields['vat']);
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
print '</tr>';
|
||||
|
||||
$subtot_coll_total_ht += $temp_ht;
|
||||
@ -550,6 +550,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
$x_coll_sum += $temp_vat;
|
||||
}
|
||||
}
|
||||
|
||||
// Total customers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4"></td>';
|
||||
@ -686,14 +687,14 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
|
||||
// Total HT
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap right">';
|
||||
print '<td class="nowrap right"><span class="amount">';
|
||||
print price($fields['totalht']);
|
||||
if (price2num($fields['ftotal_ttc'])) {
|
||||
//print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - ";
|
||||
$ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']);
|
||||
//print ' ('.round($ratiolineinvoice*100,2).'%)';
|
||||
}
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
}
|
||||
|
||||
// Payment
|
||||
@ -713,7 +714,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) {
|
||||
$ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']);
|
||||
}
|
||||
print price(price2num($fields['payment_amount'], 'MT'));
|
||||
print '<span class="amount">'.price(price2num($fields['payment_amount'], 'MT')).'</span>';
|
||||
if (isset($fields['payment_amount'])) {
|
||||
print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
|
||||
}
|
||||
@ -722,17 +723,17 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
}
|
||||
|
||||
// VAT paid
|
||||
print '<td class="nowrap right">';
|
||||
print '<td class="nowrap right"><span class="amount">';
|
||||
$temp_ht = $fields['totalht'] * $ratiopaymentinvoice;
|
||||
print price(price2num($temp_ht, 'MT'), 1);
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
|
||||
// VAT
|
||||
print '<td class="nowrap right">';
|
||||
print '<td class="nowrap right"><span class="amount">';
|
||||
$temp_vat = $fields['vat'] * $ratiopaymentinvoice;
|
||||
print price(price2num($temp_vat, 'MT'), 1);
|
||||
//print price($fields['vat']);
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
print '</tr>';
|
||||
|
||||
$subtot_paye_total_ht += $temp_ht;
|
||||
|
||||
@ -46,13 +46,6 @@ $id = GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', 'vat', 'charges');
|
||||
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -71,8 +64,8 @@ if (!$sortfield) {
|
||||
$sortfield = "name";
|
||||
}
|
||||
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
if ($id > 0) {
|
||||
$object->fetch($id);
|
||||
}
|
||||
@ -80,6 +73,12 @@ if ($id > 0) {
|
||||
$upload_dir = $conf->tax->dir_output.'/vat/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'tax-vat';
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -62,7 +62,7 @@ $socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/**
|
||||
@ -106,8 +106,8 @@ function pt($db, $sql, $date)
|
||||
if ($obj->mode == 'claimed' && !empty($previousmode)) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||
print '<td class="nowrap right"><span class="amount">'.price($amountclaimed)."</span></td>\n";
|
||||
print '<td class="nowrap right"><span class="amount">'.price($amountpaid)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$amountclaimed = 0;
|
||||
@ -126,8 +126,8 @@ function pt($db, $sql, $date)
|
||||
if ($obj->mode == 'paid') {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$obj->dm."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||
print '<td class="nowrap right"><span class="amount">'.price($amountclaimed)."</span></td>\n";
|
||||
print '<td class="nowrap right"><span class="amount">'.price($amountpaid)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
$amountclaimed = 0;
|
||||
$amountpaid = 0;
|
||||
@ -438,7 +438,7 @@ if ($refresh === true) {
|
||||
$x_coll_sum += $temp_vat;
|
||||
}
|
||||
}
|
||||
print '<td class="nowrap right">' . price(price2num($x_coll_sum, 'MT')) . '</td>';
|
||||
print '<td class="nowrap right"><span class="amount">' . price(price2num($x_coll_sum, 'MT')) . '</span></td>';
|
||||
|
||||
$x_paye_sum = 0;
|
||||
foreach (array_keys($x_paye) as $rate) {
|
||||
@ -478,7 +478,7 @@ if ($refresh === true) {
|
||||
$x_paye_sum += $temp_vat;
|
||||
}
|
||||
}
|
||||
print '<td class="nowrap right">' . price(price2num($x_paye_sum, 'MT')) . '</td>';
|
||||
print '<td class="nowrap right"><span class="amount">' . price(price2num($x_paye_sum, 'MT')) . '</span></td>';
|
||||
|
||||
$subtotalcoll = $subtotalcoll + $x_coll_sum;
|
||||
$subtotalpaye = $subtotalpaye + $x_paye_sum;
|
||||
@ -487,10 +487,11 @@ if ($refresh === true) {
|
||||
$total = $total + $diff;
|
||||
$subtotal = price2num($subtotal + $diff, 'MT');
|
||||
|
||||
print '<td class="nowrap right">' . price(price2num($diff, 'MT')) . '</td>' . "\n";
|
||||
print '<td class="nowrap right"><span class="amount">' . price(price2num($diff, 'MT')) . '</span></td>' . "\n";
|
||||
print "<td> </td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
// Total
|
||||
$i++;
|
||||
$m++;
|
||||
if ($i > 2) {
|
||||
|
||||
@ -32,15 +32,14 @@ $langs->loadLangs(array('compta', 'bills'));
|
||||
$id = GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -28,13 +28,6 @@
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
@ -99,6 +92,13 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
$hookmanager->initHooks(array('salestaxeslist'));
|
||||
$object = new Tva($db);
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -509,7 +509,7 @@ while ($i < min($num, $limit)) {
|
||||
// Amount
|
||||
if (!empty($arrayfields['t.amount']['checked'])) {
|
||||
$total = $total + $obj->amount;
|
||||
print '<td class="nowrap right">' . price($obj->amount) . '</td>';
|
||||
print '<td class="nowrap right"><span class="amount">' . price($obj->amount) . '</span></td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -38,12 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'bills'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
|
||||
|
||||
$mode = GETPOST("mode", 'alpha');
|
||||
$year = GETPOST("year", 'int');
|
||||
$filtre = GETPOST("filtre", 'alpha');
|
||||
@ -68,6 +62,15 @@ if (!$sortorder) {
|
||||
$sortorder = "DESC";
|
||||
}
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
//$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -233,11 +236,11 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) {
|
||||
// Expected to pay
|
||||
print '<td class="right"><span class="amount">'.price($obj->total).'</span></td>';
|
||||
// Paid
|
||||
print '<td class="right">';
|
||||
print '<td class="right"><span class="amount">';
|
||||
if ($obj->totalpaye) {
|
||||
print price($obj->totalpaye);
|
||||
}
|
||||
print '</td>';
|
||||
print '</span></td>';
|
||||
print '</tr>';
|
||||
|
||||
$total = $total + $obj->total;
|
||||
@ -245,6 +248,8 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) {
|
||||
$totalpaye = $totalpaye + $obj->totalpaye;
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Total
|
||||
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="liste_total right"></td>'; // A total here has no sense
|
||||
print '<td align="center" class="liste_total"> </td>';
|
||||
|
||||
@ -66,12 +66,14 @@ if (empty($modetax)) {
|
||||
$modetax = 0;
|
||||
}
|
||||
|
||||
$object = new Tva($db);
|
||||
|
||||
// Security check
|
||||
$socid = GETPOSTINT('socid');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -93,7 +93,7 @@ class box_members_by_type extends ModeleBoxes
|
||||
if ($user->rights->adherent->lire) {
|
||||
$MembersToValidate = array();
|
||||
$MembersValidated = array();
|
||||
$MemberUpToDate = array();
|
||||
$MembersUpToDate = array();
|
||||
$MembersExcluded = array();
|
||||
$MembersResiliated = array();
|
||||
|
||||
@ -164,7 +164,7 @@ class box_members_by_type extends ModeleBoxes
|
||||
$i = 0;
|
||||
while ($i < $num2) {
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$MemberUpToDate[$objp->fk_adherent_type] = $objp->somme;
|
||||
$MembersUpToDate[$objp->fk_adherent_type] = $objp->somme;
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($result);
|
||||
@ -215,12 +215,12 @@ class box_members_by_type extends ModeleBoxes
|
||||
);
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => (isset($MembersValidated[$key]) && ($MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) > 0) ? $MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) : '') . ' ' . $staticmember->LibStatut(1, 1, 0, 3),
|
||||
'text' => (isset($MembersValidated[$key]) && ($MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) > 0) ? $MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) : '') . ' ' . $staticmember->LibStatut(1, 1, 0, 3),
|
||||
'asis' => 1,
|
||||
);
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => (isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key] : '') . ' ' . $staticmember->LibStatut(1, 1, $now, 3),
|
||||
'text' => (isset($MembersUpToDate[$key]) && $MembersUpToDate[$key] > 0 ? $MembersUpToDate[$key] : '') . ' ' . $staticmember->LibStatut(1, 1, $now, 3),
|
||||
'asis' => 1,
|
||||
);
|
||||
$this->info_box_contents[$line][] = array(
|
||||
|
||||
@ -1840,14 +1840,15 @@ function deleteFilesIntoDatabaseIndex($dir, $file, $mode = 'uploaded')
|
||||
|
||||
|
||||
/**
|
||||
* Convert an image file into another format.
|
||||
* This need Imagick php extension.
|
||||
* Convert an image file or a PDF into another image format.
|
||||
* This need Imagick php extension. You can use dol_imageResizeOrCrop() for a function that need GD.
|
||||
*
|
||||
* @param string $fileinput Input file name
|
||||
* @param string $ext Format of target file (It is also extension added to file if fileoutput is not provided).
|
||||
* @param string $fileoutput Output filename
|
||||
* @param string $page Page number if we convert a PDF into png
|
||||
* @return int <0 if KO, 0=Nothing done, >0 if OK
|
||||
* @see dol_imageResizeOrCrop()
|
||||
*/
|
||||
function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '', $page = '')
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ function image_format_supported($file, $acceptsvg = 0)
|
||||
|
||||
|
||||
/**
|
||||
* Return size of image file on disk (Supported extensions are gif, jpg, png and bmp)
|
||||
* Return size of image file on disk (Supported extensions are gif, jpg, png, bmp and webp)
|
||||
*
|
||||
* @param string $file Full path name of file
|
||||
* @param bool $url Image with url (true or false)
|
||||
@ -127,17 +127,19 @@ function dol_getImageSize($file, $url = false)
|
||||
|
||||
|
||||
/**
|
||||
* Resize or crop an image file (Supported extensions are gif, jpg, png and bmp)
|
||||
* Resize or crop an image file (Supported extensions are gif, jpg, png, bmp and webp)
|
||||
*
|
||||
* @param string $file Path of file to resize/crop
|
||||
* @param int $mode 0=Resize, 1=Crop
|
||||
* @param int $newWidth Largeur maximum que dois faire l'image destination (0=keep ratio)
|
||||
* @param int $newHeight Hauteur maximum que dois faire l'image destination (0=keep ratio)
|
||||
* @param int $src_x Position of croping image in source image (not use if mode=0)
|
||||
* @param int $src_y Position of croping image in source image (not use if mode=0)
|
||||
* @return string File name if OK, error message if KO
|
||||
* @param string $file Path of source file to resize/crop
|
||||
* @param int $mode 0=Resize, 1=Crop
|
||||
* @param int $newWidth Largeur maximum que dois faire l'image destination (0=keep ratio)
|
||||
* @param int $newHeight Hauteur maximum que dois faire l'image destination (0=keep ratio)
|
||||
* @param int $src_x Position of croping image in source image (not use if mode=0)
|
||||
* @param int $src_y Position of croping image in source image (not use if mode=0)
|
||||
* @param string $filetowrite Path of file to write (overwrite source file if not provided)
|
||||
* @return string File name if OK, error message if KO
|
||||
* @see dol_convert_file()
|
||||
*/
|
||||
function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0)
|
||||
function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0, $filetowrite = '')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
@ -159,8 +161,8 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0,
|
||||
return 'This filename '.$file.' does not seem to be an image filename.';
|
||||
} elseif (!is_numeric($newWidth) && !is_numeric($newHeight)) {
|
||||
return 'Wrong value for parameter newWidth or newHeight';
|
||||
} elseif ($mode == 0 && $newWidth <= 0 && $newHeight <= 0) {
|
||||
return 'At least newHeight or newWidth must be defined for resizing';
|
||||
} elseif ($mode == 0 && $newWidth <= 0 && $newHeight <= 0 && (empty($filetowrite) || $filetowrite == $file)) {
|
||||
return 'At least newHeight or newWidth must be defined for resizing, or a target filename must be set to convert';
|
||||
} elseif ($mode == 1 && ($newWidth <= 0 || $newHeight <= 0)) {
|
||||
return 'Both newHeight or newWidth must be defined for croping';
|
||||
}
|
||||
@ -172,6 +174,11 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0,
|
||||
$imgHeight = $infoImg[1]; // Hauteur de l'image
|
||||
|
||||
if ($mode == 0) { // If resize, we check parameters
|
||||
if (!empty($filetowrite) && $filetowrite != $file && $newWidth <= 0 && $newHeight <= 0) {
|
||||
$newWidth = $imgWidth;
|
||||
$newHeight = $imgHeight;
|
||||
}
|
||||
|
||||
if ($newWidth <= 0) {
|
||||
$newWidth = intval(($newHeight / $imgHeight) * $imgWidth); // Keep ratio
|
||||
}
|
||||
@ -280,34 +287,36 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0,
|
||||
//imagecopyresized($imgThumb, $img, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $imgWidth, $imgHeight); // Insere l'image de base redimensionnee
|
||||
imagecopyresampled($imgThumb, $img, 0, 0, $src_x, $src_y, $newWidth, $newHeight, ($mode == 0 ? $imgWidth : $newWidth), ($mode == 0 ? $imgHeight : $newHeight)); // Insere l'image de base redimensionnee
|
||||
|
||||
$imgThumbName = $file;
|
||||
$imgTargetName = ($filetowrite ? $filetowrite : $file);
|
||||
|
||||
// Check if permission are ok
|
||||
//$fp = fopen($imgThumbName, "w");
|
||||
//$fp = fopen($imgTargetName, "w");
|
||||
//fclose($fp);
|
||||
|
||||
// Create image on disk
|
||||
switch ($infoImg[2]) {
|
||||
case 1: // Gif
|
||||
imagegif($imgThumb, $imgThumbName);
|
||||
$newExt = strtolower(pathinfo($imgTargetName, PATHINFO_EXTENSION));
|
||||
|
||||
// Create image on disk (overwrite file if exists)
|
||||
switch ($newExt) {
|
||||
case 'gif': // Gif
|
||||
imagegif($imgThumb, $imgTargetName);
|
||||
break;
|
||||
case 2: // Jpg
|
||||
imagejpeg($imgThumb, $imgThumbName, $newquality);
|
||||
case 'jpg': // Jpg
|
||||
imagejpeg($imgThumb, $imgTargetName, $newquality);
|
||||
break;
|
||||
case 3: // Png
|
||||
imagepng($imgThumb, $imgThumbName, $newquality);
|
||||
case 'png': // Png
|
||||
imagepng($imgThumb, $imgTargetName, $newquality);
|
||||
break;
|
||||
case 4: // Bmp
|
||||
imagewbmp($imgThumb, $imgThumbName);
|
||||
case 'bmp': // Bmp
|
||||
imagewbmp($imgThumb, $imgTargetName);
|
||||
break;
|
||||
case 18: // Webp
|
||||
imagewebp($imgThumb, $imgThumbName, $newquality);
|
||||
case 'webp': // Webp
|
||||
imagewebp($imgThumb, $imgTargetName, $newquality);
|
||||
break;
|
||||
}
|
||||
|
||||
// Set permissions on file
|
||||
if (!empty($conf->global->MAIN_UMASK)) {
|
||||
@chmod($imgThumbName, octdec($conf->global->MAIN_UMASK));
|
||||
@chmod($imgTargetName, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
|
||||
// Free memory. This does not delete image.
|
||||
@ -316,7 +325,7 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0,
|
||||
|
||||
clearstatcache(); // File was replaced by a modified one, so we clear file caches.
|
||||
|
||||
return $imgThumbName;
|
||||
return $imgTargetName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -563,6 +563,8 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
||||
foreach ($featuresarray as $feature) {
|
||||
$sql = '';
|
||||
|
||||
//var_dump($feature);
|
||||
|
||||
// For backward compatibility
|
||||
if ($feature == 'member') {
|
||||
$feature = 'adherent';
|
||||
@ -574,7 +576,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
||||
$feature = 'projet_task';
|
||||
}
|
||||
|
||||
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'website'); // Test on entity only (Objects with no link to company)
|
||||
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salary', 'website'); // Test on entity only (Objects with no link to company)
|
||||
$checksoc = array('societe'); // Test for societe object
|
||||
$checkother = array('contact', 'agenda'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...).
|
||||
$checkproject = array('projet', 'project'); // Test for project object
|
||||
|
||||
@ -250,7 +250,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage,
|
||||
// Add js
|
||||
$tplcontent .= '<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />'."\n";
|
||||
$tplcontent .= '<!-- Include link to JS file -->'."\n";
|
||||
$tplcontent .= '<script src="/javascript.js.php"></script>'."\n";
|
||||
$tplcontent .= '<script async src="/javascript.js.php"></script>'."\n";
|
||||
// Add headers
|
||||
$tplcontent .= '<!-- Include HTML header from common file -->'."\n";
|
||||
$tplcontent .= '<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>'."\n";
|
||||
|
||||
1
htdocs/debugbar/class/DataCollector/index.html
Normal file
1
htdocs/debugbar/class/DataCollector/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
1
htdocs/debugbar/class/index.html
Normal file
1
htdocs/debugbar/class/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
1
htdocs/debugbar/js/index.html
Normal file
1
htdocs/debugbar/js/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -104,7 +104,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
|
||||
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>1, 'visible'=>0, 'index'=>1,),
|
||||
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>1, 'index'=>1,),
|
||||
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
||||
'date_subscription' => array('type'=>'datetime', 'label'=>'DateSubscription', 'enabled'=>'1', 'position'=>56, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'1',),
|
||||
'amount' => array('type'=>'price', 'label'=>'AmountOfSubscriptionPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
|
||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
|
||||
@ -745,6 +745,10 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
if ($option == 'conforboothid') {
|
||||
$url .= '&conforboothid='.$this->fk_actioncomm;
|
||||
}
|
||||
|
||||
if ($option == 'conforboothidproject') {
|
||||
$url .= '&conforboothid='.$this->fk_actioncomm.'&withproject=1' ;
|
||||
}
|
||||
}
|
||||
|
||||
$linkclose = '';
|
||||
|
||||
@ -45,7 +45,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'co
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
$withproject = GETPOST('withproject', 'int');
|
||||
$project_ref = GETPOST('project_ref', 'alpha');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
// Initialize technical objects
|
||||
$object = new ConferenceOrBooth($db);
|
||||
|
||||
@ -55,9 +55,10 @@ if (!$res) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
dol_include_once('/eventorganization/class/conferenceorbooth.class.php');
|
||||
dol_include_once('/eventorganization/lib/eventorganization_conferenceorbooth.lib.php');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("eventorganization@eventorganization", "companies", "other", "mails"));
|
||||
|
||||
@ -66,10 +67,12 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$withproject = GETPOST('withproject', 'int');
|
||||
|
||||
// Initialize technical objects
|
||||
$object = new ConferenceOrBooth($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$projectstatic = new Project($db);
|
||||
$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('conferenceorboothcontact', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
@ -85,7 +88,7 @@ if ($user->socid > 0) {
|
||||
$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||
|
||||
$permission = $user->rights->eventorganization->conferenceorbooth->write;
|
||||
$permission = $user->rights->eventorganization->write;
|
||||
|
||||
|
||||
/*
|
||||
@ -98,7 +101,7 @@ if ($action == 'addcontact' && $permission) { // Add a new contact
|
||||
$result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
|
||||
|
||||
if ($result >= 0) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id.(!empty($withproject)?'&withproject=1':''));
|
||||
exit;
|
||||
} else {
|
||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
@ -116,7 +119,7 @@ if ($action == 'addcontact' && $permission) { // Add a new contact
|
||||
$result = $object->delete_contact($lineid);
|
||||
|
||||
if ($result >= 0) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id.(!empty($withproject)?'&withproject=1':''));
|
||||
exit;
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
@ -144,9 +147,21 @@ $userstatic = new User($db);
|
||||
/* View and edit mode */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
|
||||
$result = $projectstatic->fetch($object->fk_project);
|
||||
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) {
|
||||
$projectstatic->fetchComments();
|
||||
}
|
||||
if (!empty($projectstatic->socid)) {
|
||||
$projectstatic->fetch_thirdparty();
|
||||
}
|
||||
$withProjectUrl='';
|
||||
$object->project = clone $projectstatic;
|
||||
|
||||
if (!empty($withproject)) {
|
||||
// Tabs for project
|
||||
$tab = 'eventorganisation';
|
||||
$withProjectUrl="&withproject=1";
|
||||
$head = project_prepare_head($projectstatic);
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
||||
|
||||
@ -204,7 +219,7 @@ if (!empty($withproject)) {
|
||||
print '<br>';
|
||||
}
|
||||
if (!empty($conf->eventorganization->enabled)) {
|
||||
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
|
||||
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
|
||||
}
|
||||
@ -265,6 +280,38 @@ if (!empty($withproject)) {
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '<tr><td>';
|
||||
$typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
$typeofdata = 'checkbox:'.($projectstatic->accept_booth_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('PriceOfRegistration', 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('PriceOfBooth', 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||
print '';
|
||||
print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
@ -282,7 +329,7 @@ if ($object->id) {
|
||||
/*
|
||||
* Show tabs
|
||||
*/
|
||||
$head = conferenceorboothPrepareHead($object);
|
||||
$head = conferenceorboothPrepareHead($object, $withproject);
|
||||
|
||||
print dol_get_fiche_head($head, 'contact', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
|
||||
|
||||
|
||||
@ -110,7 +110,12 @@ if ($reshook < 0) {
|
||||
if (empty($reshook)) {
|
||||
$error = 0;
|
||||
|
||||
$backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1);
|
||||
if (!empty($withproject)) {
|
||||
$backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php?withproject=1', 1);
|
||||
} else {
|
||||
$backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1);
|
||||
}
|
||||
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
@ -492,7 +497,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1&conforboothid='.$confOrBooth->id .'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1&conforboothid='.$confOrBooth->id .$withProjectUrl.'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
/*
|
||||
|
||||
@ -604,7 +604,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($confOrBooth->id)?'?conforboothid='.$confOrBooth->id:'').$withProjectUrl, '', $permissiontoadd);
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].(!empty($confOrBooth->id)?'?conforboothid='.$confOrBooth->id:'').$withProjectUrl), '', $permissiontoadd);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
@ -776,7 +776,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if ($key == 'status') {
|
||||
print $object->getLibStatut(5);
|
||||
} elseif ($key == 'ref') {
|
||||
print $object->getNomUrl(1, 'conforboothid');
|
||||
print $object->getNomUrl(1, (!empty($withproject)?'conforboothidproject':'conforboothid'));
|
||||
} else {
|
||||
print $object->showOutputField($val, $key, $object->$key, '');
|
||||
}
|
||||
|
||||
@ -47,10 +47,10 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
//$head[$h][0] = dol_buildpath("/eventorganization/conferenceorbooth_contact.php", 1).'?conforboothid='.$object->id.$withProjectUrl;
|
||||
//$head[$h][1] = $langs->trans("Contact/Adress");
|
||||
//$head[$h][2] = 'attendees';
|
||||
//$h++;
|
||||
$head[$h][0] = dol_buildpath("/eventorganization/conferenceorbooth_contact.php", 1).'?id='.$object->id.$withProjectUrl;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = dol_buildpath("/eventorganization/conferenceorboothattendee_list.php", 1).'?conforboothid='.$object->id.$withProjectUrl;
|
||||
$head[$h][1] = $langs->trans("Attendees");
|
||||
|
||||
@ -121,7 +121,10 @@ elseif ($action == 'setaddress' && $user->rights->expedition->creer)
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:expeditions_Clients|ES:Pedidos de clientes');
|
||||
|
||||
$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen';
|
||||
|
||||
llxHeader('', $langs->trans('Order'), $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
@ -1042,7 +1042,7 @@ if ($resql) {
|
||||
}
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month_lim" value="'.$month_lim.'">';
|
||||
$formother->select_year($year_lim ? $year_lim : -1, 'year_lim', 1, 20, 5);
|
||||
print '<br><input type="checkbox" name="option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Late");
|
||||
print '<br><input type="checkbox" class="paddingright paddingleft" name="option" id="option" value="late"'.($option == 'late' ? ' checked' : '').'><label for="option">'.$langs->trans("Late").'</label>';
|
||||
print '</td>';
|
||||
}
|
||||
// Project
|
||||
@ -1541,7 +1541,7 @@ if ($resql) {
|
||||
|
||||
// Amount HT
|
||||
if (!empty($arrayfields['f.total_ht']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->total_ht)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->total_ht)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1552,7 +1552,7 @@ if ($resql) {
|
||||
}
|
||||
// Amount VAT
|
||||
if (!empty($arrayfields['f.total_vat']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->total_vat)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->total_vat)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1563,7 +1563,7 @@ if ($resql) {
|
||||
}
|
||||
// Amount LocalTax1
|
||||
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->total_localtax1)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->total_localtax1)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1574,7 +1574,7 @@ if ($resql) {
|
||||
}
|
||||
// Amount LocalTax2
|
||||
if (!empty($arrayfields['f.total_localtax2']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->total_localtax2)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->total_localtax2)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1585,7 +1585,7 @@ if ($resql) {
|
||||
}
|
||||
// Amount TTC
|
||||
if (!empty($arrayfields['f.total_ttc']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->total_ttc)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->total_ttc)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1612,7 +1612,7 @@ if ($resql) {
|
||||
}
|
||||
|
||||
if (!empty($arrayfields['dynamount_payed']['checked'])) {
|
||||
print '<td class="right nowrap">'.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').'</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right nowrap"><span class="amount">'.(!empty($totalpay) ?price($totalpay, 0, $langs) : '').'</span></td>'; // TODO Use a denormalized field
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1652,27 +1652,27 @@ if ($resql) {
|
||||
}
|
||||
// Amount HT
|
||||
if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->multicurrency_total_ht)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ht)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Amount VAT
|
||||
if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->multicurrency_total_vat)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_vat)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Amount TTC
|
||||
if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) {
|
||||
print '<td class="right nowrap">'.price($obj->multicurrency_total_ttc)."</td>\n";
|
||||
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ttc)."</span></td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) {
|
||||
print '<td class="right nowrap">'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').'</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right nowrap"><span class="amount">'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : '').'</span></td>'; // TODO Use a denormalized field
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1680,9 +1680,9 @@ if ($resql) {
|
||||
|
||||
// Pending amount
|
||||
if (!empty($arrayfields['multicurrency_rtp']['checked'])) {
|
||||
print '<td class="right nowrap">';
|
||||
print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : ' ');
|
||||
print '</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right nowrap"><span class="amount">';
|
||||
print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : '');
|
||||
print '</span></td>'; // TODO Use a denormalized field
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1695,6 +1695,7 @@ if ($resql) {
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Date creation
|
||||
if (!empty($arrayfields['f.datec']['checked'])) {
|
||||
print '<td class="center nowrap">';
|
||||
|
||||
@ -34,28 +34,9 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
// doesn't work :-(
|
||||
// restrictedArea($user, 'fournisseur');
|
||||
|
||||
// doesn't work :-(
|
||||
// require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
// $object = new PaiementFourn($db);
|
||||
// restrictedArea($user, $object->element);
|
||||
|
||||
if (!$user->rights->fournisseur->facture->lire) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'bills', 'banks', 'compta'));
|
||||
|
||||
@ -120,9 +101,28 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
$hookmanager->initHooks(array('paymentsupplierlist'));
|
||||
$object = new PaiementFourn($db);
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
// doesn't work :-(
|
||||
// restrictedArea($user, 'fournisseur');
|
||||
// doesn't work :-(
|
||||
// require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
// $object = new PaiementFourn($db);
|
||||
// restrictedArea($user, $object->element);
|
||||
if (empty($conf->fournisseur->enabled)) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->rights->fournisseur->facture->lire) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters = array('socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -520,7 +520,7 @@ while ($i < min($num, $limit)) {
|
||||
|
||||
// Amount
|
||||
if (!empty($arrayfields['p.amount']['checked'])) {
|
||||
print '<td class="right">'.price($objp->pamount).'</td>';
|
||||
print '<td class="right"><span class="amount">'.price($objp->pamount).'</span></td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -47,6 +47,22 @@
|
||||
-- 7 United Kingdom (NOT England)
|
||||
--
|
||||
|
||||
-- CONTENT -------------------------------------------------------------------
|
||||
--
|
||||
-- Algeria -> for Departmements
|
||||
-- Andorra -> for Departmements
|
||||
-- Angola -> for Departmements
|
||||
-- Argentina
|
||||
-- Australia -> for Departmements
|
||||
-- Austria -> for Departmements
|
||||
-- Barbados -> for Departmements
|
||||
-- Belgium
|
||||
-- Bolivia
|
||||
-- Brazil -> for Departmements
|
||||
-- Canada -> for Departmements
|
||||
-- Colombie -> for Departmements
|
||||
|
||||
|
||||
|
||||
-- TEMPLATE ----------------------------------------------------------------------------------------
|
||||
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 0, 0, '0',0,'-');
|
||||
@ -56,6 +72,14 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 0
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 13, 1301, '', 0, 'Algerie');
|
||||
|
||||
|
||||
-- Andorra Regions (id country=18)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 34, 34000, 'AD', NULL, 'Andorra');
|
||||
|
||||
|
||||
-- Angola Regions (id country=35)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 35, 35001, 'AO', NULL, 'Angola');
|
||||
|
||||
|
||||
-- Argentina Regions (id country=23)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2301, '', 0, 'Norte');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2302, '', 0, 'Litoral');
|
||||
@ -73,7 +97,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4
|
||||
|
||||
|
||||
-- Barbados Regions (id country=46)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 46, 4601, '', 0, 'Barbados');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 46, 4601, '', 0, 'Barbados');
|
||||
|
||||
|
||||
-- Belgium Regions (id country=2)
|
||||
@ -82,6 +106,18 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2
|
||||
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2, 203, '',3,'Bruxelles-Capitale');
|
||||
|
||||
|
||||
-- Bolivia Regions (id country=52)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5201, '', 0, 'Chuquisaca');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5202, '', 0, 'La Paz');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5203, '', 0, 'Cochabamba');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5204, '', 0, 'Oruro');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5205, '', 0, 'Potosí');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5206, '', 0, 'Tarija');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5207, '', 0, 'Santa Cruz');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5208, '', 0, 'El Beni');
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5209, '', 0, 'Pando');
|
||||
|
||||
|
||||
-- Brazil Regions (id country=56)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 56, 5601, '', 0, 'Brasil');
|
||||
|
||||
@ -90,6 +126,10 @@ 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');
|
||||
|
||||
|
||||
-- Colombie Regions (id country=70)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 70, 7001, '', 0, 'Colombie');
|
||||
|
||||
|
||||
-- Regions France (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, 2,'97209',3,'Martinique');
|
||||
@ -217,21 +257,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);
|
||||
|
||||
|
||||
-- Regions Bolivia (id country=52)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5201, '', 0, 'Chuquisaca', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5202, '', 0, 'La Paz', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5203, '', 0, 'Cochabamba', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5204, '', 0, 'Oruro', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5205, '', 0, 'Potosí', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1);
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1);
|
||||
|
||||
|
||||
-- Regions Colombie (id country=70)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 70, 7001, '', 0, 'Colombie', 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);
|
||||
@ -352,8 +377,6 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
|
||||
-- Regions United Arab Emirates (rowid country=227)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 227, 22701, '', 0, 'United Arab Emirates', 1);
|
||||
|
||||
-- Regions Andorra (rowid country=18)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (34, 34000, 'AD', NULL, 'Andorra');
|
||||
|
||||
-- Regions Hungary (rowid country=18)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (18, 183100, 'HU31', NULL, 'Northern Hungary');
|
||||
@ -408,8 +431,6 @@ insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 932
|
||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 933, '港',0,'香港特别行政区');
|
||||
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 934, '澳',0,'澳门特别行政区');
|
||||
|
||||
-- Regions Angola (rowid country=35)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (35, 35001, 'AO', NULL, 'Angola');
|
||||
|
||||
-- Regions Taiwan (rowid country=213)
|
||||
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (213, 21301, 'TW', NULL, 'Taiwan');
|
||||
|
||||
@ -32,11 +32,12 @@
|
||||
-- Do not concatenate the values in a single query, for the same reason.
|
||||
|
||||
|
||||
-- NOTES -----------------------------------------------------------------------
|
||||
-- NOTES/CONTENT ---------------------------------------------------------------
|
||||
-- Departements/Cantons/Provinces/States
|
||||
--
|
||||
-- Algeria
|
||||
-- Andorra
|
||||
-- Angola
|
||||
-- Argentina
|
||||
-- Australia
|
||||
-- Austria
|
||||
@ -44,6 +45,7 @@
|
||||
-- Belgium
|
||||
-- Brazil
|
||||
-- Canada
|
||||
-- Colombia
|
||||
-- France
|
||||
-- Germany
|
||||
|
||||
@ -113,6 +115,27 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-008', 'AD700', NULL, NULL, 'Escaldes-Engordany');
|
||||
|
||||
|
||||
-- Angola Provinces (postal districts) (id country=35)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-ABO', NULL, NULL, 'BENGO', 'Bengo');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-BGU', NULL, NULL, 'BENGUELA', 'Benguela');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-BIE', NULL, NULL, 'BIÉ', 'Bié');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CAB', NULL, NULL, 'CABINDA', 'Cabinda');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CCU', NULL, NULL, 'KUANDO KUBANGO', 'Kuando Kubango');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CNO', NULL, NULL, 'KWANZA NORTE', 'Kwanza Norte');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CUS', NULL, NULL, 'KWANZA SUL', 'Kwanza Sul');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CNN', NULL, NULL, 'CUNENE', 'Cunene');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-HUA', NULL, NULL, 'HUAMBO', 'Huambo');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-HUI', NULL, NULL, 'HUÍLA', 'Huila');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LUA', NULL, NULL, 'LUANDA', 'Luanda');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LNO', NULL, NULL, 'LUNDA-NORTE', 'Lunda-Norte');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LSU',NULL, NULL, 'LUNDA-SUL', 'Lunda-Sul');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-MAL', NULL, NULL, 'MALANGE', 'Malange');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-MOX', NULL, NULL, 'MOXICO', 'Moxico');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre');
|
||||
|
||||
|
||||
-- Argentina Provinces / provincias (id country=23)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2301', '', 0, 'CATAMARCA', 'Catamarca');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2302', '', 0, 'JUJUY', 'Jujuy');
|
||||
@ -236,6 +259,42 @@ insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
|
||||
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401,'NL','',1,'','Newfoundland and Labrador');
|
||||
|
||||
|
||||
-- Colombia Departamentos (id country=70)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'ANT', '', 0, 'ANT', 'Antioquia');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'BOL', '', 0, 'BOL', 'Bolívar');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'BOY', '', 0, 'BOY', 'Boyacá');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAL', '', 0, 'CAL', 'Caldas');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAU', '', 0, 'CAU', 'Cauca');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CUN', '', 0, 'CUN', 'Cundinamarca');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'HUI', '', 0, 'HUI', 'Huila');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'LAG', '', 0, 'LAG', 'La Guajira');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'MET', '', 0, 'MET', 'Meta');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'NAR', '', 0, 'NAR', 'Nariño');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'NDS', '', 0, 'NDS', 'Norte de Santander');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'SAN', '', 0, 'SAN', 'Santander');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'SUC', '', 0, 'SUC', 'Sucre');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'TOL', '', 0, 'TOL', 'Tolima');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'VAC', '', 0, 'VAC', 'Valle del Cauca');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'RIS', '', 0, 'RIS', 'Risalda');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'ATL', '', 0, 'ATL', 'Atlántico');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'COR', '', 0, 'COR', 'Córdoba');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'SAP', '', 0, 'SAP', 'San Andrés, Providencia y Santa Catalina');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'ARA', '', 0, 'ARA', 'Arauca');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAS', '', 0, 'CAS', 'Casanare');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'AMA', '', 0, 'AMA', 'Amazonas');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAQ', '', 0, 'CAQ', 'Caquetá');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CHO', '', 0, 'CHO', 'Chocó');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'GUA', '', 0, 'GUA', 'Guainía');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'GUV', '', 0, 'GUV', 'Guaviare');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'PUT', '', 0, 'PUT', 'Putumayo');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'QUI', '', 0, 'QUI', 'Quindío');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'VAU', '', 0, 'VAU', 'Vaupés');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'BOG', '', 0, 'BOG', 'Bogotá');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'VID', '', 0, 'VID', 'Vichada');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CES', '', 0, 'CES', 'Cesar');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'MAG', '', 0, 'MAG', 'Magdalena');
|
||||
|
||||
|
||||
-- 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 ( 2,'972','97209',3,'MARTINIQUE','Martinique');
|
||||
@ -1220,41 +1279,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);
|
||||
|
||||
|
||||
-- Provinces Colombia (id country=70)
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ANT', 7001, '', 0, 'ANT', 'Antioquia', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BOL', 7001, '', 0, 'BOL', 'Bolívar', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BOY', 7001, '', 0, 'BOY', 'Boyacá', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAL', 7001, '', 0, 'CAL', 'Caldas', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAU', 7001, '', 0, 'CAU', 'Cauca', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CUN', 7001, '', 0, 'CUN', 'Cundinamarca', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('HUI', 7001, '', 0, 'HUI', 'Huila', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LAG', 7001, '', 0, 'LAG', 'La Guajira', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MET', 7001, '', 0, 'MET', 'Meta', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('NAR', 7001, '', 0, 'NAR', 'Nariño', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('NDS', 7001, '', 0, 'NDS', 'Norte de Santander', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SAN', 7001, '', 0, 'SAN', 'Santander', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SUC', 7001, '', 0, 'SUC', 'Sucre', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TOL', 7001, '', 0, 'TOL', 'Tolima', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VAC', 7001, '', 0, 'VAC', 'Valle del Cauca', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RIS', 7001, '', 0, 'RIS', 'Risalda', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ATL', 7001, '', 0, 'ATL', 'Atlántico', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('COR', 7001, '', 0, 'COR', 'Córdoba', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SAP', 7001, '', 0, 'SAP', 'San Andrés, Providencia y Santa Catalina', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ARA', 7001, '', 0, 'ARA', 'Arauca', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAS', 7001, '', 0, 'CAS', 'Casanare', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AMA', 7001, '', 0, 'AMA', 'Amazonas', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAQ', 7001, '', 0, 'CAQ', 'Caquetá', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CHO', 7001, '', 0, 'CHO', 'Chocó', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GUA', 7001, '', 0, 'GUA', 'Guainía', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GUV', 7001, '', 0, 'GUV', 'Guaviare', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PUT', 7001, '', 0, 'PUT', 'Putumayo', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('QUI', 7001, '', 0, 'QUI', 'Quindío', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VAU', 7001, '', 0, 'VAU', 'Vaupés', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BOG', 7001, '', 0, 'BOG', 'Bogotá', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VID', 7001, '', 0, 'VID', 'Vichada', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CES', 7001, '', 0, 'CES', 'Cesar', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MAG', 7001, '', 0, 'MAG', 'Magdalena', 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);
|
||||
@ -1638,25 +1662,6 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI043', NULL, NULL, 'GORIZIA', 'Gorizia');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI044', NULL, NULL, 'COASTAL–KARST', 'Coastal–Karst');
|
||||
|
||||
-- Provinces (postal districts) Angola (rowid country=35)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ABO', NULL, NULL, 'BENGO', 'Bengo');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-BGU', NULL, NULL, 'BENGUELA', 'Benguela');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-BIE', NULL, NULL, 'BIÉ', 'Bié');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CAB', NULL, NULL, 'CABINDA', 'Cabinda');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CCU', NULL, NULL, 'KUANDO KUBANGO', 'Kuando Kubango');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CNO', NULL, NULL, 'KWANZA NORTE', 'Kwanza Norte');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CUS', NULL, NULL, 'KWANZA SUL', 'Kwanza Sul');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CNN', NULL, NULL, 'CUNENE', 'Cunene');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-HUA', NULL, NULL, 'HUAMBO', 'Huambo');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-HUI', NULL, NULL, 'HUÍLA', 'Huila');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LUA', NULL, NULL, 'LUANDA', 'Luanda');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LNO', NULL, NULL, 'LUNDA-NORTE', 'Lunda-Norte');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LSU',NULL, NULL, 'LUNDA-SUL', 'Lunda-Sul');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-MAL', NULL, NULL, 'MALANGE', 'Malange');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-MOX', NULL, NULL, 'MOXICO', 'Moxico');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge');
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre');
|
||||
|
||||
-- Provinces Taiwan (rowid country=886)
|
||||
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KLU', 'KLU', NULL, '基隆市');
|
||||
|
||||
@ -93,9 +93,12 @@ INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, m
|
||||
INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
||||
|
||||
-- Supplier proposal
|
||||
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1);
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||
|
||||
-- Event Organization
|
||||
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 (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
||||
|
||||
@ -362,3 +362,8 @@ UPDATE llx_propal SET date_signature = date_cloture WHERE date_signature IS NULL
|
||||
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_EXCLUDE','Member excluded','Executed when a member is excluded','member',27);
|
||||
|
||||
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 (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);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
-- Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
-- Copyright (C) 2020-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- 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
|
||||
@ -12,20 +13,22 @@
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
--
|
||||
--
|
||||
-- Table with the categories of a ticket
|
||||
--
|
||||
|
||||
create table llx_c_ticket_category
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
code varchar(32) NOT NULL, -- Example: TIGRP-COMMERCIAL, TIGRP-TECHNICALISSUE, ...
|
||||
label varchar(128) NOT NULL,
|
||||
pos integer DEFAULT 0 NOT NULL,
|
||||
public integer DEFAULT 0,
|
||||
use_default integer DEFAULT 1,
|
||||
active integer DEFAULT 1,
|
||||
fk_parent integer DEFAULT 0 NOT NULL, -- Parent group
|
||||
force_severity varchar(32) NULL, -- To force the severity if we choosed this category
|
||||
description varchar(255)
|
||||
description varchar(255), -- A long description of ticket
|
||||
pos integer DEFAULT 0 NOT NULL,
|
||||
active integer DEFAULT 1
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -51,7 +51,7 @@ create table llx_product
|
||||
recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT
|
||||
localtax1_tx double(6,3) DEFAULT 0,
|
||||
localtax1_type varchar(10) NOT NULL DEFAULT '0',
|
||||
localtax2_tx double(6,3) DEFAULT 0,
|
||||
localtax2_tx double(6,3) DEFAULT 0,
|
||||
localtax2_type varchar(10) NOT NULL DEFAULT '0',
|
||||
fk_user_author integer DEFAULT NULL, -- user making creation
|
||||
fk_user_modif integer, -- user making last change
|
||||
@ -59,6 +59,7 @@ create table llx_product
|
||||
tobuy tinyint DEFAULT 1, -- Product you buy
|
||||
onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on)
|
||||
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management)
|
||||
batch_mask varchar(32), -- If the product has batch feature, you may want to use a batch mask per product
|
||||
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
|
||||
duration varchar(6),
|
||||
seuil_stock_alerte float DEFAULT NULL,
|
||||
|
||||
1
htdocs/modulebuilder/admin/index.html
Normal file
1
htdocs/modulebuilder/admin/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
1
htdocs/modulebuilder/template/index.html
Normal file
1
htdocs/modulebuilder/template/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -111,22 +111,32 @@ class Project extends CommonObject
|
||||
public $budget_amount;
|
||||
|
||||
/**
|
||||
* @var boolean Use to bill task spend time
|
||||
* @var integer Can use projects to follow opportunities
|
||||
*/
|
||||
public $usage_opportunity;
|
||||
|
||||
/**
|
||||
* @var integer Can follow tasks on project and enter time spent on it
|
||||
*/
|
||||
public $usage_task;
|
||||
|
||||
/**
|
||||
* @var integer Use to bill task spend time
|
||||
*/
|
||||
public $usage_bill_time; // Is the time spent on project must be invoiced or not
|
||||
|
||||
/**
|
||||
* @var boolean Event organization: Use Event Organization
|
||||
*/
|
||||
* @var integer Event organization: Use Event Organization
|
||||
*/
|
||||
public $usage_organize_event;
|
||||
|
||||
/**
|
||||
* @var boolean Event organization: Allow unknown people to suggest conferences
|
||||
* @var integer Event organization: Allow unknown people to suggest new conferences
|
||||
*/
|
||||
public $accept_conference_suggestions;
|
||||
|
||||
/**
|
||||
* @var boolean Event organization: Allow unknown people to suggest booth
|
||||
* @var integer Event organization: Allow unknown people to suggest new booth
|
||||
*/
|
||||
public $accept_booth_suggestions;
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ if (!empty($conf->projet->enabled)) {
|
||||
}
|
||||
|
||||
$id = GETPOSTINT('id');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$accountid = GETPOST('accountid', 'int') > 0 ? GETPOST('accountid', 'int') : 0;
|
||||
@ -63,13 +64,6 @@ $dateep = dol_mktime(12, 0, 0, GETPOST("dateepmonth", 'int'), GETPOST("dateepday
|
||||
$label = GETPOST('label', 'alphanohtml');
|
||||
$fk_user = GETPOSTINT('userid');
|
||||
|
||||
// Security check
|
||||
$socid = GETPOSTINT('socid');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'salaries', '', '', '');
|
||||
|
||||
$object = new Salary($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
@ -79,6 +73,18 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('salarycard', 'globalcard'));
|
||||
|
||||
$object = new Salary($db);
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOSTINT('socid');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
restrictedArea($user, 'salaries', $object->id, 'salary', '');
|
||||
|
||||
|
||||
/**
|
||||
* Actions
|
||||
@ -885,21 +891,22 @@ if ($id) {
|
||||
/*
|
||||
* Action bar
|
||||
*/
|
||||
|
||||
print '<div class="tabsAction">'."\n";
|
||||
if ($action != 'edit') {
|
||||
// Reopen
|
||||
if ($object->paye && $user->rights->salaries->write) {
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".dol_buildpath("/salaries/card.php", 1)."?id=$object->id&action=reopen\">".$langs->trans("ReOpen")."</a></div>";
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".dol_buildpath("/salaries/card.php", 1)."?id=".$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("ReOpen")."</a></div>";
|
||||
}
|
||||
|
||||
// Edit
|
||||
if ($object->paye == 0 && $user->rights->salaries->write) {
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=$object->id&action=edit\">".$langs->trans("Modify")."</a></div>";
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=".$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>";
|
||||
}
|
||||
|
||||
// Emit payment
|
||||
if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->salaries->write) {
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/paiement_salary.php?id=$object->id&action=create\">".$langs->trans("DoPayment")."</a></div>";
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/paiement_salary.php?id=".$object->id.'&action=create&token='.newToken().'">'.$langs->trans("DoPayment")."</a></div>";
|
||||
}
|
||||
|
||||
// Classify 'paid'
|
||||
@ -909,16 +916,16 @@ if ($id) {
|
||||
|| (round($resteapayer) >= 0 && $object->amount < 0)
|
||||
)
|
||||
&& $user->rights->salaries->write) {
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=$object->id&action=paid\">".$langs->trans("ClassifyPaid")."</a></div>";
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=".$object->id.'&action=paid&token='.newToken().'">'.$langs->trans("ClassifyPaid")."</a></div>";
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($user->rights->salaries->write) {
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".dol_buildpath("/salaries/card.php", 1)."?id=$object->id&action=clone\">".$langs->trans("ToClone")."</a></div>";
|
||||
print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=".$object->id.'&action=clone&token='.newToken().'">'.$langs->trans("ToClone")."</a></div>";
|
||||
}
|
||||
|
||||
if (!empty($user->rights->salaries->delete) && empty($totalpaye)) {
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete">'.$langs->trans("Delete").'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a></div>';
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans("DisabledBecausePayments"))).'">'.$langs->trans("Delete").'</a></div>';
|
||||
}
|
||||
|
||||
@ -44,14 +44,6 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", "int");
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'salaries', '', '', '');
|
||||
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
@ -70,13 +62,21 @@ if (!$sortfield) {
|
||||
$sortfield = "name";
|
||||
}
|
||||
|
||||
|
||||
$object = new Salary($db);
|
||||
$object->fetch($id, $ref);
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
}
|
||||
|
||||
$upload_dir = $conf->salaries->dir_output.'/'.dol_sanitizeFileName($object->id);
|
||||
$modulepart = 'salaries';
|
||||
|
||||
// Security check
|
||||
$socid = GETPOSTINT('socid');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
restrictedArea($user, 'salaries', $object->id, 'salary', '');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -33,14 +33,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$langs->loadLangs(array("compta", "bills", "users", "salaries", "hrm"));
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$object = new Salary($db);
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'salaries', '', '', '');
|
||||
restrictedArea($user, 'salaries', $object->id, 'salary', '');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -108,13 +108,6 @@ if (!GETPOST('search_type_id', 'int')) {
|
||||
|
||||
$childids = $user->getAllChildIds(1);
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", "int");
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'salaries', '', '', '');
|
||||
|
||||
// Initialize array of search criterias
|
||||
$search_all = GETPOST("search_all", 'alpha');
|
||||
$search = array();
|
||||
@ -161,6 +154,13 @@ $permissiontoread = $user->rights->salaries->read;
|
||||
$permissiontoadd = $user->rights->salaries->write;
|
||||
$permissiontodelete = $user->rights->salaries->delete;
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", "int");
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
restrictedArea($user, 'salaries', '', 'salary', '');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/paiement_charge.php
|
||||
* \ingroup tax
|
||||
* \brief Page to add payment of a tax
|
||||
* \file htdocs/compta/paiement_salary.php
|
||||
* \ingroup salary
|
||||
* \brief Page to add payment of a salary
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -31,16 +31,25 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->load("bills");
|
||||
|
||||
$chid = GETPOST("id", 'int');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$id = GETPOSTINT('id');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$amounts = array();
|
||||
|
||||
$object = new Salary($db);
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = 0;
|
||||
$socid = GETPOST("socid", "int");
|
||||
if ($user->socid > 0) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
restrictedArea($user, 'salaries', $object->id, 'salary', '');
|
||||
|
||||
|
||||
/*
|
||||
@ -51,7 +60,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
|
||||
$error = 0;
|
||||
|
||||
if ($cancel) {
|
||||
$loc = DOL_URL_ROOT.'/salaries/card.php?id='.$chid;
|
||||
$loc = DOL_URL_ROOT.'/salaries/card.php?id='.$id;
|
||||
header("Location: ".$loc);
|
||||
exit;
|
||||
}
|
||||
@ -96,7 +105,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
|
||||
|
||||
// Create a line of payments
|
||||
$paiement = new PaymentSalary($db);
|
||||
$paiement->chid = $chid;
|
||||
$paiement->chid = $id;
|
||||
$paiement->datepaye = $datepaye;
|
||||
$paiement->amounts = $amounts; // Tableau de montant
|
||||
$paiement->paiementtype = GETPOST("paiementtype", 'alphanohtml');
|
||||
@ -124,7 +133,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
$loc = DOL_URL_ROOT.'/salaries/card.php?id='.$chid;
|
||||
$loc = DOL_URL_ROOT.'/salaries/card.php?id='.$id;
|
||||
header('Location: '.$loc);
|
||||
exit;
|
||||
} else {
|
||||
@ -139,15 +148,16 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$help_url = '';
|
||||
|
||||
llxHeader('', '', $help_url);
|
||||
|
||||
$salary = $object;
|
||||
|
||||
// Formulaire de creation d'un paiement de charge
|
||||
if ($action == 'create') {
|
||||
$salary = new Salary($db); // Salary to pay
|
||||
$salary->fetch($chid);
|
||||
$salary->accountid = $salary->fk_account ? $salary->fk_account : $salary->accountid;
|
||||
$salary->paiementtype = $salary->mode_reglement_id ? $salary->mode_reglement_id : $salary->paiementtype;
|
||||
|
||||
@ -171,15 +181,15 @@ if ($action == 'create') {
|
||||
|
||||
print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="id" value="'.$chid.'">';
|
||||
print '<input type="hidden" name="chid" value="'.$chid.'">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '<input type="hidden" name="chid" value="'.$id.'">';
|
||||
print '<input type="hidden" name="action" value="add_payment">';
|
||||
|
||||
print dol_get_fiche_head();
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td><a href="'.DOL_URL_ROOT.'/salaries/card.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td><a href="'.DOL_URL_ROOT.'/salaries/card.php?id='.$id.'">'.$id.'</a></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("DateStart")."</td><td>".dol_print_date($salary->datesp, 'day')."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("DateEnd")."</td><td>".dol_print_date($salary->dateep, 'day')."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$salary->label."</td></tr>\n";
|
||||
@ -188,7 +198,7 @@ if ($action == 'create') {
|
||||
|
||||
$sql = "SELECT sum(p.amount) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql .= " WHERE p.fk_salary = ".((int) $chid);
|
||||
$sql .= " WHERE p.fk_salary = ".((int) $id);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
@ -41,14 +41,13 @@ $id = GETPOST("id", 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm');
|
||||
if ($user->socid) $socid = $user->socid;
|
||||
// TODO ajouter regle pour restreindre acces paiement
|
||||
//$result = restrictedArea($user, 'facture', $id,'');
|
||||
|
||||
$object = new PaymentSalary($db);
|
||||
if ($id > 0) {
|
||||
$result = $object->fetch($id);
|
||||
if (!$result) dol_print_error($db, 'Failed to get payment id '.$id);
|
||||
}
|
||||
restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -97,11 +97,6 @@ if (!GETPOST('search_type_id', 'int')) {
|
||||
|
||||
$childids = $user->getAllChildIds(1);
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", "int");
|
||||
if ($user->socid) $socid = $user->socid;
|
||||
$result = restrictedArea($user, 'salaries', '', '', '');
|
||||
|
||||
// Initialize array of search criterias
|
||||
$search_all = GETPOST("search_all", 'alpha');
|
||||
$search = array();
|
||||
@ -119,6 +114,13 @@ $permissiontoread = $user->rights->salaries->read;
|
||||
$permissiontoadd = $user->rights->salaries->write;
|
||||
$permissiontodelete = $user->rights->salaries->delete;
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid", "int");
|
||||
if ($user->socid > 0) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
restrictedArea($user, 'salaries', 0, 'salary', '');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -516,7 +518,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
}
|
||||
|
||||
// Amount
|
||||
print '<td class="nowrap right">'.price($obj->amount).'</td>';
|
||||
print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
||||
$totalarray['val']['totalttcfield'] += $obj->amount;
|
||||
|
||||
@ -125,7 +125,7 @@ $form = new Form($db);
|
||||
if ($object->id > 0) {
|
||||
$title = $langs->trans("Agenda");
|
||||
//if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = '';
|
||||
$help_url = 'EN:Module_Workstation';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (!empty($conf->notification->enabled)) {
|
||||
|
||||
@ -97,8 +97,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("Workstation").' - '.$langs->trans("Files");
|
||||
$help_url = '';
|
||||
//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
|
||||
$help_url = 'EN:Module_Workstation';
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if ($object->id) {
|
||||
|
||||
@ -213,10 +213,13 @@ $formresource = new FormResource($db);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
//$help_url="EN:Module_Workstation|FR:Module_Workstation_FR|ES:Módulo_Workstation";
|
||||
$help_url = '';
|
||||
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Workstations"));
|
||||
|
||||
//$help_url="EN:Module_Workstation|FR:Module_Workstation_FR|ES:Módulo_Workstation";
|
||||
$help_url = 'EN:Module_Workstation';
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
|
||||
// Build and execute select
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@ -75,8 +75,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes';
|
||||
$help_url = '';
|
||||
$help_url = 'EN:Module_Workstation';
|
||||
|
||||
llxHeader('', $langs->trans('Workstation'), $help_url);
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
|
||||
1
scripts/index.html
Normal file
1
scripts/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -152,4 +152,20 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* testDolImageResizeOrCrop
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function testDolImageResizeOrCrop()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$file=dirname(__FILE__).'/img250x20.png';
|
||||
$filetarget=$conf->admin->dir_temp.'/img250x20.webp';
|
||||
$result = dol_imageResizeOrCrop($file, 0, 0, 0, 0, 0, $filetarget);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals($filetarget, $result, 'Failed to convert into webp');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user