Merge remote-tracking branch 'upstream/develop' into 10.0_closure2

This commit is contained in:
Alexandre SPANGARO 2019-05-05 22:43:02 +02:00
commit 4baffae297
18 changed files with 194 additions and 76 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
@ -111,6 +111,8 @@ if ($action == 'update') {
$accounting_product_modes = array ( $accounting_product_modes = array (
'ACCOUNTANCY_SELL', 'ACCOUNTANCY_SELL',
'ACCOUNTANCY_SELL_INTRA',
'ACCOUNTANCY_SELL_EXPORT',
'ACCOUNTANCY_BUY' 'ACCOUNTANCY_BUY'
); );
@ -158,6 +160,12 @@ if ($action == 'update') {
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
$sql .= " SET accountancy_code_sell = " . $accounting->account_number; $sql .= " SET accountancy_code_sell = " . $accounting->account_number;
} }
if ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$sql .= " SET accountancy_code_sell_intra = " . $accounting->account_number;
}
if ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$sql .= " SET accountancy_code_sell_export = " . $accounting->account_number;
}
$sql .= " WHERE rowid = " . $productid; $sql .= " WHERE rowid = " . $productid;
dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG); dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG);
@ -192,16 +200,20 @@ $form = new FormAccounting($db);
// at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid // at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid
// so we need to get those default value rowid first // so we need to get those default value rowid first
$accounting = new AccountingAccount($db); $accounting = new AccountingAccount($db);
// TODO: we should need to check if result is a really exist accountaccount rowid..... // TODO: we should need to check if result is already exists accountaccount rowid.....
$aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); $aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1);
$aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); $aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1);
$aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); $aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1);
$aarowid_prodsell = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1); $aarowid_prodsell = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1);
$aarowid_prodsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT, 1);
$aarowid_prodsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT, 1);
$aacompta_servbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_servbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$aacompta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$aacompta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$aacompta_prodsell_intra = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$aacompta_prodsell_export = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
llxHeader('', $langs->trans("ProductsBinding")); llxHeader('', $langs->trans("ProductsBinding"));
@ -209,27 +221,45 @@ $pcgverid = $conf->global->CHARTOFACCOUNTS;
$pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version');
if (empty($pcgvercode)) $pcgvercode=$pcgverid; if (empty($pcgvercode)) $pcgvercode=$pcgverid;
$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy, p.accountancy_code_sell, p.accountancy_code_buy, p.tms, p.fk_product_type as product_type,"; $sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.tms, p.fk_product_type as product_type,";
$sql.= " aa.rowid as aaid"; $sql.= " aa.rowid as aaid";
$sql.= " FROM " . MAIN_DB_PREFIX . "product as p"; $sql.= " FROM " . MAIN_DB_PREFIX . "product as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON";
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$sql.=" p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; $sql.=" p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'";
} }
else elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL')
{ {
$sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; $sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'";
} }
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA')
{
$sql.=" p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'";
}
else
{
$sql.=" p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'";
}
$sql.= ' WHERE p.entity IN ('.getEntity('product').')'; $sql.= ' WHERE p.entity IN ('.getEntity('product').')';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
if (strlen(trim($search_current_account))) { if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_buy", $search_current_account); $sql .= natural_search("p.accountancy_code_buy", $search_current_account);
} }
} else { } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
if (strlen(trim($search_current_account))) { if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell", $search_current_account); $sql .= natural_search("p.accountancy_code_sell", $search_current_account);
} }
} }
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell_intra", $search_current_account);
}
}
else {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell_export", $search_current_account);
}
}
if ($search_current_account_valid == 'withoutvalidaccount') if ($search_current_account_valid == 'withoutvalidaccount')
{ {
$sql .= " AND aa.account_number IS NULL"; $sql .= " AND aa.account_number IS NULL";
@ -301,8 +331,17 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans('Options') . '</td><td>' . $langs->trans('Description') . '</td>'; print '<td>' . $langs->trans('Options') . '</td><td>' . $langs->trans('Description') . '</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL"' . ($accounting_product_mode != 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductSell') . '</td>'; print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL"' . ($accounting_product_mode == 'ACCOUNTANCY_SELL' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductSell') . '</td>';
print '<td>'.$langs->trans('OptionModeProductSellDesc'); print '<td>'.$langs->trans('OptionModeProductSellDesc');
print "</td></tr>\n";
if ($mysoc->isInEEC())
{
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_INTRA"' . ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductSellIntra') . '</td>';
print '<td>'.$langs->trans('OptionModeProductSellIntraDesc');
print "</td></tr>\n";
}
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_EXPORT"' . ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductSellExport') . '</td>';
print '<td>'.$langs->trans('OptionModeProductSellExportDesc');
print "</td></tr>\n"; print "</td></tr>\n";
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"' . ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductBuy') . '</td>'; print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"' . ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductBuy') . '</td>';
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n"; print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
@ -332,7 +371,7 @@ if ($result)
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>'; print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>'; if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
// On sell // On sell
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print '<td class="liste_titre"></td>'; if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') print '<td class="liste_titre"></td>';
// On buy // On buy
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print '<td class="liste_titre"></td>'; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print '<td class="liste_titre"></td>';
// Current account // Current account
@ -352,10 +391,19 @@ if ($result)
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount="p.accountancy_code_sell";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount="p.accountancy_code_sell_intra";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount="p.accountancy_code_sell_export";
} else {
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center ');
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') $fieldtosortaccount="p.accountancy_code_buy"; $fieldtosortaccount="p.accountancy_code_buy";
else $fieldtosortaccount="p.accountancy_code_sell"; }
print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder); print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("AssignDedicatedAccountingAccount"); print_liste_field_titre("AssignDedicatedAccountingAccount");
$clickpitco=$form->showCheckAddButtons('checkforselect', 1); $clickpitco=$form->showCheckAddButtons('checkforselect', 1);
@ -378,9 +426,15 @@ if ($result)
$product_static->status = $obj->tosell; $product_static->status = $obj->tosell;
$product_static->status_buy = $obj->tobuy; $product_static->status_buy = $obj->tobuy;
if ($obj->product_type == 0) { if ($obj->product_type == 0 && $accounting_product_mode == 'ACCOUNTANCY_SELL') {
$compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell; $compta_prodsell_id = $aarowid_prodsell;
} elseif ($obj->product_type == 0 && $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell_intra;
} elseif ($obj->product_type == 0 && $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell_export;
} else { } else {
$compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_servsell; $compta_prodsell_id = $aarowid_servsell;
@ -411,7 +465,7 @@ if ($result)
print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($obj->description, $trunclengh)) . '</td>'; print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($obj->description, $trunclengh)) . '</td>';
} }
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT')
print '<td class="center">'.$product_static->getLibStatut(3, 0).'</td>'; print '<td class="center">'.$product_static->getLibStatut(3, 0).'</td>';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') if ($accounting_product_mode == 'ACCOUNTANCY_BUY')
@ -422,11 +476,15 @@ if ($result)
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
print length_accountg($obj->accountancy_code_buy); print length_accountg($obj->accountancy_code_buy);
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
else
{
print length_accountg($obj->accountancy_code_sell); print length_accountg($obj->accountancy_code_sell);
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
print length_accountg($obj->accountancy_code_sell_intra);
if ($obj->accountancy_code_sell_intra && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} else {
print length_accountg($obj->accountancy_code_sell_export);
if ($obj->accountancy_code_sell_export && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} }
print '</td>'; print '</td>';
@ -441,7 +499,7 @@ if ($result)
if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1);
print '</td>'; print '</td>';
} else { } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
// Accounting account sell // Accounting account sell
print '<td class="left">'; print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
@ -451,6 +509,25 @@ if ($result)
if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1);
print '</td>'; print '</td>';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
// Accounting account sell intra (In EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue=$compta_prodsell;
$codesell=length_accountg($obj->accountancy_code_sell_intra);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1);
print '</td>';
} else {
// Accounting account sell export (Out of EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue=$compta_prodsell;
$codesell=length_accountg($obj->accountancy_code_sell_export);
if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1);
print '</td>';
} }
// Checkbox select // Checkbox select
@ -462,7 +539,6 @@ if ($result)
print '</table>'; print '</table>';
print '</div>'; print '</div>';
// Example : Adding jquery code
print '<script type="text/javascript" language="javascript"> print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
function init_savebutton() function init_savebutton()

View File

@ -4,7 +4,7 @@
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -239,7 +239,7 @@ if ($resql) {
print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("", "","",'','',"",$sortfield,$sortorder,'maxwidthsearch center '); print_liste_field_titre("", "", "", '', '', "", $sortfield, $sortorder, 'maxwidthsearch center ');
print "</tr>\n"; print "</tr>\n";
$solde = 0; $solde = 0;
@ -262,13 +262,13 @@ if ($resql) {
// Journal // Journal
$accountingjournal = new AccountingJournal($db); $accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$obj->code_journal); $result = $accountingjournal->fetch('', $obj->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $obj->code_journal); $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $obj->code_journal);
print '<td class="center">' . $journaltoshow . '</td>'; print '<td class="center">' . $journaltoshow . '</td>';
if (empty($obj->lettering_code)) { if (empty($obj->lettering_code)) {
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>'; print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">'; print '<td><a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $obj->piece_num . '">';
print img_edit(); print img_edit();
print '</a></td>' . "\n"; print '</a></td>' . "\n";
} else { } else {

View File

@ -4,7 +4,7 @@
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -237,7 +237,7 @@ if ($resql) {
print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("", "","",'','',"",$sortfield,$sortorder,'maxwidthsearch center '); print_liste_field_titre("", "", "", '', '', "", $sortfield, $sortorder, 'maxwidthsearch center ');
print "</tr>\n"; print "</tr>\n";
$solde = 0; $solde = 0;
@ -259,13 +259,13 @@ if ($resql) {
// Journal // Journal
$accountingjournal = new AccountingJournal($db); $accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$obj->code_journal); $result = $accountingjournal->fetch('', $obj->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $obj->code_journal); $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $obj->code_journal);
print '<td class="center">' . $journaltoshow . '</td>'; print '<td class="center">' . $journaltoshow . '</td>';
if (empty($obj->lettering_code)) { if (empty($obj->lettering_code)) {
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>'; print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">'; print '<td><a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $obj->piece_num . '">';
print img_edit(); print img_edit();
print '</a></td>' . "\n"; print '</a></td>' . "\n";
} else { } else {

View File

@ -1939,7 +1939,7 @@ class Contrat extends CommonObject
if ($user->rights->contrat->lire) { if ($user->rights->contrat->lire) {
$label = '<u>'.$langs->trans("ShowContract").'</u>'; $label = '<u>'.$langs->trans("ShowContract").'</u>';
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; $label .= '<br><b>'.$langs->trans('Ref').':</b> '.($this->ref?$this->ref:$this->id);
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client); $label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
$label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_supplier; $label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_supplier;
if (!empty($this->total_ht)) { if (!empty($this->total_ht)) {
@ -1971,7 +1971,7 @@ class Contrat extends CommonObject
$result .= $linkstart; $result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= $this->ref; if ($withpicto != 2) $result.= ($this->ref?$this->ref:$this->id);
$result .= $linkend; $result .= $linkend;
return $result; return $result;

View File

@ -1318,7 +1318,7 @@ class pdf_einstein extends ModelePDFCommandes
$posy+=4; $posy+=4;
$pdf->SetXY($posx, $posy); $pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60); $pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date, "%d %b %Y", false, $outputlangs, true), '', 'R'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
// Get contact // Get contact
if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP))

View File

@ -121,7 +121,7 @@ if (empty($user->societe_id))
$boxstat.='<div class="inline-block valignmiddle">'.$langs->trans("DolibarrStateBoard").'</div>'; $boxstat.='<div class="inline-block valignmiddle">'.$langs->trans("DolibarrStateBoard").'</div>';
$boxstat.='</th>'; $boxstat.='</th>';
$boxstat.='</tr>'; $boxstat.='</tr>';
$boxstat.='<tr class="impair"><td class="tdboxstats nohover flexcontainer">'; $boxstat.='<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer">';
$object=new stdClass(); $object=new stdClass();
$parameters=array(); $parameters=array();
@ -563,7 +563,7 @@ $boxwork.='</tr>'."\n";
$nbworkboardempty=0; $nbworkboardempty=0;
if (! empty($valid_dashboardlines)) if (! empty($valid_dashboardlines))
{ {
$boxwork.='<tr class="nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">'; $boxwork.='<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
foreach($valid_dashboardlines as $board) foreach($valid_dashboardlines as $board)
{ {
@ -602,8 +602,6 @@ if (! empty($valid_dashboardlines))
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>'; $boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>'; $boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>'; $boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='</div>'; $boxwork .='</div>';
$boxwork .='</td></tr>'; $boxwork .='</td></tr>';

View File

@ -302,8 +302,12 @@ DefaultBindingDesc=This page can be used to set a default account to use to link
DefaultClosureDesc=This page can be used to set parameters to use to enclose a balance sheet. DefaultClosureDesc=This page can be used to set parameters to use to enclose a balance sheet.
Options=Options Options=Options
OptionModeProductSell=Mode sales OptionModeProductSell=Mode sales
OptionModeProductSellIntra=Mode sales exported in EEC
OptionModeProductSellExport=Mode sales exported in other countries
OptionModeProductBuy=Mode purchases OptionModeProductBuy=Mode purchases
OptionModeProductSellDesc=Show all products with accounting account for sales. OptionModeProductSellDesc=Show all products with accounting account for sales.
OptionModeProductSellIntraDesc=Show all products with accounting account for sales in EEC.
OptionModeProductSellExportDesc=Show all products with accounting account for other foreign sales.
OptionModeProductBuyDesc=Show all products with accounting account for purchases. OptionModeProductBuyDesc=Show all products with accounting account for purchases.
CleanFixHistory=Remove accounting code from lines that not exists into charts of account CleanFixHistory=Remove accounting code from lines that not exists into charts of account
CleanHistory=Reset all bindings for selected year CleanHistory=Reset all bindings for selected year

View File

@ -250,7 +250,7 @@ CountryMF=Saint Martin
##### Civilities ##### ##### Civilities #####
CivilityMME=Mevrouw CivilityMME=Mevrouw
CivilityMR=Meneer CivilityMR=De Heer
CivilityMLE=Mejuffrouw CivilityMLE=Mejuffrouw
CivilityMTRE=Meester CivilityMTRE=Meester
CivilityDR=Dokter CivilityDR=Dokter

View File

@ -1920,7 +1920,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
} }
else else
{ {
if (is_array(arrayresult)) if (is_array($arrayresult))
{ {
foreach($arrayresult as $key => $val) foreach($arrayresult as $key => $val)
{ {

View File

@ -1078,7 +1078,7 @@ if ($resql)
// Date creation // Date creation
if (! empty($arrayfields['p.datec']['checked'])) if (! empty($arrayfields['p.datec']['checked']))
{ {
print '<td class="center">'; print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -1086,7 +1086,7 @@ if ($resql)
// Date modification // Date modification
if (! empty($arrayfields['p.tms']['checked'])) if (! empty($arrayfields['p.tms']['checked']))
{ {
print '<td class="center">'; print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;

View File

@ -688,6 +688,18 @@ class Project extends CommonObject
} }
} }
// Remove linked categories.
if (! $error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX. "categorie_project";
$sql.= " WHERE fk_project = ". $this->id;
$result = $this->db->query($sql);
if (! $result) {
$error++;
$this->errors[] = $this->db->lasterror();
}
}
// Fetch tasks // Fetch tasks
$this->getLinesArray($user); $this->getLinesArray($user);

View File

@ -29,6 +29,7 @@
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
@ -1054,7 +1055,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); $selectedfields.=(is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n"; print '<table class="tagtable nobottomiftotal liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";

View File

@ -2,7 +2,8 @@
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.e> * Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -2006,16 +2007,13 @@ if (preg_match('/^dopayment/', $action))
payment_method_data: { payment_method_data: {
billing_details: { billing_details: {
name: cardholderName.value name: cardholderName.value
<?php if (GETPOST('email', 'alpha')) { ?>, email: '<?php echo GETPOST('email', 'alpha'); ?>',<?php } ?> <?php if (GETPOST('email', 'alpha')) { ?>, email: '<?php echo GETPOST('email', 'alpha'); ?>'<?php } ?>
<?php if (is_object($object) && is_object($object->thirdparty)) { ?>, phone: <?php echo $object->thirdparty->phone; ?>',<?php } ?> <?php if (is_object($object) && is_object($object->thirdparty)) { ?>, phone: '<?php echo $object->thirdparty->phone; ?>'<?php } ?>
<?php if (is_object($object) && is_object($object->thirdparty)) { <?php if (is_object($object) && is_object($object->thirdparty)) { ?>, address: {
print ', address: {'."\n"; city: '<?php echo $object->thirdparty->town; ?>',
print ' city: '.$object->thirdparty->town.','; country: '<?php echo $object->thirdparty->country_code; ?>',
print ' country: '.$object->thirdparty->country_code.','; line1: '<?php echo $object->thirdparty->address; ?>',
print ' line1: '.$object->thirdparty->address.','; postal_code: '<?php echo $object->thirdparty->zip; ?>'}<?php } ?>
print ' postal_code: '.$object->thirdparty->zip;
print '}'."\n";
} ?>
} /* TODO Add all other known data like emails, ... to be SCA compliant */ } /* TODO Add all other known data like emails, ... to be SCA compliant */
}, },
save_payment_method: false save_payment_method: false

View File

@ -33,6 +33,9 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
@ -366,7 +369,8 @@ if ($action != "infos_success") {
print '</div>'; print '</div>';
// End of page // End of page
htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
llxFooter(''); llxFooter('', 'public');
$db->close(); $db->close();

View File

@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
// Load translation files required by the page // Load translation files required by the page

View File

@ -38,6 +38,9 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("companies","other","ticket")); $langs->loadLangs(array("companies","other","ticket"));
@ -696,6 +699,11 @@ if ($action == "view_ticketlist")
print "</div>\n"; print "</div>\n";
} }
print "</div>";
// End of page // End of page
llxFooter(); htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
llxFooter('', 'public');
$db->close(); $db->close();

View File

@ -39,6 +39,9 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("companies","other","ticket")); $langs->loadLangs(array("companies","other","ticket"));
@ -318,6 +321,11 @@ if ($action == "view_ticket" || $action == "add_message" || $action == "close" |
print "</div>\n"; print "</div>\n";
} }
print "</div>";
// End of page // End of page
llxFooter(); htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
llxFooter('', 'public');
$db->close(); $db->close();

View File

@ -1447,8 +1447,7 @@ li.menuhider:hover {
background-image: none !important; background-image: none !important;
} }
li.tmenusel, li.tmenu:hover { li.tmenusel, li.tmenu:hover {
background: rgba(0, 0, 0, 0.1); /* background: rgba(0, 0, 0, 0.1); */
/* background: rgb(<?php echo $colorbackhmenu1 ?>); */
} }
li.tmenusel::after, li.tmenu:hover::after{ li.tmenusel::after, li.tmenu:hover::after{
@ -2651,6 +2650,9 @@ tr.liste_titre_filter td.liste_titre {
padding-top: 1px; padding-top: 1px;
padding-bottom: 0px; padding-bottom: 0px;
} }
tr.liste_titre_filter td.liste_titre:first-of-type {
/* height: 36px; */
}
.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd .liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
{ {
border-bottom-width: 0 !important; border-bottom-width: 0 !important;
@ -2956,6 +2958,9 @@ form.pair, form.impair {
form.tagtr:last-of-type div.tagtd, tr.pair:last-of-type td, tr.impair:last-of-type td { form.tagtr:last-of-type div.tagtd, tr.pair:last-of-type td, tr.impair:last-of-type td {
border-bottom: 0px !important; border-bottom: 0px !important;
} }
tr.nobottom td {
border-bottom: 0px !important;
}
div.tableforcontact form.tagtr:last-of-type div.tagtd { div.tableforcontact form.tagtr:last-of-type div.tagtd {
border-bottom: 1px solid #ddd !important; border-bottom: 1px solid #ddd !important;
} }
@ -3144,7 +3149,7 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-
.noborder > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .noborder > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre),
.noborder .oddeven.tagtr:nth-child(even):not(:last-child) .tagtd:not(.liste_titre) .noborder .oddeven.tagtr:nth-child(even):not(:last-child) .tagtd:not(.liste_titre)
{ {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #e0e0e0;
} }
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre), .noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
@ -3160,7 +3165,7 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-
.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre),
.noborder .oddeven.tagtr:nth-child(odd):not(:last-child) .tagtd:not(.liste_titre) .noborder .oddeven.tagtr:nth-child(odd):not(:last-child) .tagtd:not(.liste_titre)
{ {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #e0e0e0;
} }
ul.noborder li:nth-child(even):not(.liste_titre) { ul.noborder li:nth-child(even):not(.liste_titre) {
@ -3206,7 +3211,10 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
padding: 3px; padding: 3px;
} }
.boxstats { .boxstats {
padding: 3px; padding-left: 3px;
padding-right: 3px;
padding-top: 2px;
padding-bottom: 2px;
width: 121px; width: 121px;
} }
.boxstatscontent { .boxstatscontent {