Merge remote-tracking branch 'Upstream/develop' into 5.0-p21
This commit is contained in:
commit
849e46ab1d
@ -37,6 +37,7 @@ $langs->load("accountancy");
|
|||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
|
$backtopage = GETPOST('backtopage');
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$rowid = GETPOST('rowid', 'int');
|
$rowid = GETPOST('rowid', 'int');
|
||||||
$cancel = GETPOST('cancel');
|
$cancel = GETPOST('cancel');
|
||||||
@ -51,6 +52,13 @@ $object = new AccountingAccount($db);
|
|||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('cancel'))
|
||||||
|
{
|
||||||
|
$urltogo=$backtopage?$backtopage:dol_buildpath('/accountancy/admin/account.php',1);
|
||||||
|
header("Location: ".$urltogo);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||||
{
|
{
|
||||||
if (! $cancel) {
|
if (! $cancel) {
|
||||||
@ -106,7 +114,9 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
|||||||
}
|
}
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
header("Location: account.php");
|
setEventMessages("RecordCreatedSuccessfully",null,'mesgs');
|
||||||
|
$urltogo=$backtopage?$backtopage:dol_buildpath('/accountancy/admin/account.php',1);
|
||||||
|
header("Location: ".$urltogo);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,8 +38,10 @@ $langs->load("admin");
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin)
|
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
accessforbidden();
|
{
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
@ -135,31 +137,14 @@ $var = true;
|
|||||||
/*
|
/*
|
||||||
* Main Options
|
* Main Options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('MainOptions') . '</td>';
|
print '<td colspan="3">' . $langs->trans('Options') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
|
||||||
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
|
||||||
if (! $conf->use_javascript_ajax) {
|
|
||||||
print '<td class="nowrap">';
|
|
||||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
|
||||||
print "</td>";
|
|
||||||
} else {
|
|
||||||
print '<td>';
|
|
||||||
$listformat = array (
|
|
||||||
'csv' => $langs->trans("csv"),
|
|
||||||
'txt' => $langs->trans("txt")
|
|
||||||
);
|
|
||||||
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
|
|
||||||
|
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
$num = count($main_option);
|
$num = count($main_option);
|
||||||
if ($num) {
|
if ($num) {
|
||||||
foreach ( $main_option as $key ) {
|
foreach ( $main_option as $key ) {
|
||||||
@ -221,8 +206,29 @@ if ($num2) {
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
|
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
|
||||||
|
{
|
||||||
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
||||||
|
if (! $conf->use_javascript_ajax) {
|
||||||
|
print '<td class="nowrap">';
|
||||||
|
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||||
|
print "</td>";
|
||||||
|
} else {
|
||||||
|
print '<td>';
|
||||||
|
$listformat = array (
|
||||||
|
'csv' => $langs->trans("csv"),
|
||||||
|
'txt' => $langs->trans("txt")
|
||||||
|
);
|
||||||
|
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
|
||||||
|
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
foreach ( $model_option as $key ) {
|
foreach ( $model_option as $key ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|||||||
@ -80,7 +80,7 @@ $max = 100;
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$title = $langs->trans('FiscalYears');
|
$title = $langs->trans('AccountingPeriods');
|
||||||
$helpurl = "";
|
$helpurl = "";
|
||||||
llxHeader('', $title, $helpurl);
|
llxHeader('', $title, $helpurl);
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ if ($result) {
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$title = $langs->trans('FiscalYears');
|
$title = $langs->trans('AccountingPeriods');
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 1);
|
||||||
|
|
||||||
// Load attribute_label
|
// Load attribute_label
|
||||||
|
|||||||
@ -41,18 +41,21 @@ $langs->load("accountancy");
|
|||||||
$langs->load("salaries");
|
$langs->load("salaries");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin)
|
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
|
{
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
// Parameters ACCOUNTING_* and others
|
// Parameters ACCOUNTING_* and others
|
||||||
$list = array (
|
$list = array (
|
||||||
'ACCOUNTING_LIMIT_LIST_VENTILATION',
|
//'ACCOUNTING_LIMIT_LIST_VENTILATION', Useless, we can change value dynamically, so we use default global setup
|
||||||
|
'ACCOUNTING_MANAGE_ZERO',
|
||||||
|
'ACCOUNTING_LENGTH_GACCOUNT',
|
||||||
|
'ACCOUNTING_LENGTH_AACCOUNT' ,
|
||||||
'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
|
'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
|
||||||
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
|
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
|
||||||
'ACCOUNTING_LENGTH_GACCOUNT',
|
|
||||||
'ACCOUNTING_LENGTH_AACCOUNT'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$list_account = array (
|
$list_account = array (
|
||||||
@ -71,6 +74,7 @@ $list_account = array (
|
|||||||
'DONATION_ACCOUNTINGACCOUNT'
|
'DONATION_ACCOUNTINGACCOUNT'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -180,6 +184,7 @@ if ($action == 'setdisabledirectinput') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -200,173 +205,186 @@ print '<input type="hidden" name="action" value="update">';
|
|||||||
|
|
||||||
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
|
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
if (! empty($user->admin))
|
||||||
|
{
|
||||||
// Cas du parametre ACCOUNTING_MODE
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
// Cas du parametre ACCOUNTING_MODE
|
||||||
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
|
|
||||||
print "</tr>\n";
|
print '<tr class="liste_titre">';
|
||||||
print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"' . ($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>';
|
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
|
||||||
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
|
print "</tr>\n";
|
||||||
// Write info on way to count VAT
|
print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"' . ($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>';
|
||||||
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
|
||||||
// {
|
// Write info on way to count VAT
|
||||||
// // print "<br>\n";
|
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||||
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
// {
|
||||||
// }
|
// // print "<br>\n";
|
||||||
// else
|
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
||||||
// {
|
// }
|
||||||
// // print "<br>\n";
|
// else
|
||||||
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
|
// {
|
||||||
// }
|
// // print "<br>\n";
|
||||||
print "</td></tr>\n";
|
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
|
||||||
print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"' . ($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>';
|
// }
|
||||||
print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"' . ($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>';
|
||||||
print "</table>\n";
|
print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
|
||||||
|
|
||||||
print "<br>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define Chart of accounts
|
* Define Chart of accounts
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder" width="100%">';
|
if (! empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
$var = true;
|
{
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
$var = true;
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $langs->trans("Chartofaccounts") . '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
$var = ! $var;
|
||||||
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
||||||
|
print '<td align="right">';
|
||||||
|
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
||||||
|
$sql = "SELECT rowid, pcg_version, label, active";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
||||||
|
$sql .= " WHERE active = 1";
|
||||||
|
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
$var = true;
|
||||||
|
if ($resql) {
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
while ( $i < $num ) {
|
||||||
|
$var = ! $var;
|
||||||
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
|
print '<option value="' . $row[0] . '"';
|
||||||
|
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
||||||
|
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
||||||
|
|
||||||
|
$i ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print "</select>";
|
||||||
|
print "</td></tr>";
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print "<br>\n";
|
||||||
print '<td colspan="3">';
|
|
||||||
print $langs->trans("Chartofaccounts") . '</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
$var = ! $var;
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
|
||||||
print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
|
||||||
print "<td>";
|
|
||||||
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
|
||||||
|
|
||||||
$sql = "SELECT rowid, pcg_version, label, active";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
|
||||||
$sql .= " WHERE active = 1";
|
|
||||||
|
|
||||||
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
|
|
||||||
$var = true;
|
|
||||||
|
|
||||||
if ($resql) {
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0;
|
|
||||||
while ( $i < $num ) {
|
|
||||||
$var = ! $var;
|
|
||||||
$row = $db->fetch_row($resql);
|
|
||||||
|
|
||||||
print '<option value="' . $row[0] . '"';
|
|
||||||
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
|
||||||
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
|
||||||
|
|
||||||
$i ++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
print "</select>";
|
|
||||||
print "</td></tr>";
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
/*
|
// Others params
|
||||||
* Others params
|
|
||||||
*/
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td colspan="2">' . $langs->trans('OtherOptions') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ( $list as $key ) {
|
if (! empty($user->admin))
|
||||||
$var = ! $var;
|
{
|
||||||
|
// TO DO Mutualize code for yes/no constants
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
// Param
|
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||||
$label = $langs->trans($key);
|
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
||||||
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
// Value
|
print '</a></td>';
|
||||||
print '<td>';
|
} else {
|
||||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
||||||
print '</td></tr>';
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
||||||
|
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||||
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||||
|
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||||
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $list_account as $key ) {
|
// Param a user $user->rights->accountancy->chartofaccount can access
|
||||||
$var = ! $var;
|
if (! empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
|
{
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
foreach ( $list as $key ) {
|
||||||
|
$var = ! $var;
|
||||||
// Param
|
|
||||||
$label = $langs->trans($key);
|
if ($key != 'ACCOUNTING_MANAGE_ZERO')
|
||||||
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
{
|
||||||
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
// Value
|
// Param
|
||||||
print '<td>';
|
$label = $langs->trans($key);
|
||||||
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
print '<td>'.$label.'</td>';
|
||||||
print '</td></tr>';
|
// Value
|
||||||
}
|
print '<td align="right">';
|
||||||
|
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
if ($key == 'ACCOUNTING_MANAGE_ZERO')
|
||||||
|
{
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||||
|
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||||
|
print '<td align="right""><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TO DO Mutualize code for yes/no constants
|
foreach ( $list_account as $key ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
// Param
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
$label = $langs->trans($key);
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print '<td>' . $label . '</td>';
|
||||||
print '</a></td>';
|
// Value
|
||||||
} else {
|
print '<td align="right">';
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print '</td>';
|
||||||
print '</a></td>';
|
print '</tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
print '</a></td>';
|
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
|
||||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
print '</a></td>';
|
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
|
||||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
print '</a></td>';
|
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|||||||
@ -38,8 +38,10 @@ require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin)
|
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
accessforbidden();
|
{
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $langs->load("accountancy");
|
|||||||
if (empty($conf->accounting->enabled)) {
|
if (empty($conf->accounting->enabled)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// search & action GETPOST
|
// search & action GETPOST
|
||||||
|
|||||||
@ -301,9 +301,11 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("UpdateMvts"), '<a href="list.php">' . $langs->trans('BackToList') . '</a>');
|
print load_fiche_titre($langs->trans("UpdateMvts"), '<a href="list.php">' . $langs->trans('BackToList') . '</a>');
|
||||||
|
|
||||||
|
dol_fiche_head();
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr class="pair">';
|
print '<tr class="pair">';
|
||||||
print '<td width="25%">' . $langs->trans("NumMvts") . '</td>';
|
print '<td class="titlefield">' . $langs->trans("NumMvts") . '</td>';
|
||||||
print '<td>' . $book->piece_num . '</td>';
|
print '<td>' . $book->piece_num . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr class="impair">';
|
print '<tr class="impair">';
|
||||||
@ -323,14 +325,17 @@ if ($action == 'create') {
|
|||||||
print '<td>' . $book->doc_type . '</td>';
|
print '<td>' . $book->doc_type . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br />';
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
$result = $book->fetch_all_per_mvt($piece_num);
|
$result = $book->fetch_all_per_mvt($piece_num);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ListeMvts"));
|
print load_fiche_titre($langs->trans("ListeMvts"), '', '');
|
||||||
|
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||||
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
|
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
|
||||||
@ -424,7 +429,7 @@ if ($action == 'create') {
|
|||||||
print '<td align="right"><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
|
print '<td align="right"><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '"></td>';
|
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.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
|
||||||
@ -77,9 +78,18 @@ $search_mvt_label = GETPOST('search_mvt_label', 'alpha');
|
|||||||
$search_direction = GETPOST('search_direction', 'alpha');
|
$search_direction = GETPOST('search_direction', 'alpha');
|
||||||
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
|
$page = GETPOST('page','int');
|
||||||
|
if ($page < 0) { $page = 0; }
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
if ($sortorder == "") $sortorder = "ASC";
|
||||||
|
if ($sortfield == "") $sortfield = "t.rowid";
|
||||||
|
|
||||||
|
|
||||||
$object = new BookKeeping($db);
|
$object = new BookKeeping($db);
|
||||||
|
|
||||||
@ -88,85 +98,21 @@ $formother = new FormOther($db);
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
|
if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction'])) {
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (empty($search_date_start)) {
|
|
||||||
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
|
||||||
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
|
||||||
}
|
|
||||||
if ($sortorder == "")
|
|
||||||
$sortorder = "ASC";
|
|
||||||
if ($sortfield == "")
|
|
||||||
$sortfield = "t.rowid";
|
|
||||||
|
|
||||||
$options = '';
|
|
||||||
$filter = array ();
|
|
||||||
if (! empty($search_date_start)) {
|
|
||||||
$filter['t.doc_date>='] = $search_date_start;
|
|
||||||
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
|
||||||
}
|
|
||||||
if (! empty($search_date_end)) {
|
|
||||||
$filter['t.doc_date<='] = $search_date_end;
|
|
||||||
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
|
||||||
}
|
|
||||||
if (! empty($search_doc_type)) {
|
|
||||||
$filter['t.doc_type'] = $search_doc_type;
|
|
||||||
$options .= '&search_doc_type=' . $search_doc_type;
|
|
||||||
}
|
|
||||||
if (! empty($search_doc_date)) {
|
|
||||||
$filter['t.doc_date'] = $search_doc_date;
|
|
||||||
$options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
|
||||||
}
|
|
||||||
if (! empty($search_doc_ref)) {
|
|
||||||
$filter['t.doc_ref'] = $search_doc_ref;
|
|
||||||
$options .= '&search_doc_ref=' . $search_doc_ref;
|
|
||||||
}
|
|
||||||
if (! empty($search_accountancy_code)) {
|
|
||||||
$filter['t.numero_compte'] = $search_accountancy_code;
|
|
||||||
$options .= '&search_accountancy_code=' . $search_accountancy_code;
|
|
||||||
}
|
|
||||||
if (! empty($search_accountancy_code_start)) {
|
|
||||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
|
||||||
$options .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
|
||||||
}
|
|
||||||
if (! empty($search_accountancy_code_end)) {
|
|
||||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
|
||||||
$options .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
|
||||||
}
|
|
||||||
if (! empty($search_accountancy_aux_code)) {
|
|
||||||
$filter['t.code_tiers'] = $search_accountancy_aux_code;
|
|
||||||
$options .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
|
|
||||||
}
|
|
||||||
if (! empty($search_accountancy_aux_code_start)) {
|
|
||||||
$filter['t.code_tiers>='] = $search_accountancy_aux_code_start;
|
|
||||||
$options .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
|
|
||||||
}
|
|
||||||
if (! empty($search_accountancy_aux_code_end)) {
|
|
||||||
$filter['t.code_tiers<='] = $search_accountancy_aux_code_end;
|
|
||||||
$options .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
|
|
||||||
}
|
|
||||||
if (! empty($search_mvt_label)) {
|
|
||||||
$filter['t.label_compte'] = $search_mvt_label;
|
|
||||||
$options .= '&search_mvt_label=' . $search_mvt_label;
|
|
||||||
}
|
|
||||||
if (! empty($search_direction)) {
|
|
||||||
$filter['t.sens'] = $search_direction;
|
|
||||||
$options .= '&search_direction=' . $search_direction;
|
|
||||||
}
|
|
||||||
if (! empty($search_ledger_code)) {
|
|
||||||
$filter['t.code_journal'] = $search_ledger_code;
|
|
||||||
$options .= '&search_ledger_code=' . $search_ledger_code;
|
|
||||||
}
|
|
||||||
if (! empty($search_mvt_num)) {
|
|
||||||
$filter['t.piece_num'] = $search_mvt_num;
|
|
||||||
$options .= '&search_mvt_num=' . $search_mvt_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||||
|
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_mvt_num = '';
|
$search_mvt_num = '';
|
||||||
@ -225,7 +171,7 @@ if ($action == 'delbookkeepingyearconfirm') {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages("NothingDeleted", null, 'warnings');
|
setEventMessages("NoRecordDeleted", null, 'warnings');
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -247,30 +193,97 @@ if ($action == 'delmouvconfirm') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($action == 'export_csv') {
|
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
|
||||||
|
|
||||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
|
||||||
if ($result < 0)
|
|
||||||
{
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$accountancyexport = new AccountancyExport($db);
|
|
||||||
$accountancyexport->export($object->lines);
|
|
||||||
if (!empty($accountancyexport->errors)) {
|
|
||||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
|
||||||
}
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$param = '';
|
||||||
|
$filter = array ();
|
||||||
|
if (! empty($search_date_start)) {
|
||||||
|
$filter['t.doc_date>='] = $search_date_start;
|
||||||
|
$param .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_date_end)) {
|
||||||
|
$filter['t.doc_date<='] = $search_date_end;
|
||||||
|
$param .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_doc_type)) {
|
||||||
|
$filter['t.doc_type'] = $search_doc_type;
|
||||||
|
$param .= '&search_doc_type=' . $search_doc_type;
|
||||||
|
}
|
||||||
|
if (! empty($search_doc_date)) {
|
||||||
|
$filter['t.doc_date'] = $search_doc_date;
|
||||||
|
$param .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_doc_ref)) {
|
||||||
|
$filter['t.doc_ref'] = $search_doc_ref;
|
||||||
|
$param .= '&search_doc_ref=' . $search_doc_ref;
|
||||||
|
}
|
||||||
|
if (! empty($search_accountancy_code)) {
|
||||||
|
$filter['t.numero_compte'] = $search_accountancy_code;
|
||||||
|
$param .= '&search_accountancy_code=' . $search_accountancy_code;
|
||||||
|
}
|
||||||
|
if (! empty($search_accountancy_code_start)) {
|
||||||
|
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||||
|
$param .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||||
|
}
|
||||||
|
if (! empty($search_accountancy_code_end)) {
|
||||||
|
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||||
|
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||||
|
}
|
||||||
|
if (! empty($search_accountancy_aux_code)) {
|
||||||
|
$filter['t.code_tiers'] = $search_accountancy_aux_code;
|
||||||
|
$param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
|
||||||
|
}
|
||||||
|
if (! empty($search_accountancy_aux_code_start)) {
|
||||||
|
$filter['t.code_tiers>='] = $search_accountancy_aux_code_start;
|
||||||
|
$param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
|
||||||
|
}
|
||||||
|
if (! empty($search_accountancy_aux_code_end)) {
|
||||||
|
$filter['t.code_tiers<='] = $search_accountancy_aux_code_end;
|
||||||
|
$param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
|
||||||
|
}
|
||||||
|
if (! empty($search_mvt_label)) {
|
||||||
|
$filter['t.label_compte'] = $search_mvt_label;
|
||||||
|
$param .= '&search_mvt_label=' . $search_mvt_label;
|
||||||
|
}
|
||||||
|
if (! empty($search_direction)) {
|
||||||
|
$filter['t.sens'] = $search_direction;
|
||||||
|
$param .= '&search_direction=' . $search_direction;
|
||||||
|
}
|
||||||
|
if (! empty($search_ledger_code)) {
|
||||||
|
$filter['t.code_journal'] = $search_ledger_code;
|
||||||
|
$param .= '&search_ledger_code=' . $search_ledger_code;
|
||||||
|
}
|
||||||
|
if (! empty($search_mvt_num)) {
|
||||||
|
$filter['t.piece_num'] = $search_mvt_num;
|
||||||
|
$param .= '&search_mvt_num=' . $search_mvt_num;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'export_csv') {
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||||
|
|
||||||
|
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||||
|
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$accountancyexport = new AccountancyExport($db);
|
||||||
|
$accountancyexport->export($object->lines);
|
||||||
|
if (!empty($accountancyexport->errors)) {
|
||||||
|
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$title_page = $langs->trans("Bookkeeping");
|
$title_page = $langs->trans("Bookkeeping");
|
||||||
if ($search_date_start || $search_date_end) $title_page .= ' ' . dol_print_date($search_date_start, 'day') . ' - ' . dol_print_date($search_date_end, 'day');
|
if ($search_date_start || $search_date_end) $title_page .= ' ' . dol_print_date($search_date_start, 'day') . ' - ' . dol_print_date($search_date_end, 'day');
|
||||||
llxHeader('', $title_page);
|
llxHeader('', $title_page);
|
||||||
@ -285,6 +298,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Do not use this
|
||||||
$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter);
|
$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
@ -321,37 +335,51 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
'default' => $deljournal
|
'default' => $deljournal
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1, 250);
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy');
|
//$param=''; param started before
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
|
||||||
|
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
|
print '<input type="hidden" name="action" value="list">';
|
||||||
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
|
|
||||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
|
||||||
print '<div class="tabsAction">' . "\n";
|
print '<div class="tabsAction">' . "\n";
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./listbyaccount.php">' . $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . strtolower($langs->trans("AccountAccounting")) . '</a></div>';
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butActionDelete" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
if (count($filter)) print $langs->trans("ExportFilteredList");
|
||||||
|
else print $langs->trans("ExportList");
|
||||||
|
print '</a></div>';
|
||||||
|
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
print ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a><br><br>';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
|
||||||
print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
|
print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print $langs->trans('From') . ': ';
|
print $langs->trans('From') . ': ';
|
||||||
@ -375,18 +403,16 @@ print '<br>';
|
|||||||
print $langs->trans('to');
|
print $langs->trans('to');
|
||||||
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
|
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
print '<td align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||||
print '<td align="right" colspan="2" class="liste_titre">';
|
print '<td align="right" class="liste_titre">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var = True;
|
$var = True;
|
||||||
@ -394,13 +420,13 @@ $var = True;
|
|||||||
$total_debit = 0;
|
$total_debit = 0;
|
||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
|
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ($object->lines as $line ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
$total_debit += $line->debit;
|
$total_debit += $line->debit;
|
||||||
$total_credit += $line->credit;
|
$total_credit += $line->credit;
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr '. $bc[$var].'>';
|
||||||
|
|
||||||
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->piece_num . '</a></td>';
|
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->piece_num . '</a></td>';
|
||||||
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||||
@ -413,7 +439,7 @@ foreach ( $object->lines as $line ) {
|
|||||||
print '<td align="center">' . $line->code_journal . '</td>';
|
print '<td align="center">' . $line->code_journal . '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
|
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
@ -426,13 +452,13 @@ print '</td>';
|
|||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print price($total_credit);
|
print price($total_credit);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td colspan="2"></td>';
|
print '<td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
$db->close();
|
|
||||||
|
|||||||
@ -60,11 +60,23 @@ $search_mvt_label = GETPOST('search_mvt_label', 'alpha');
|
|||||||
$search_direction = GETPOST('search_direction', 'alpha');
|
$search_direction = GETPOST('search_direction', 'alpha');
|
||||||
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
// Load variable for pagination
|
||||||
if ($page == -1) { $page = 0 ; }
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$offset = $limit * $page ;
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
|
$page = GETPOST('page','int');
|
||||||
|
if ($page < 0) { $page = 0; }
|
||||||
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
if ($sortorder == "") $sortorder = "ASC";
|
||||||
|
if ($sortfield == "") $sortfield = "t.rowid";
|
||||||
|
|
||||||
|
if (empty($search_date_start)) {
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$object = new BookKeeping($db);
|
$object = new BookKeeping($db);
|
||||||
|
|
||||||
@ -73,18 +85,6 @@ $formother = new FormOther($db);
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($search_date_start)) {
|
|
||||||
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
|
||||||
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
|
||||||
}
|
|
||||||
if ($sortorder == "")
|
|
||||||
$sortorder = "ASC";
|
|
||||||
if ($sortfield == "")
|
|
||||||
$sortfield = "t.rowid";
|
|
||||||
|
|
||||||
|
|
||||||
$options = '';
|
$options = '';
|
||||||
$filter = array ();
|
$filter = array ();
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
'default' => $delyear
|
'default' => $delyear
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1, 250);
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,12 +223,15 @@ print '<div class="tabsAction">' . "\n";
|
|||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
print ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a><br><br>';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
||||||
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||||
print '<td>' . $langs->trans("SuppliersInvoices") . ' / ' . $langs->trans("CustomersInvoices") . '</td>';
|
print_liste_field_titre($langs->trans("SuppliersInvoices") . ' / ' . $langs->trans("CustomersInvoices"));
|
||||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
@ -237,8 +240,9 @@ print "</tr>\n";
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
||||||
print '<td width >' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
print '<td>' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td></td>';
|
||||||
|
print '<td class="liste_titre" align="center">';
|
||||||
print $langs->trans('From') . ': ';
|
print $langs->trans('From') . ': ';
|
||||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -263,7 +267,7 @@ $total_debit = 0;
|
|||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
$sous_total_debit = 0;
|
$sous_total_debit = 0;
|
||||||
$sous_total_credit = 0;
|
$sous_total_credit = 0;
|
||||||
$displayed_account_number = "";
|
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
|
||||||
|
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ( $object->lines as $line ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
@ -271,38 +275,47 @@ foreach ( $object->lines as $line ) {
|
|||||||
$total_debit += $line->debit;
|
$total_debit += $line->debit;
|
||||||
$total_credit += $line->credit;
|
$total_credit += $line->credit;
|
||||||
|
|
||||||
// Permet d'afficher le compte comptable
|
$accountg = length_accountg($line->numero_compte);
|
||||||
if (length_accountg($line->numero_compte) != $displayed_account_number) {
|
//if (empty($accountg)) $accountg = '-';
|
||||||
|
|
||||||
// Affiche un Sous-Total par compte comptable
|
// Is it a break ?
|
||||||
if ($displayed_account_number != "") {
|
if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) {
|
||||||
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
|
||||||
print "<td> </td>\n";
|
// Affiche un Sous-Total par compte comptable
|
||||||
print '</tr>';
|
if (isset($displayed_account_number)) {
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the break account
|
||||||
|
$colspan = 9;
|
||||||
|
print "<tr>";
|
||||||
|
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">';
|
||||||
|
if (! empty($line->numero_compte) && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte);
|
||||||
|
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$displayed_account_number = $accountg;
|
||||||
|
//if (empty($displayed_account_number)) $displayed_account_number='-';
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affiche le compte comptable en début de ligne
|
print '<tr '. $bc[$var].'>';
|
||||||
print "<tr>";
|
|
||||||
print '<td colspan="7" style="font-weight:bold; border-bottom: 1pt solid black;">'.length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte).'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$displayed_account_number = length_accountg($line->numero_compte);
|
|
||||||
$sous_total_debit = 0;
|
|
||||||
$sous_total_credit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
print '<td align="right">'.$line->piece_num.'</td>';
|
||||||
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||||
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->doc_ref . '</a></td>';
|
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->doc_ref . '</a></td>';
|
||||||
|
|
||||||
// Affiche un lien vers la facture client/fournisseur
|
// Affiche un lien vers la facture client/fournisseur
|
||||||
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||||
if ($line->doc_type == 'supplier_invoice')
|
if ($line->doc_type == 'supplier_invoice')
|
||||||
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
elseif ($line->doc_type == 'customer_invoice')
|
elseif ($line->doc_type == 'customer_invoice')
|
||||||
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
else
|
else
|
||||||
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td>' . $line->label_compte . '</td>' : '<td>' . $line->label_compte . '<br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td>' . $line->label_compte . '</td>' : '<td>' . $line->label_compte . '<br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -197,7 +197,7 @@ print "<table class=\"noborder\" width=\"100%\">";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Date"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("ThirdPartyAccount"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("ThirdPartyAccount"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder);
|
||||||
@ -269,10 +269,10 @@ $var = True;
|
|||||||
foreach ( $object->lines as $line ) {
|
foreach ( $object->lines as $line ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr '. $bc[$var].'>';
|
||||||
print '<td>' . $line->piece_num . '</td>' . "\n";
|
print '<td>' . $line->piece_num . '</td>' . "\n";
|
||||||
print '<td>' . $line->doc_type . '</td>' . "\n";
|
print '<td>' . $line->doc_type . '</td>' . "\n";
|
||||||
print '<td>' . dol_print_date($line->doc_date) . '</td>';
|
print '<td align="center">' . dol_print_date($line->doc_date) . '</td>';
|
||||||
print '<td>' . $line->doc_ref . '</td>';
|
print '<td>' . $line->doc_ref . '</td>';
|
||||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||||
print '<td>' . length_accounta($line->code_tiers) . '</td>';
|
print '<td>' . length_accounta($line->code_tiers) . '</td>';
|
||||||
@ -289,4 +289,4 @@ print "</table>";
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -105,12 +105,13 @@ class BookKeeping extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Create object into database
|
* Create object into database
|
||||||
*
|
*
|
||||||
* @param User $user User that creates
|
* @param User $user User that creates
|
||||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
*
|
* @return int <0 if KO, Id of created object if OK
|
||||||
* @return int <0 if KO, Id of created object if OK
|
|
||||||
*/
|
*/
|
||||||
public function create(User $user, $notrigger = false) {
|
public function create(User $user, $notrigger = false) {
|
||||||
|
global $langs;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -161,11 +162,14 @@ class BookKeeping extends CommonObject
|
|||||||
if (isset($this->piece_num)) {
|
if (isset($this->piece_num)) {
|
||||||
$this->piece_num = trim($this->piece_num);
|
$this->piece_num = trim($this->piece_num);
|
||||||
}
|
}
|
||||||
|
if (empty($this->debit)) $this->debit = 0;
|
||||||
|
if (empty($this->credit)) $this->credit = 0;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (empty($this->numero_compte))
|
if (empty($this->numero_compte) || $this->numero_compte == '-1')
|
||||||
{
|
{
|
||||||
$this->errors[]='ErrorFieldAccountNotDefined';
|
$langs->load("errors");
|
||||||
|
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,10 +325,9 @@ class BookKeeping extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Create object into database
|
* Create object into database
|
||||||
*
|
*
|
||||||
* @param User $user User that creates
|
* @param User $user User that creates
|
||||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
*
|
* @return int <0 if KO, Id of created object if OK
|
||||||
* @return int <0 if KO, Id of created object if OK
|
|
||||||
*/
|
*/
|
||||||
public function createStd(User $user, $notrigger = false) {
|
public function createStd(User $user, $notrigger = false) {
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -378,6 +381,8 @@ class BookKeeping extends CommonObject
|
|||||||
if (isset($this->piece_num)) {
|
if (isset($this->piece_num)) {
|
||||||
$this->piece_num = trim($this->piece_num);
|
$this->piece_num = trim($this->piece_num);
|
||||||
}
|
}
|
||||||
|
if (empty($this->debit)) $this->debit = 0;
|
||||||
|
if (empty($this->credit)) $this->credit = 0;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// Put here code to add control on parameters values
|
// Put here code to add control on parameters values
|
||||||
@ -410,9 +415,9 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= ' ' . (! isset($this->code_tiers) ? 'NULL' : "'" . $this->db->escape($this->code_tiers) . "'") . ',';
|
$sql .= ' ' . (! isset($this->code_tiers) ? 'NULL' : "'" . $this->db->escape($this->code_tiers) . "'") . ',';
|
||||||
$sql .= ' ' . (! isset($this->numero_compte) ? "'NotDefined'" : "'" . $this->db->escape($this->numero_compte) . "'") . ',';
|
$sql .= ' ' . (! isset($this->numero_compte) ? "'NotDefined'" : "'" . $this->db->escape($this->numero_compte) . "'") . ',';
|
||||||
$sql .= ' ' . (! isset($this->label_compte) ? 'NULL' : "'" . $this->db->escape($this->label_compte) . "'") . ',';
|
$sql .= ' ' . (! isset($this->label_compte) ? 'NULL' : "'" . $this->db->escape($this->label_compte) . "'") . ',';
|
||||||
$sql .= ' ' . (! isset($this->debit) ? 'NULL' : "'" . $this->debit . "'") . ',';
|
$sql .= ' ' . (! isset($this->debit) ? 'NULL' : $this->debit ). ',';
|
||||||
$sql .= ' ' . (! isset($this->credit) ? 'NULL' : "'" . $this->credit . "'") . ',';
|
$sql .= ' ' . (! isset($this->credit) ? 'NULL' : $this->credit ). ',';
|
||||||
$sql .= ' ' . (! isset($this->montant) ? 'NULL' : "'" . $this->montant . "'") . ',';
|
$sql .= ' ' . (! isset($this->montant) ? 'NULL' : $this->montant ). ',';
|
||||||
$sql .= ' ' . (! isset($this->sens) ? 'NULL' : "'" . $this->db->escape($this->sens) . "'") . ',';
|
$sql .= ' ' . (! isset($this->sens) ? 'NULL' : "'" . $this->db->escape($this->sens) . "'") . ',';
|
||||||
$sql .= ' ' . $user->id . ',';
|
$sql .= ' ' . $user->id . ',';
|
||||||
$sql .= ' ' . (! isset($this->import_key) ? 'NULL' : "'" . $this->db->escape($this->import_key) . "'") . ',';
|
$sql .= ' ' . (! isset($this->import_key) ? 'NULL' : "'" . $this->db->escape($this->import_key) . "'") . ',';
|
||||||
@ -1060,8 +1065,8 @@ class BookKeeping extends CommonObject
|
|||||||
$sql = "DELETE";
|
$sql = "DELETE";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
$sql.= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||||
$sql.= " WHERE 1 = 1";
|
$sql.= " WHERE 1 = 1";
|
||||||
if ($delyear) $sql.= " AND YEAR(doc_date) = " . $delyear; // FIXME Must use between
|
if (! empty($delyear)) $sql.= " AND YEAR(doc_date) = " . $delyear; // FIXME Must use between
|
||||||
if ($journal) $sql.= " AND code_journal = ".$journal;
|
if (! empty($journal)) $sql.= " AND code_journal = '".$journal."'";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class FormVentilation extends Form
|
|||||||
$options[$select_value_out] = $label;
|
$options[$select_value_out] = $label;
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss);
|
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1);
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,26 +40,35 @@ $id = GETPOST('id');
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
|
||||||
|
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||||
if (! GETPOST('cancel', 'alpha')) {
|
if (! GETPOST('cancel', 'alpha')) {
|
||||||
|
if ($codeventil < 0) $codeventil = 0;
|
||||||
|
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||||
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
||||||
$sql .= " WHERE rowid = " . $id;
|
$sql .= " WHERE rowid = " . $id;
|
||||||
|
|
||||||
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
setEventMessages($db->lasterror(), null, 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
header("Location: ./lines.php");
|
header("Location: ./lines.php");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -86,9 +95,7 @@ if (! empty($id)) {
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
|
||||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -43,7 +43,7 @@ if (empty($conf->accounting->enabled)) {
|
|||||||
}
|
}
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
@ -212,10 +212,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
@ -259,12 +256,9 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -303,10 +297,7 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -52,37 +52,27 @@ $search_vat = GETPOST('search_vat', 'alpha');
|
|||||||
$search_country = GETPOST('search_country', 'alpha');
|
$search_country = GETPOST('search_country', 'alpha');
|
||||||
$search_tvaintra = GETPOST('search_tvaintra', 'alpha');
|
$search_tvaintra = GETPOST('search_tvaintra', 'alpha');
|
||||||
|
|
||||||
// Getpost Order and column and limit page
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOST('page', 'int');
|
$page = GETPOST('page', 'int');
|
||||||
if ($page < 0)
|
if ($page < 0) $page = 0;
|
||||||
$page = 0;
|
|
||||||
|
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|
||||||
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
|
|
||||||
} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
} else {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
}
|
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
|
|
||||||
if (! $sortfield)
|
if (! $sortfield)
|
||||||
$sortfield = "f.datef, f.facnumber, fd.rowid";
|
$sortfield = "f.datef, f.facnumber, fd.rowid";
|
||||||
|
|
||||||
if (! $sortorder) {
|
if (! $sortorder) {
|
||||||
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
|
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
|
||||||
$sortorder = " DESC ";
|
$sortorder = "DESC";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
@ -128,6 +118,8 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessages($db->lasterror(), null, 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$account_parent = ''; // Protection to avoid to mass apply it a second time
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -168,9 +160,7 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
|
|||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
|
||||||
$sql .= " WHERE fd.fk_code_ventilation > 0 ";
|
$sql .= " WHERE fd.fk_code_ventilation > 0 ";
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
$sql .= " AND f.fk_statut > 0";
|
$sql .= " AND f.fk_statut > 0";
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
@ -204,28 +194,28 @@ if (strlen(trim($search_country))) {
|
|||||||
if (strlen(trim($search_tvaintra))) {
|
if (strlen(trim($search_tvaintra))) {
|
||||||
$sql .= " AND (s.tva_intra like'" . $search_tvaintra . "%')";
|
$sql .= " AND (s.tva_intra like'" . $search_tvaintra . "%')";
|
||||||
}
|
}
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
// Count total nb of records with no order and no limits
|
|
||||||
$nbtotalofrecords = 0;
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
$nbtotalofrecords = $db->num_rows($resql);
|
|
||||||
else
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
dol_syslog("/accountancy/customer/lines.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("/accountancy/customer/lines.php", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num_lines = $db->num_rows($result);
|
$num_lines = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param = "";
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
if ($search_invoice)
|
if ($search_invoice)
|
||||||
$param .= "&search_invoice=" . $search_invoice;
|
$param .= "&search_invoice=" . $search_invoice;
|
||||||
if ($search_ref)
|
if ($search_ref)
|
||||||
@ -243,17 +233,26 @@ if ($result) {
|
|||||||
if ($search_tvaintra)
|
if ($search_tvaintra)
|
||||||
$param .= "&search_tvaintra=" . $search_tvaintra;
|
$param .= "&search_tvaintra=" . $search_tvaintra;
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy');
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||||
print '<td align="left"><b>' . $langs->trans("DescVentilDoneCustomer") . '</b></td>';
|
print '<input type="hidden" name="action" value="ventil">';
|
||||||
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
|
print $langs->trans("DescVentilDoneCustomer") . '<br>';
|
||||||
|
|
||||||
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
||||||
print $formventilation->select_account($account_parent, 'account_parent', 1);
|
print $formventilation->select_account($account_parent, 'account_parent', 1);
|
||||||
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '"/></div>';
|
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '"/></div>';
|
||||||
|
|
||||||
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
@ -264,6 +263,7 @@ if ($result) {
|
|||||||
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Country"), $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Country"), $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("VATIntra"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("VATIntra"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "fd.rowid", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -273,10 +273,11 @@ if ($result) {
|
|||||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '"></td>';
|
||||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_country" size="5" value="' . $search_country . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" name="search_country" size="5" value="' . $search_country . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_tavintra" size="5" value="' . $search_tavintra . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" name="search_tavintra" size="5" value="' . $search_tavintra . '"></td>';
|
||||||
|
print '<td class="liste_titre" align="right"></td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(1);
|
$searchpitco=$form->showFilterAndCheckAddButtons(1);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
@ -290,7 +291,7 @@ if ($result) {
|
|||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
|
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr '. $bc[$var].'>';
|
||||||
|
|
||||||
// Ref Invoice
|
// Ref Invoice
|
||||||
$facture_static->ref = $objp->facnumber;
|
$facture_static->ref = $objp->facnumber;
|
||||||
@ -301,6 +302,7 @@ if ($result) {
|
|||||||
$product_static->ref = $objp->product_ref;
|
$product_static->ref = $objp->product_ref;
|
||||||
$product_static->id = $objp->product_id;
|
$product_static->id = $objp->product_id;
|
||||||
$product_static->type = $objp->product_type;
|
$product_static->type = $objp->product_type;
|
||||||
|
$product_static->label = $objp->product_label;
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($product_static->id)
|
if ($product_static->id)
|
||||||
print $product_static->getNomUrl(1);
|
print $product_static->getNomUrl(1);
|
||||||
@ -317,6 +319,7 @@ if ($result) {
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
print '<td>' . $objp->country .'</td>';
|
print '<td>' . $objp->country .'</td>';
|
||||||
print '<td>' . $objp->tva_intra . '</td>';
|
print '<td>' . $objp->tva_intra . '</td>';
|
||||||
|
print '<td align="right">' . $objp->rowid . '</td>';
|
||||||
print '<td align="right"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->fdid . '"/></td>';
|
print '<td align="right"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->fdid . '"/></td>';
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
@ -326,11 +329,14 @@ if ($result) {
|
|||||||
print $db->error();
|
print $db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table></form>";
|
print "</table>";
|
||||||
|
|
||||||
if ($num_lines > $conf->liste_limit) {
|
if ($nbtotalofrecords > $limit) {
|
||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '');
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-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) 2016 Laurent Destailleur <eldy@users.sourceforge.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
|
||||||
@ -43,7 +44,6 @@ $langs->load("accountancy");
|
|||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
|
|
||||||
// Select Box
|
// Select Box
|
||||||
$codeventil = GETPOST('codeventil', 'array');
|
|
||||||
$mesCasesCochees = GETPOST('mesCasesCochees', 'array');
|
$mesCasesCochees = GETPOST('mesCasesCochees', 'array');
|
||||||
|
|
||||||
// Search Getpost
|
// Search Getpost
|
||||||
@ -56,35 +56,27 @@ $search_account = GETPOST('search_account', 'alpha');
|
|||||||
$search_vat = GETPOST('search_vat', 'alpha');
|
$search_vat = GETPOST('search_vat', 'alpha');
|
||||||
$btn_ventil = GETPOST('ventil', 'alpha');
|
$btn_ventil = GETPOST('ventil', 'alpha');
|
||||||
|
|
||||||
// Getpost Order and column and limit page
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOST('page', 'int');
|
$page = GETPOST('page','int');
|
||||||
if ($page < 0)
|
if ($page < 0) { $page = 0; }
|
||||||
$page = 0;
|
|
||||||
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|
||||||
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
|
|
||||||
} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
} else {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
}
|
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
if (! $sortfield)
|
if (! $sortfield)
|
||||||
$sortfield = "f.datef, f.facnumber, l.rowid";
|
$sortfield = "f.datef, f.facnumber, l.rowid";
|
||||||
|
|
||||||
if (! $sortorder) {
|
if (! $sortorder) {
|
||||||
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
||||||
$sortorder = " DESC ";
|
$sortorder = "DESC";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
@ -98,7 +90,8 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOU
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Purge search criteria
|
// Purge search criteria
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) {
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||||
|
{
|
||||||
$search_ref = '';
|
$search_ref = '';
|
||||||
$search_invoice = '';
|
$search_invoice = '';
|
||||||
$search_label = '';
|
$search_label = '';
|
||||||
@ -111,37 +104,49 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
|||||||
if ($action == 'ventil' && ! empty($btn_ventil)) {
|
if ($action == 'ventil' && ! empty($btn_ventil)) {
|
||||||
$msg='';
|
$msg='';
|
||||||
//print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>';
|
//print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>';
|
||||||
if (! empty($codeventil) && ! empty($mesCasesCochees)) {
|
if (! empty($mesCasesCochees)) {
|
||||||
$msg = '<div><font color="red">' . count($mesCasesCochees) . ' ' . $langs->trans("SelectedLines") . '</font></div>';
|
$msg = '<div>' . $langs->trans("SelectedLines") . ': '.count($_POST["mesCasesCochees"]).'</div>';
|
||||||
$mesCodesVentilChoisis = $codeventil;
|
$msg.='<div class="detail">';
|
||||||
$cpt = 0;
|
$cpt = 0;
|
||||||
|
$ok=0;
|
||||||
|
$ko=0;
|
||||||
|
|
||||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
foreach ($mesCasesCochees as $maLigneCochee) {
|
||||||
$maLigneCourante = explode("_", $maLigneCochee);
|
$maLigneCourante = explode("_", $maLigneCochee);
|
||||||
$monId = $maLigneCourante[0];
|
$monId = $maLigneCourante[0];
|
||||||
$monNumLigne = $maLigneCourante[1];
|
$monCompte = GETPOST('codeventil'.$monId);
|
||||||
$monCompte = $mesCodesVentilChoisis[$monNumLigne];
|
|
||||||
|
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
if ($monCompte <= 0)
|
||||||
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
{
|
||||||
$sql .= " WHERE rowid = " . $monId;
|
$msg.= '<div><font color="red">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NoAccountSelected") . '</font></div>';
|
||||||
|
$ko++;
|
||||||
$accountventilated = new AccountingAccount($db);
|
|
||||||
$accountventilated->fetch($monCompte, '');
|
|
||||||
|
|
||||||
dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
|
|
||||||
if ($db->query($sql)) {
|
|
||||||
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
|
|
||||||
} else {
|
|
||||||
$msg.= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>';
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
$cpt ++;
|
{
|
||||||
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||||
|
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
||||||
|
$sql .= " WHERE rowid = " . $monId;
|
||||||
|
|
||||||
|
$accountventilated = new AccountingAccount($db);
|
||||||
|
$accountventilated->fetch($monCompte, '');
|
||||||
|
|
||||||
|
dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
|
||||||
|
if ($db->query($sql)) {
|
||||||
|
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
|
||||||
|
$ok++;
|
||||||
|
} else {
|
||||||
|
$msg.= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br> <pre>' . $sql . '</pre></font></div>';
|
||||||
|
$ko++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$cpt++;
|
||||||
}
|
}
|
||||||
|
$msg.='</div>';
|
||||||
} else {
|
} else {
|
||||||
$msg. '<div><font color="red">' . $langs->trans("AnyLineVentilate") . '</font></div>';
|
setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings');
|
||||||
}
|
}
|
||||||
$msg.= '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>';
|
$msg.= '<div>' . $langs->trans("EndProcessing") . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -152,36 +157,7 @@ if ($action == 'ventil' && ! empty($btn_ventil)) {
|
|||||||
|
|
||||||
llxHeader('', $langs->trans("Ventilation"));
|
llxHeader('', $langs->trans("Ventilation"));
|
||||||
|
|
||||||
print '<script type="text/javascript">
|
// Customer Invoice lines
|
||||||
$(function () {
|
|
||||||
$(\'#select-all\').click(function(event) {
|
|
||||||
// Iterate each checkbox
|
|
||||||
$(\':checkbox\').each(function() {
|
|
||||||
this.checked = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$(\'#unselect-all\').click(function(event) {
|
|
||||||
// Iterate each checkbox
|
|
||||||
$(\':checkbox\').each(function() {
|
|
||||||
this.checked = false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>';
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Customer Invoice lines
|
|
||||||
*/
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|
||||||
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
|
|
||||||
} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
} else {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$offset = $limit * $page;
|
|
||||||
|
|
||||||
$sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype, l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line,";
|
$sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype, l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line,";
|
||||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
|
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
|
||||||
$sql .= " aa.rowid as aarowid";
|
$sql .= " aa.rowid as aarowid";
|
||||||
@ -190,11 +166,9 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_fac
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||||
$sql .= " WHERE f.fk_statut > 0";
|
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
||||||
$sql .= " AND l.fk_code_ventilation <= 0";
|
|
||||||
$sql .= " AND product_type <= 2";
|
$sql .= " AND product_type <= 2";
|
||||||
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
|
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
|
||||||
|
|
||||||
// Add search filter like
|
// Add search filter like
|
||||||
if (strlen(trim($search_invoice))) {
|
if (strlen(trim($search_invoice))) {
|
||||||
$sql .= " AND (f.facnumber like '%" . $search_invoice . "%')";
|
$sql .= " AND (f.facnumber like '%" . $search_invoice . "%')";
|
||||||
@ -217,52 +191,72 @@ if (strlen(trim($search_account))) {
|
|||||||
if (strlen(trim($search_vat))) {
|
if (strlen(trim($search_vat))) {
|
||||||
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
|
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
|
||||||
}
|
}
|
||||||
|
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("/accountancy/customer/list.php", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num_lines = $db->num_rows($result);
|
$num_lines = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines, 0, 'title_accountancy');
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
|
||||||
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||||
|
print '<input type="hidden" name="action" value="ventil">';
|
||||||
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
$center='<div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil"></div>';
|
||||||
|
|
||||||
|
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
|
|
||||||
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
|
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
|
||||||
|
|
||||||
if ($msg) print $msg.'<br>';
|
if ($msg) print $msg.'<br>';
|
||||||
|
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
$moreforfilter = '';
|
||||||
print '<input type="hidden" name="action" value="ventil">';
|
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
|
print_liste_field_titre($langs->trans("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
|
||||||
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
|
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// We add search filter
|
// We add search filter
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_invoice" value="' . $search_invoice . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_invoice" value="' . $search_invoice . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_ref" value="' . $search_ref . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . $search_desc . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_desc" value="' . $search_desc . '"></td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="10" name="search_amount" value="' . $search_amount . '"></td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="10" name="search_amount" value="' . $search_amount . '"></td>';
|
||||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
@ -313,7 +307,7 @@ if ($result) {
|
|||||||
if ($objp->code_sell_l != $objp->code_sell_p)
|
if ($objp->code_sell_l != $objp->code_sell_p)
|
||||||
$code_sell_p_l_differ = 'color:red';
|
$code_sell_p_l_differ = 'color:red';
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr '. $bc[$var].'>';
|
||||||
|
|
||||||
// Ref Invoice
|
// Ref Invoice
|
||||||
$facture_static->ref = $objp->facnumber;
|
$facture_static->ref = $objp->facnumber;
|
||||||
@ -336,26 +330,34 @@ if ($result) {
|
|||||||
print '<td style="' . $code_sell_p_l_differ . '">' . dol_trunc($objp->product_label, 24) . '</td>';
|
print '<td style="' . $code_sell_p_l_differ . '">' . dol_trunc($objp->product_label, 24) . '</td>';
|
||||||
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
|
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
|
||||||
print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($objp->description, $trunclength)) . '</td>';
|
print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($objp->description, $trunclength)) . '</td>';
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print price($objp->total_ht);
|
print price($objp->total_ht);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Vat rate
|
||||||
if ($objp->vat_tx_l != $objp->vat_tx_p)
|
if ($objp->vat_tx_l != $objp->vat_tx_p)
|
||||||
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
||||||
print '<td style="' . $code_vat_differ . '" align="center">';
|
print '<td style="' . $code_vat_differ . '" align="right">';
|
||||||
print price($objp->tva_tx_line);
|
print price($objp->tva_tx_line);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center" style="' . $code_sell_p_notset . '">';
|
print '<td align="center" style="' . $code_sell_p_notset . '">';
|
||||||
if ($objp->code_sell_l == $objp->code_sell_p) {
|
if ($objp->code_sell_l == $objp->code_sell_p) {
|
||||||
print $objp->code_sell_l;
|
if ($objp->code_sell_l > 0) print $objp->code_sell_l;
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("Buy") . ' = ' . $objp->code_sell_l . '<br />' . $langs->trans("Sell") . ' = ' . $objp->code_sell_p;
|
print $langs->trans("Buy") . ' = ' . $objp->code_sell_l . '<br />' . $langs->trans("Sell") . ' = ' . $objp->code_sell_p;
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil[]', 1);
|
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Line id
|
||||||
print '<td align="center">' . $objp->rowid . '</td>';
|
print '<td align="center">' . $objp->rowid . '</td>';
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<input type="checkbox" class="checkforaction" name="mesCasesCochees[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
print '<input type="checkbox" class="checkforaction" name="mesCasesCochees[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -364,7 +366,6 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br><div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil"></div>';
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
@ -75,10 +75,6 @@ print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step,
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>');
|
|
||||||
print "<br>\n";
|
|
||||||
print "<br>\n";
|
|
||||||
$step++;
|
|
||||||
//$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>';
|
//$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>';
|
||||||
$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
|
$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
|
||||||
@ -121,6 +117,9 @@ print '<hr>';
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step = 0;
|
$step = 0;
|
||||||
|
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>')."<br>\n";
|
||||||
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|||||||
@ -109,9 +109,7 @@ $sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc on bu1.url_id=soc.rowid";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc on bu1.url_id=soc.rowid";
|
||||||
$sql .= " WHERE ba.rowid=" . $id_bank_account;
|
$sql .= " WHERE ba.rowid=" . $id_bank_account;
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= ' AND ba.entity IN ('.getEntity('banque', 0).')'; // We don't share object for accountancy
|
||||||
$sql .= " AND ba.entity = " . $conf->entity;
|
|
||||||
}
|
|
||||||
if ($date_start && $date_end)
|
if ($date_start && $date_end)
|
||||||
$sql .= " AND b.dateo >= '" . $db->idate($date_start) . "' AND b.dateo <= '" . $db->idate($date_end) . "'";
|
$sql .= " AND b.dateo >= '" . $db->idate($date_start) . "' AND b.dateo <= '" . $db->idate($date_end) . "'";
|
||||||
$sql .= " ORDER BY b.datev";
|
$sql .= " ORDER BY b.datev";
|
||||||
@ -407,9 +405,6 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
$bookkeeping->doc_ref = $objmid->facnumber;
|
$bookkeeping->doc_ref = $objmid->facnumber;
|
||||||
}
|
}
|
||||||
// FIXME Should be
|
|
||||||
//$bookkeeping->code_tiers = $k;
|
|
||||||
//$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
|
||||||
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
|
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
|
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
|
||||||
@ -425,13 +420,10 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
|
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
|
||||||
}
|
}
|
||||||
// FIXME Should be
|
|
||||||
//$bookkeeping->code_tiers = $k;
|
|
||||||
//$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
|
||||||
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
|
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
|
||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
} else {
|
} else {
|
||||||
// FIXME Should be a temporary account
|
// FIXME Should be a temporary account ???
|
||||||
$bookkeeping->doc_ref = $k;
|
$bookkeeping->doc_ref = $k;
|
||||||
//$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
//$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||||
$bookkeeping->numero_compte = 'CodeNotDef';
|
$bookkeeping->numero_compte = 'CodeNotDef';
|
||||||
@ -666,14 +658,17 @@ if (empty($action) || $action == 'view') {
|
|||||||
|
|
||||||
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
||||||
|
|
||||||
|
// TODO Avoid using js. We can use a direct link with $param
|
||||||
print '
|
print '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function launch_export() {
|
function launch_export() {
|
||||||
|
console.log("Set value into form and submit");
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
function writebookkeeping() {
|
function writebookkeeping() {
|
||||||
|
console.log("Set value into form and submit");
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||||
@ -758,12 +753,12 @@ if (empty($action) || $action == 'view') {
|
|||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||||
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
print "<td><!-- Bank --></td>";
|
print "<td><!-- Bank bank.rowid=".$key."--></td>";
|
||||||
print "<td>" . $date . "</td>";
|
print "<td>" . $date . "</td>";
|
||||||
print "<td>" . $ref . "</td>";
|
print "<td>" . $ref . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accountg($k);
|
$accountoshow = length_accountg($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("BankAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("BankAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
@ -785,12 +780,12 @@ if (empty($action) || $action == 'view') {
|
|||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||||
if ($k != 'type') {
|
if ($k != 'type') {
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
print "<td><!-- Thirdparty --></td>";
|
print "<td><!-- Thirdparty bank.rowid=".$key." --></td>";
|
||||||
print "<td>" . $date . "</td>";
|
print "<td>" . $date . "</td>";
|
||||||
print "<td>" . $ref . "</td>";
|
print "<td>" . $ref . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accounta($k);
|
$accountoshow = length_accounta($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
@ -806,11 +801,15 @@ if (empty($action) || $action == 'view') {
|
|||||||
} else {
|
} else {
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
print "<td><!-- Wait --></td>";
|
print "<td><!-- Wait bank.rowid=".$key." --></td>";
|
||||||
print "<td>" . $date . "</td>";
|
print "<td>" . $date . "</td>";
|
||||||
print "<td>" . $ref . "</td>";
|
print "<td>" . $ref . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) .
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
|
{
|
||||||
|
print '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
|
||||||
|
}
|
||||||
|
else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) .
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "<td>" . $reflabel . "</td>";
|
print "<td>" . $reflabel . "</td>";
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
|
|||||||
@ -96,9 +96,7 @@ $sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_factu
|
|||||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||||
$sql .= " WHERE f.fk_statut > 0 ";
|
$sql .= " WHERE f.fk_statut > 0 ";
|
||||||
$sql .= " AND fd.fk_code_ventilation > 0 ";
|
$sql .= " AND fd.fk_code_ventilation > 0 ";
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 1) . ")";
|
|
||||||
}
|
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
|
||||||
$sql .= " AND f.type IN (0,1,2)";
|
$sql .= " AND f.type IN (0,1,2)";
|
||||||
else
|
else
|
||||||
@ -529,7 +527,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accountg($k);
|
$accountoshow = length_accountg($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("ProductAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("ProductAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
@ -553,7 +551,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accountg($k);
|
$accountoshow = length_accountg($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("VatAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("VatAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
@ -576,7 +574,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accounta($k);
|
$accountoshow = length_accounta($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,9 +99,7 @@ $sql .= " JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
|||||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
||||||
$sql .= " WHERE fd.fk_code_ventilation > 0";
|
$sql .= " WHERE fd.fk_code_ventilation > 0";
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
|
||||||
}
|
|
||||||
$sql .= " AND f.fk_statut > 0";
|
$sql .= " AND f.fk_statut > 0";
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||||
@ -544,7 +542,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accounta($k);
|
$accountoshow = length_accounta($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
@ -570,7 +568,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accountg($k);
|
$accountoshow = length_accountg($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("ProductNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("ProductNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
@ -593,7 +591,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accountg($k);
|
$accountoshow = length_accountg($k);
|
||||||
if ($accountoshow == 'NotDefined')
|
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,23 +44,35 @@ $id = GETPOST('id');
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||||
if (! GETPOST('cancel', 'alpha')) {
|
if (! GETPOST('cancel', 'alpha')) {
|
||||||
|
if ($codeventil < 0) $codeventil = 0;
|
||||||
|
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
||||||
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
||||||
$sql .= " WHERE rowid = " . $id;
|
$sql .= " WHERE rowid = " . $id;
|
||||||
|
|
||||||
dol_syslog('accountancy/supplier/card.php:: $sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
setEventMessages($db->lasterror(), null, 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
header("Location: ./lines.php");
|
header("Location: ./lines.php");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -70,9 +82,7 @@ if ($cancel == $langs->trans("Cancel")) {
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Create
|
||||||
* Create
|
|
||||||
*/
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$facturefournisseur_static = new FactureFournisseur($db);
|
$facturefournisseur_static = new FactureFournisseur($db);
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
@ -86,9 +96,7 @@ if (! empty($id)) {
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
|
||||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog("/accounting/supplier/card.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("/accounting/supplier/card.php sql=" . $sql, LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -41,7 +41,7 @@ if (empty($conf->accounting->enabled)) {
|
|||||||
}
|
}
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
@ -194,10 +194,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid
|
|||||||
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
$sql .= " AND ff.fk_statut > 0 ";
|
$sql .= " AND ff.fk_statut > 0 ";
|
||||||
|
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
|
||||||
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
@ -242,10 +239,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd
|
|||||||
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||||
$sql .= " AND ff.fk_statut > 0 ";
|
$sql .= " AND ff.fk_statut > 0 ";
|
||||||
|
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
|
||||||
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -51,36 +51,27 @@ $search_amount = GETPOST('search_amount', 'alpha');
|
|||||||
$search_account = GETPOST('search_account', 'alpha');
|
$search_account = GETPOST('search_account', 'alpha');
|
||||||
$search_vat = GETPOST('search_vat', 'alpha');
|
$search_vat = GETPOST('search_vat', 'alpha');
|
||||||
|
|
||||||
// Getpost Order and column and limit page
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOST('page', 'int');
|
$page = GETPOST('page', 'int');
|
||||||
|
if ($page < 0) $page = 0;
|
||||||
if ($page < 0)
|
|
||||||
$page = 0;
|
|
||||||
$offset = $conf->liste_limit * $page;
|
$offset = $conf->liste_limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|
||||||
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
|
|
||||||
} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
} else {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
}
|
|
||||||
if (! $sortfield)
|
if (! $sortfield)
|
||||||
$sortfield = "f.datef, f.ref, l.rowid";
|
$sortfield = "f.datef, f.ref, l.rowid";
|
||||||
|
|
||||||
if (! $sortorder) {
|
if (! $sortorder) {
|
||||||
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
|
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
|
||||||
$sortorder = " DESC ";
|
$sortorder = "DESC";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
@ -124,6 +115,8 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessages($db->lasterror(), null, 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$account_parent = ''; // Protection to avoid to mass apply it a second time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -182,39 +175,67 @@ if (strlen(trim($search_account))) {
|
|||||||
if (strlen(trim($search_vat))) {
|
if (strlen(trim($search_vat))) {
|
||||||
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
|
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
|
||||||
}
|
}
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 1) . ")";
|
|
||||||
}
|
|
||||||
// Count total nb of records with no order and no limits
|
|
||||||
$nbtotalofrecords = 0;
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
$nbtotalofrecords = $db->num_rows($resql);
|
|
||||||
else
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
dol_syslog('accountancy/supplier/lines.php::list sql= ' . $sql1);
|
dol_syslog('accountancy/supplier/lines.php::list');
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num_lines = $db->num_rows($result);
|
$num_lines = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy');
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
if ($search_invoice)
|
||||||
|
$param .= "&search_invoice=" . $search_invoice;
|
||||||
|
if ($search_ref)
|
||||||
|
$param .= "&search_ref=" . $search_ref;
|
||||||
|
if ($search_label)
|
||||||
|
$param .= "&search_label=" . $search_label;
|
||||||
|
if ($search_desc)
|
||||||
|
$param .= "&search_desc=" . $search_desc;
|
||||||
|
if ($search_account)
|
||||||
|
$param .= "&search_account=" . $search_account;
|
||||||
|
if ($search_vat)
|
||||||
|
$param .= "&search_vat=" . $search_vat;
|
||||||
|
if ($search_country)
|
||||||
|
$param .= "&search_country=" . $search_country;
|
||||||
|
if ($search_tvaintra)
|
||||||
|
$param .= "&search_tvaintra=" . $search_tvaintra;
|
||||||
|
|
||||||
print '<td align="left"><b>' . $langs->trans("DescVentilDoneSupplier") . '</b></td>';
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||||
|
print '<input type="hidden" name="action" value="ventil">';
|
||||||
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
|
|
||||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
print $langs->trans("DescVentilDoneSupplier") . '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
|
|
||||||
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
||||||
print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
|
print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
|
||||||
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
|
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
|
||||||
|
|
||||||
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
@ -223,7 +244,7 @@ if ($result) {
|
|||||||
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -233,9 +254,10 @@ if ($result) {
|
|||||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '"></td>';
|
||||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
||||||
print '<td class="liste_titre" colspan="2"> </td>';
|
print '<td class="liste_titre" align="right"></td>';
|
||||||
|
print '<td class="liste_titre" align="right"></td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(1);
|
$searchpitco=$form->showFilterAndCheckAddButtons(1);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
@ -251,7 +273,7 @@ if ($result) {
|
|||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
|
$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr '. $bc[$var].'>';
|
||||||
|
|
||||||
// Ref Invoice
|
// Ref Invoice
|
||||||
$facturefournisseur_static->ref = $objp->facnumber;
|
$facturefournisseur_static->ref = $objp->facnumber;
|
||||||
@ -262,6 +284,7 @@ if ($result) {
|
|||||||
$product_static->ref = $objp->product_ref;
|
$product_static->ref = $objp->product_ref;
|
||||||
$product_static->id = $objp->product_id;
|
$product_static->id = $objp->product_id;
|
||||||
$product_static->type = $objp->type;
|
$product_static->type = $objp->type;
|
||||||
|
$product_static->label = $objp->product_label;
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($product_static->id)
|
if ($product_static->id)
|
||||||
print $product_static->getNomUrl(1);
|
print $product_static->getNomUrl(1);
|
||||||
@ -288,7 +311,14 @@ if ($result) {
|
|||||||
print $db->error();
|
print $db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table></form>";
|
print "</table>";
|
||||||
|
|
||||||
|
if ($nbtotalofrecords > $limit) {
|
||||||
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
|
||||||
|
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.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
|
||||||
@ -43,7 +44,6 @@ $langs->load("accountancy");
|
|||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
|
|
||||||
// Select Box
|
// Select Box
|
||||||
$codeventil = GETPOST('codeventil', 'array');
|
|
||||||
$mesCasesCochees = GETPOST('mesCasesCochees', 'array');
|
$mesCasesCochees = GETPOST('mesCasesCochees', 'array');
|
||||||
|
|
||||||
// Search Getpost
|
// Search Getpost
|
||||||
@ -56,35 +56,27 @@ $search_account = GETPOST('search_account', 'alpha');
|
|||||||
$search_vat = GETPOST('search_vat', 'alpha');
|
$search_vat = GETPOST('search_vat', 'alpha');
|
||||||
$btn_ventil = GETPOST('ventil', 'alpha');
|
$btn_ventil = GETPOST('ventil', 'alpha');
|
||||||
|
|
||||||
// Getpost Order and column and limit page
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
|
$page = GETPOST('page','int');
|
||||||
$page = GETPOST('page');
|
if ($page < 0) { $page = 0; }
|
||||||
if ($page < 0)
|
|
||||||
$page = 0;
|
|
||||||
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|
||||||
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
|
|
||||||
} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
} else {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
}
|
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
if (! $sortfield)
|
if (! $sortfield)
|
||||||
$sortfield = "f.datef, f.ref, l.rowid";
|
$sortfield = "f.datef, f.ref, l.rowid";
|
||||||
if (! $sortorder) {
|
if (! $sortorder) {
|
||||||
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
||||||
$sortorder = " DESC ";
|
$sortorder = "DESC";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
@ -104,7 +96,7 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUN
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Purge search criteria
|
// Purge search criteria
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_ref = '';
|
$search_ref = '';
|
||||||
$search_label = '';
|
$search_label = '';
|
||||||
@ -117,38 +109,51 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
|||||||
if ($action == 'ventil' && ! empty($btn_ventil)) {
|
if ($action == 'ventil' && ! empty($btn_ventil)) {
|
||||||
$msg='';
|
$msg='';
|
||||||
//print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>';
|
//print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>';
|
||||||
if ($_POST['codeventil'] && $_POST["mesCasesCochees"]) {
|
if (! empty($mesCasesCochees)) {
|
||||||
$msg = '<div><font color="red">' . count($_POST["mesCasesCochees"]) . ' ' . $langs->trans("SelectedLines") . '</font></div>';
|
$msg = '<div>' . $langs->trans("SelectedLines") . ': '.count($_POST["mesCasesCochees"]).'</div>';
|
||||||
|
$msg.='<div class="detail">';
|
||||||
$mesCodesVentilChoisis = $codeventil;
|
$mesCodesVentilChoisis = $codeventil;
|
||||||
$cpt = 0;
|
$cpt = 0;
|
||||||
|
$ok=0;
|
||||||
|
$ko=0;
|
||||||
|
|
||||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
||||||
// print '<div><font color="red">id selectionnee : '.$monChoix."</font></div>";
|
// print '<div><font color="red">id selectionnee : '.$monChoix."</font></div>";
|
||||||
$maLigneCourante = explode("_", $maLigneCochee);
|
$maLigneCourante = explode("_", $maLigneCochee);
|
||||||
$monId = $maLigneCourante[0];
|
$monId = $maLigneCourante[0];
|
||||||
$monNumLigne = $maLigneCourante[1];
|
$monCompte = GETPOST('codeventil'.$monId);
|
||||||
$monCompte = $mesCodesVentilChoisis[$monNumLigne];
|
|
||||||
|
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
if ($monCompte <= 0)
|
||||||
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
{
|
||||||
$sql .= " WHERE rowid = " . $monId;
|
$msg.= '<div><font color="red">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NoAccountSelected") . '</font></div>';
|
||||||
|
$ko++;
|
||||||
$accountventilated = new AccountingAccount($db);
|
|
||||||
$accountventilated->fetch($monCompte, '');
|
|
||||||
|
|
||||||
dol_syslog('accountancy/supplier/list.php:: sql=' . $sql, LOG_DEBUG);
|
|
||||||
if ($db->query($sql)) {
|
|
||||||
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
|
|
||||||
} else {
|
|
||||||
$msg.= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>';
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
$cpt ++;
|
{
|
||||||
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
||||||
|
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
||||||
|
$sql .= " WHERE rowid = " . $monId;
|
||||||
|
|
||||||
|
$accountventilated = new AccountingAccount($db);
|
||||||
|
$accountventilated->fetch($monCompte, '');
|
||||||
|
|
||||||
|
dol_syslog('accountancy/supplier/list.php:: sql=' . $sql, LOG_DEBUG);
|
||||||
|
if ($db->query($sql)) {
|
||||||
|
$ok++;
|
||||||
|
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
|
||||||
|
} else {
|
||||||
|
$ko++;
|
||||||
|
$msg.= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$cpt++;
|
||||||
}
|
}
|
||||||
|
$msg.='</div>';
|
||||||
} else {
|
} else {
|
||||||
$msg.= '<div><font color="red">' . $langs->trans("AnyLineVentilate") . '</font></div>';
|
setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings');
|
||||||
}
|
}
|
||||||
$msg.= '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>';
|
$msg.= '<div>' . $langs->trans("EndProcessing") . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -158,37 +163,7 @@ if ($action == 'ventil' && ! empty($btn_ventil)) {
|
|||||||
*/
|
*/
|
||||||
llxHeader('', $langs->trans("SuppliersVentilation"));
|
llxHeader('', $langs->trans("SuppliersVentilation"));
|
||||||
|
|
||||||
print '<script type="text/javascript">
|
// Supplier Invoice Lines
|
||||||
$(function () {
|
|
||||||
$(\'#select-all\').click(function(event) {
|
|
||||||
// Iterate each checkbox
|
|
||||||
$(\':checkbox\').each(function() {
|
|
||||||
this.checked = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$(\'#unselect-all\').click(function(event) {
|
|
||||||
// Iterate each checkbox
|
|
||||||
$(\':checkbox\').each(function() {
|
|
||||||
this.checked = false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Supplier Invoice Lines
|
|
||||||
*/
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|
||||||
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
|
|
||||||
} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
} else {
|
|
||||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$offset = $limit * $page;
|
|
||||||
|
|
||||||
$sql = "SELECT f.ref, f.rowid as facid, f.ref_supplier, f.datef, l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, ";
|
$sql = "SELECT f.ref, f.rowid as facid, f.ref_supplier, f.datef, l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, ";
|
||||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod";
|
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod";
|
||||||
$sql .= " , aa.rowid as aarowid";
|
$sql .= " , aa.rowid as aarowid";
|
||||||
@ -197,7 +172,7 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l
|
|||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||||
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
|
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
||||||
$sql .= " AND product_type <= 2";
|
$sql .= " AND product_type <= 2";
|
||||||
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_buy ='')";
|
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_buy ='')";
|
||||||
// Add search filter like
|
// Add search filter like
|
||||||
@ -222,53 +197,73 @@ if (strlen(trim($search_account))) {
|
|||||||
if (strlen(trim($search_vat))) {
|
if (strlen(trim($search_vat))) {
|
||||||
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
|
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
|
||||||
}
|
}
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
|
||||||
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 1) . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
dol_syslog('accountancy/supplier/list.php:: $sql=' . $sql);
|
dol_syslog('accountancy/supplier/list.php');
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num_lines = $db->num_rows($result);
|
$num_lines = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
// TODO : print_barre_liste always use $conf->liste_limit and do not care about custom limit in list...
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines, 0, 'title_accountancy');
|
|
||||||
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
|
||||||
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||||
|
print '<input type="hidden" name="action" value="ventil">';
|
||||||
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
$center='<div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil"></div>';
|
||||||
|
|
||||||
|
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num_lines, 0, 'title_accountancy', 0, '', '', $limit);
|
||||||
|
|
||||||
if ($msg) print $msg.'<br>';
|
if ($msg) print $msg.'<br>';
|
||||||
|
|
||||||
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
|
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
|
||||||
|
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
$moreforfilter = '';
|
||||||
print '<input type="hidden" name="action" value="ventil">';
|
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("AccountAccounting"), '', '', '', '', 'align="center"');
|
print_liste_field_titre($langs->trans("AccountAccounting"), '', '', '', '', 'align="center"');
|
||||||
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
|
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_invoice" value="' . $search_invoice . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_invoice" value="' . $search_invoice . '"></td>';
|
||||||
print '<td class="liste_titre">%<input type="text" class="flat" size="15" name="search_ref" value="' . $search_ref . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . $search_desc . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_desc" value="' . $search_desc . '"></td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="10" name="search_amount" value="' . $search_amount . '"></td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
||||||
print '<td class="liste_titre" align="center">%<input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '"></td>';
|
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '"></td>';
|
||||||
print '<td class="liste_titre" align="center"> </td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td align="right" class="liste_titre">';
|
print '<td align="right" class="liste_titre">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(1);
|
$searchpitco=$form->showFilterAndCheckAddButtons(1);
|
||||||
@ -322,7 +317,7 @@ if ($result) {
|
|||||||
if ($objp->code_buy_l != $objp->code_buy_p)
|
if ($objp->code_buy_l != $objp->code_buy_p)
|
||||||
$code_buy_p_l_differ = 'color:red';
|
$code_buy_p_l_differ = 'color:red';
|
||||||
|
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr '. $bc[$var].'>';
|
||||||
|
|
||||||
// Ref Invoice
|
// Ref Invoice
|
||||||
$facturefourn_static->ref = $objp->ref;
|
$facturefourn_static->ref = $objp->ref;
|
||||||
@ -350,26 +345,31 @@ if ($result) {
|
|||||||
print price($objp->price);
|
print price($objp->price);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Vat rate
|
||||||
if ($objp->vat_tx_l != $objp->vat_tx_p)
|
if ($objp->vat_tx_l != $objp->vat_tx_p)
|
||||||
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
||||||
print '<td style="' . $code_vat_differ . '" align="center">';
|
print '<td style="' . $code_vat_differ . '" align="right">';
|
||||||
print price($objp->tva_tx_line);
|
print price($objp->tva_tx_line);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center" style="' . $code_buy_p_notset . '">';
|
print '<td align="center" style="' . $code_buy_p_notset . '">';
|
||||||
// if not same kind of product_type stored in product & facturedt we display both account and let user choose
|
// if not same kind of product_type stored in product & facturedet we display both account and let user choose
|
||||||
if ($objp->code_buy_l == $objp->code_buy_p) {
|
if ($objp->code_buy_l == $objp->code_buy_p) {
|
||||||
print $objp->code_buy_l;
|
if ($objp->code_buy_l > 0) print $objp->code_buy_l;
|
||||||
} else {
|
else print $langs->trans("Unknown");
|
||||||
|
} else { // This can happen if user has change type of product after creation of invoice
|
||||||
print 'lines=' . $objp->code_buy_l . '<br />product=' . $objp->code_buy_p;
|
print 'lines=' . $objp->code_buy_l . '<br />product=' . $objp->code_buy_p;
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Colonne choix du compte
|
// Colonne choix du compte
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil[]', 1);
|
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Line id
|
||||||
print '<td align="center">' . $objp->rowid . '</td>';
|
print '<td align="center">' . $objp->rowid . '</td>';
|
||||||
|
|
||||||
// Colonne choix ligne a ventiler
|
// Colonne choix ligne a ventiler
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<input type="checkbox" class="checkforaction" name="mesCasesCochees[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
print '<input type="checkbox" class="checkforaction" name="mesCasesCochees[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||||
@ -380,7 +380,6 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br><div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil" ></div>';
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
@ -158,6 +158,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
$modulepart = 'member';
|
$modulepart = 'member';
|
||||||
$permission = $user->rights->adherent->creer;
|
$permission = $user->rights->adherent->creer;
|
||||||
|
$permtoedit = $user->rights->adherent->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
print "<br><br>";
|
print "<br><br>";
|
||||||
|
|||||||
@ -262,23 +262,6 @@ if ($action == 'setforcedate')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'set_INVOICE_AUTO_FILLJS')
|
|
||||||
{
|
|
||||||
$freetext = GETPOST('INVOICE_AUTO_FILLJS'); // No alpha here, we want exact string
|
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "INVOICE_AUTO_FILLJS",$freetext,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -750,20 +733,6 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" /
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Add js auto fill amount on paiement form
|
|
||||||
$var=! $var;
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
|
||||||
print '<input type="hidden" name="action" value="set_INVOICE_AUTO_FILLJS" />';
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("JSOnPaimentBill");
|
|
||||||
print '</td><td width="60" align="center">';
|
|
||||||
print $form->selectyesno("INVOICE_AUTO_FILLJS",$conf->global->INVOICE_AUTO_FILLJS,1);
|
|
||||||
print '</td><td align="right">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
|
||||||
print "</td></tr>\n";
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
|
|||||||
@ -77,6 +77,7 @@ if ($action == 'update' && empty($_POST["cancel"]))
|
|||||||
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO"),'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO"),'chaine',0,'',$conf->entity);
|
||||||
|
dolibarr_set_const($db, 'MAIN_MAIL_DEFAULT_FROMTYPE',GETPOST('MAIN_MAIL_DEFAULT_FROMTYPE'),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||||
exit;
|
exit;
|
||||||
@ -392,13 +393,27 @@ if ($action == 'edit')
|
|||||||
// Separator
|
// Separator
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td colspan="2"> </td></tr>';
|
print '<tr '.$bc[$var].'><td colspan="2"> </td></tr>';
|
||||||
|
|
||||||
// From
|
// From
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'</td>';
|
||||||
print '<td><input class="flat" name="MAIN_MAIL_EMAIL_FROM" size="32" value="' . (! empty($conf->global->MAIN_MAIL_EMAIL_FROM)?$conf->global->MAIN_MAIL_EMAIL_FROM:'');
|
print '<td><input class="flat" name="MAIN_MAIL_EMAIL_FROM" size="32" value="' . (! empty($conf->global->MAIN_MAIL_EMAIL_FROM)?$conf->global->MAIN_MAIL_EMAIL_FROM:'');
|
||||||
print '"></td></tr>';
|
print '"></td></tr>';
|
||||||
|
|
||||||
|
// Default from type
|
||||||
|
$var=!$var;
|
||||||
|
$liste = array();
|
||||||
|
$liste['user'] = $langs->trans('UserEmail');
|
||||||
|
$liste['company'] = $langs->trans('CompanyEmail');
|
||||||
|
|
||||||
|
print '<tr '.$bc[$var?1:0].'><td>'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').'</td><td>';
|
||||||
|
print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE',$liste,$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE,0);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Separator
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td colspan="2"> </td></tr>';
|
||||||
|
|
||||||
// From
|
// From
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
||||||
@ -410,13 +425,14 @@ if ($action == 'edit')
|
|||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'</td>';
|
||||||
print '<td><input class="flat" name="MAIN_MAIL_AUTOCOPY_TO" size="32" value="' . (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)?$conf->global->MAIN_MAIL_AUTOCOPY_TO:'');
|
print '<td><input class="flat" name="MAIN_MAIL_AUTOCOPY_TO" size="32" value="' . (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)?$conf->global->MAIN_MAIL_AUTOCOPY_TO:'');
|
||||||
print '"></td></tr>';
|
print '"></td></tr>';
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '<br><div class="center">';
|
print '</table>';
|
||||||
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
|
||||||
print ' ';
|
print '<br><div class="center">';
|
||||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||||
print '</div>';
|
print ' ';
|
||||||
|
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
@ -518,7 +534,22 @@ else
|
|||||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_FROM) && ! isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail"));
|
if (! empty($conf->global->MAIN_MAIL_EMAIL_FROM) && ! isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Errors To
|
// Default from type
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var?1:0].'><td>'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').'</td>';
|
||||||
|
print '<td>';
|
||||||
|
if($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user'){
|
||||||
|
print $langs->trans('UserEmail');
|
||||||
|
} else {
|
||||||
|
print $langs->trans('CompanyEmail');
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Separator
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td colspan="2"> </td></tr>';
|
||||||
|
|
||||||
|
// Errors To
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
||||||
print '<td>'.$conf->global->MAIN_MAIL_ERRORS_TO;
|
print '<td>'.$conf->global->MAIN_MAIL_ERRORS_TO;
|
||||||
@ -540,6 +571,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA))
|
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA))
|
||||||
@ -559,6 +591,7 @@ else
|
|||||||
print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA"));
|
print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Boutons actions
|
// Boutons actions
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ if ($action == 'setmod')
|
|||||||
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS')
|
if ($action == 'setparams')
|
||||||
{
|
{
|
||||||
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS'); // No alpha here, we want exact string
|
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS'); // No alpha here, we want exact string
|
||||||
|
|
||||||
@ -77,16 +77,31 @@ if ($action == 'set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS')
|
|||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if ($error)
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
$freetext = GETPOST('INVOICE_AUTO_FILLJS'); // No alpha here, we want exact string
|
||||||
|
|
||||||
|
$res = dolibarr_set_const($db, "INVOICE_AUTO_FILLJS",$freetext,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if ($error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -235,6 +250,10 @@ print "<br />";
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
|
print '<input type="hidden" name="action" value="setparams" />';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
@ -244,20 +263,32 @@ print "</tr>\n";
|
|||||||
|
|
||||||
// Allow payments on different thirdparties bills but same parent company
|
// Allow payments on different thirdparties bills but same parent company
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
|
||||||
print '<input type="hidden" name="action" value="set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS" />';
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("PaymentOnDifferentThirdBills");
|
print $langs->trans("PaymentOnDifferentThirdBills");
|
||||||
print '</td><td width="60" align="center">';
|
print '</td><td width="60" align="center">';
|
||||||
print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS,1);
|
print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS,1);
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '</form>';
|
|
||||||
|
// Add js auto fill amount on paiement form
|
||||||
|
/* always on now
|
||||||
|
$var=! $var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("JSOnPaimentBill");
|
||||||
|
print '</td><td width="60" align="center">';
|
||||||
|
print $form->selectyesno("INVOICE_AUTO_FILLJS",$conf->global->INVOICE_AUTO_FILLJS,1);
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print "</td></tr>\n";
|
||||||
|
*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '<center>';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||||
|
print '</center>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2421,10 +2421,12 @@ if ($action == 'create')
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='pro'.$object->id;
|
$formmail->trackid='pro'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -133,6 +133,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
$modulepart = 'propal';
|
$modulepart = 'propal';
|
||||||
$permission = $user->rights->propal->creer;
|
$permission = $user->rights->propal->creer;
|
||||||
|
$permtoedit = $user->rights->propal->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -441,10 +441,12 @@ if ($resql)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->withform=-1;
|
$formmail->withform=-1;
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set
|
||||||
{
|
{
|
||||||
$formmail->trackid='ord'.$object->id;
|
$formmail->trackid='ord'.$object->id;
|
||||||
|
|||||||
@ -2629,10 +2629,12 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='ord'.$object->id;
|
$formmail->trackid='ord'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -121,6 +121,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$modulepart = 'commande';
|
$modulepart = 'commande';
|
||||||
$permission = $user->rights->commande->creer;
|
$permission = $user->rights->commande->creer;
|
||||||
|
$permtoedit = $user->rights->commande->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -469,10 +469,12 @@ if ($resql)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->withform=-1;
|
$formmail->withform=-1;
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set
|
||||||
{
|
{
|
||||||
$formmail->trackid='ord'.$object->id;
|
$formmail->trackid='ord'.$object->id;
|
||||||
|
|||||||
@ -217,6 +217,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Header('Location: index.php');
|
Header('Location: index.php');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4108,10 +4108,12 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='inv'.$object->id;
|
$formmail->trackid='inv'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -149,6 +149,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$modulepart = 'facture';
|
$modulepart = 'facture';
|
||||||
$permission = $user->rights->facture->creer;
|
$permission = $user->rights->facture->creer;
|
||||||
|
$permtoedit = $user->rights->facture->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -278,7 +278,7 @@ if ($search_user > 0)
|
|||||||
$sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc";
|
$sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc";
|
||||||
}
|
}
|
||||||
$sql.= ' WHERE f.fk_soc = s.rowid';
|
$sql.= ' WHERE f.fk_soc = s.rowid';
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= ' AND f.entity IN ('.getEntity('facture', 1).')';
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category;
|
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category;
|
||||||
if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
|
if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
|
||||||
@ -520,10 +520,12 @@ if ($resql)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->withform=-1;
|
$formmail->withform=-1;
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set
|
||||||
{
|
{
|
||||||
$formmail->trackid='inv'.$object->id;
|
$formmail->trackid='inv'.$object->id;
|
||||||
|
|||||||
@ -38,6 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
|||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('banks');
|
$langs->load('banks');
|
||||||
|
$langs->load('multicurrency');
|
||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
@ -433,7 +434,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
';
|
';
|
||||||
|
|
||||||
print ' });'."\n";
|
print ' });'."\n";
|
||||||
if(!empty($conf->global->INVOICE_AUTO_FILLJS)){
|
if (!empty($conf->use_javascript_ajax)){
|
||||||
//Add js for AutoFill
|
//Add js for AutoFill
|
||||||
print ' $(document).ready(function () {';
|
print ' $(document).ready(function () {';
|
||||||
print ' $(".AutoFillAmout").on(\'click touchstart\', function(){
|
print ' $(".AutoFillAmout").on(\'click touchstart\', function(){
|
||||||
@ -515,10 +516,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List of unpaid invoices
|
* List of unpaid invoices
|
||||||
*/
|
*/
|
||||||
$sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.multicurrency_total_ttc, f.type, ';
|
|
||||||
|
$sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.multicurrency_code, f.multicurrency_total_ttc, f.type, ';
|
||||||
$sql.= ' f.datef as df, f.fk_soc as socid';
|
$sql.= ' f.datef as df, f.fk_soc as socid';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
||||||
|
|
||||||
@ -572,12 +575,13 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$arraytitle.'</td>';
|
print '<td>'.$arraytitle.'</td>';
|
||||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('AmountTTC').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||||
print '<td align="right">'.$alreadypayedlabel.'</td>';
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$multicurrencyalreadypayedlabel.'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$multicurrencyalreadypayedlabel.'</td>';
|
||||||
print '<td align="right">'.$remaindertopay.'</td>';
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$multicurrencyremaindertopay.'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$multicurrencyremaindertopay.'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans('AmountTTC').'</td>';
|
||||||
|
print '<td align="right">'.$alreadypayedlabel.'</td>';
|
||||||
|
print '<td align="right">'.$remaindertopay.'</td>';
|
||||||
print '<td align="right">'.$langs->trans('PaymentAmount').'</td>';
|
print '<td align="right">'.$langs->trans('PaymentAmount').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td align="right"> </td>';
|
||||||
@ -624,12 +628,35 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($objp->df),'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($objp->df),'day')."</td>\n";
|
||||||
|
|
||||||
// Price
|
// Currency
|
||||||
print '<td align="right">'.price($sign * $objp->total_ttc).'</td>';
|
print '<td align="center">'.$objp->multicurrency_code."</td>\n";
|
||||||
|
|
||||||
// Multicurrency Price
|
// Multicurrency Price
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.price($sign * $objp->multicurrency_total_ttc).'</td>';
|
if (!empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $objp->multicurrency_total_ttc);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
// Multicurrency Price
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
|
{
|
||||||
|
print price($sign * $multicurrency_payment);
|
||||||
|
if ($multicurrency_creditnotes) print '+'.price($multicurrency_creditnotes);
|
||||||
|
if ($multicurrency_deposits) print '+'.price($multicurrency_deposits);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
// Multicurrency Price
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $multicurrency_remaintopay);
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Price
|
||||||
|
print '<td align="right">'.price($sign * $objp->total_ttc).'</td>';
|
||||||
|
|
||||||
// Received or paid back
|
// Received or paid back
|
||||||
print '<td align="right">'.price($sign * $paiement);
|
print '<td align="right">'.price($sign * $paiement);
|
||||||
@ -637,25 +664,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
if ($deposits) print '+'.price($deposits);
|
if ($deposits) print '+'.price($deposits);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Multicurrency Price
|
|
||||||
if (!empty($conf->multicurrency->enabled))
|
|
||||||
{
|
|
||||||
print '<td align="right">'.price($sign * $multicurrency_payment);
|
|
||||||
if ($multicurrency_creditnotes) print '+'.price($multicurrency_creditnotes);
|
|
||||||
if ($multicurrency_deposits) print '+'.price($multicurrency_deposits);
|
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remain to take or to pay back
|
// Remain to take or to pay back
|
||||||
print '<td align="right">'.price($sign * $remaintopay).'</td>';
|
print '<td align="right">'.price($sign * $remaintopay).'</td>';
|
||||||
//$test= price(price2num($objp->total_ttc - $paiement - $creditnotes - $deposits));
|
//$test= price(price2num($objp->total_ttc - $paiement - $creditnotes - $deposits));
|
||||||
|
|
||||||
// Multicurrency Price
|
|
||||||
if (!empty($conf->multicurrency->enabled))
|
|
||||||
{
|
|
||||||
print '<td align="right">'.price($sign * $multicurrency_remaintopay).'</td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
|
|
||||||
@ -665,7 +677,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
if ($action != 'add_paiement')
|
if ($action != 'add_paiement')
|
||||||
{
|
{
|
||||||
if(!empty($conf->global->INVOICE_AUTO_FILLJS))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'");
|
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'");
|
||||||
print '<input type=hidden class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
print '<input type=hidden class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||||
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
||||||
@ -678,7 +690,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
// Multicurrency Price
|
// Multicurrency Price
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (! empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
|
|
||||||
@ -686,17 +698,20 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$namef = 'multicurrency_amount_'.$objp->facid;
|
$namef = 'multicurrency_amount_'.$objp->facid;
|
||||||
$nameRemain = 'multicurrency_remain_'.$objp->facid;
|
$nameRemain = 'multicurrency_remain_'.$objp->facid;
|
||||||
|
|
||||||
if ($action != 'add_paiement')
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
{
|
{
|
||||||
if(!empty($conf->global->INVOICE_AUTO_FILLJS))
|
if ($action != 'add_paiement')
|
||||||
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'");
|
{
|
||||||
print '<input type=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
|
if (!empty($conf->use_javascript_ajax))
|
||||||
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'");
|
||||||
}
|
print '<input type=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
|
||||||
else
|
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
||||||
{
|
}
|
||||||
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.$_POST[$namef].'" disabled>';
|
else
|
||||||
print '<input type="hidden" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
{
|
||||||
|
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.$_POST[$namef].'" disabled>';
|
||||||
|
print '<input type="hidden" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
@ -727,16 +742,16 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
// Print total
|
// Print total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="2" align="left">'.$langs->trans('TotalTTC').'</td>';
|
print '<td colspan="3" align="left">'.$langs->trans('TotalTTC').'</td>';
|
||||||
print '<td align="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td></td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td></td>';
|
||||||
|
if (!empty($conf->multicurrency->enabled)) print '<td></td>';
|
||||||
|
if (!empty($conf->multicurrency->enabled)) print '<td></td>';
|
||||||
|
print '<td align="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
||||||
print '<td align="right"><b>'.price($sign * $totalrecu);
|
print '<td align="right"><b>'.price($sign * $totalrecu);
|
||||||
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||||
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
||||||
print '</b></td>';
|
print '</b></td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td></td>';
|
|
||||||
print '<td align="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits,'MT')).'</b></td>';
|
print '<td align="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits,'MT')).'</b></td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td></td>';
|
|
||||||
print '<td align="right" id="result" style="font-weight: bold;"></td>';
|
print '<td align="right" id="result" style="font-weight: bold;"></td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
|
|||||||
@ -138,6 +138,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'contact';
|
$modulepart = 'contact';
|
||||||
$permission = $user->rights->societe->contact->creer;
|
$permission = $user->rights->societe->contact->creer;
|
||||||
|
$permtoedit = $user->rights->societe->contact->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -967,6 +967,28 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Action clone object
|
||||||
|
if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||||
|
{
|
||||||
|
if (! GETPOST('socid', 3))
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($object->id > 0) {
|
||||||
|
$result = $object->createFromClone($socid);
|
||||||
|
if ($result > 0) {
|
||||||
|
header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result);
|
||||||
|
exit();
|
||||||
|
} else {
|
||||||
|
if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1265,6 +1287,12 @@ else
|
|||||||
print '<input type="hidden" name="action" value="setremise">';
|
print '<input type="hidden" name="action" value="setremise">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clone confirmation
|
||||||
|
if ($action == 'clone') {
|
||||||
|
$formquestion = array(array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)')));
|
||||||
|
print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneContract'), $langs->trans('ConfirmCloneContract', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||||
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
@ -1964,6 +1992,11 @@ else
|
|||||||
if ($user->rights->facture->creer) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id.'">'.$langs->trans("CreateOrder").'</a></div>';
|
if ($user->rights->facture->creer) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id.'">'.$langs->trans("CreateOrder").'</a></div>';
|
||||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CreateOrder").'</a></div>';
|
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CreateOrder").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clone
|
||||||
|
if ($user->rights->contrat->creer) {
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&object=' . $object->element . '">' . $langs->trans("ToClone") . '</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->nbofservicesclosed < $nbofservices)
|
if ($object->nbofservicesclosed < $nbofservices)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class Contrat extends CommonObject
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
var $ref_customer;
|
var $ref_customer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supplier reference of the contract
|
* Supplier reference of the contract
|
||||||
* @var string
|
* @var string
|
||||||
@ -536,7 +536,7 @@ class Contrat extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a contract from database
|
* Load a contract from database
|
||||||
*
|
*
|
||||||
@ -904,7 +904,7 @@ class Contrat extends CommonObject
|
|||||||
}
|
}
|
||||||
if (! $paramsok) return -1;
|
if (! $paramsok) return -1;
|
||||||
|
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
@ -969,7 +969,7 @@ class Contrat extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert contacts commerciaux ('SALESREPSIGN','contrat')
|
// Insert contacts commerciaux ('SALESREPSIGN','contrat')
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -996,8 +996,8 @@ class Contrat extends CommonObject
|
|||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN))
|
if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN))
|
||||||
{
|
{
|
||||||
$originforcontact = $origin;
|
$originforcontact = $origin;
|
||||||
@ -1018,10 +1018,10 @@ class Contrat extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
|
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
|
||||||
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
|
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
|
||||||
|
|
||||||
$resqlcontact = $this->db->query($sqlcontact);
|
$resqlcontact = $this->db->query($sqlcontact);
|
||||||
if ($resqlcontact)
|
if ($resqlcontact)
|
||||||
{
|
{
|
||||||
@ -1034,11 +1034,11 @@ class Contrat extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($resqlcontact);
|
else dol_print_error($resqlcontact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
@ -1381,7 +1381,7 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||||
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
$total_tva = $tabprice[1];
|
$total_tva = $tabprice[1];
|
||||||
@ -1404,9 +1404,9 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
if (empty($pa_ht)) $pa_ht=0;
|
if (empty($pa_ht)) $pa_ht=0;
|
||||||
|
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
if ($this->pa_ht == 0)
|
if ($this->pa_ht == 0)
|
||||||
{
|
{
|
||||||
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0)
|
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0)
|
||||||
{
|
{
|
||||||
@ -1565,7 +1565,7 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
|
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
|
||||||
$tvatx = preg_replace('/\s*\(.*\)/','',$tvatx); // Remove code into vatrate.
|
$tvatx = preg_replace('/\s*\(.*\)/','',$tvatx); // Remove code into vatrate.
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
$total_tva = $tabprice[1];
|
$total_tva = $tabprice[1];
|
||||||
@ -1589,7 +1589,7 @@ class Contrat extends CommonObject
|
|||||||
if (empty($pa_ht)) $pa_ht=0;
|
if (empty($pa_ht)) $pa_ht=0;
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
if ($this->pa_ht == 0)
|
if ($this->pa_ht == 0)
|
||||||
{
|
{
|
||||||
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent)) < 0)
|
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent)) < 0)
|
||||||
{
|
{
|
||||||
@ -2263,6 +2263,120 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load an object from its id and create a new one in database
|
||||||
|
*
|
||||||
|
* @param int $socid Id of thirdparty
|
||||||
|
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||||
|
* @return int New id of clone
|
||||||
|
*/
|
||||||
|
function createFromClone($socid = 0, $notrigger=0) {
|
||||||
|
global $db, $user, $langs, $conf, $hookmanager;
|
||||||
|
|
||||||
|
dol_include_once('/projet/class/project.class.php');
|
||||||
|
|
||||||
|
$this->context['createfromclone'] = 'createfromclone';
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
|
$now = dol_now();
|
||||||
|
|
||||||
|
$this->fetch($this->id);
|
||||||
|
// Load dest object
|
||||||
|
$clonedObj = clone $this;
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
|
$objsoc = new Societe($this->db);
|
||||||
|
|
||||||
|
$objsoc->fetch($clonedObj->socid);
|
||||||
|
|
||||||
|
// $clonedObj->id=0;
|
||||||
|
$clonedObj->statut = 0;
|
||||||
|
|
||||||
|
if (empty($conf->global->CONTRACT_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT . "/core/modules/contract/" . $conf->global->CONTRACT_ADDON . ".php")) {
|
||||||
|
$this->error = 'ErrorSetupNotComplete';
|
||||||
|
dol_syslog($this->error);
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set ref
|
||||||
|
require_once DOL_DOCUMENT_ROOT . "/core/modules/contract/" . $conf->global->CONTRACT_ADDON . '.php';
|
||||||
|
$obj = $conf->global->CONTRACT_ADDON;
|
||||||
|
$modContract = new $obj();
|
||||||
|
$clonedObj->ref = $modContract->getNextValue($objsoc, $clonedObj);
|
||||||
|
|
||||||
|
// get extrafields so they will be clone
|
||||||
|
foreach ( $this->lines as $line ) {
|
||||||
|
$line->fetch_optionals($line->rowid);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create clone
|
||||||
|
$result = $clonedObj->create($user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error ++;
|
||||||
|
$this->error = $clonedObj->error;
|
||||||
|
$this->errors[] = $clonedObj->error;
|
||||||
|
} else {
|
||||||
|
// copy internal contacts
|
||||||
|
if ($clonedObj->copy_linked_contact($this, 'internal') < 0)
|
||||||
|
$error ++;
|
||||||
|
|
||||||
|
// copy external contacts if same company
|
||||||
|
elseif ($this->socid == $clonedObj->socid) {
|
||||||
|
if ($clonedObj->copy_linked_contact($this, 'external') < 0)
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error) {
|
||||||
|
foreach ( $this->lines as $line ) {
|
||||||
|
$result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error ++;
|
||||||
|
$this->error = $clonedObj->error;
|
||||||
|
$this->errors[] = $clonedObj->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error) {
|
||||||
|
// Hook of thirdparty module
|
||||||
|
if (is_object($hookmanager)) {
|
||||||
|
$parameters = array (
|
||||||
|
'objFrom' => $this,
|
||||||
|
'clonedObj' => $clonedObj
|
||||||
|
);
|
||||||
|
$action = '';
|
||||||
|
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $clonedObj, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0)
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $notrigger && empty($error))
|
||||||
|
{
|
||||||
|
// Call trigger
|
||||||
|
$clonedObj->old_copy=$this;
|
||||||
|
$result = $clonedObj->call_trigger('CONTRACT_CLONE', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($this->context['createfromclone']);
|
||||||
|
|
||||||
|
// End
|
||||||
|
if (! $error) {
|
||||||
|
$this->db->commit();
|
||||||
|
return $clonedObj->id;
|
||||||
|
} else {
|
||||||
|
$this->db->rollback();
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2273,7 +2387,7 @@ class ContratLigne extends CommonObjectLine
|
|||||||
{
|
{
|
||||||
public $element='contratdet';
|
public $element='contratdet';
|
||||||
public $table_element='contratdet';
|
public $table_element='contratdet';
|
||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
var $ref;
|
var $ref;
|
||||||
var $tms;
|
var $tms;
|
||||||
@ -2291,10 +2405,10 @@ class ContratLigne extends CommonObjectLine
|
|||||||
public $libelle;
|
public $libelle;
|
||||||
|
|
||||||
var $description;
|
var $description;
|
||||||
|
|
||||||
var $product_ref;
|
var $product_ref;
|
||||||
var $product_label;
|
var $product_label;
|
||||||
|
|
||||||
var $date_commande;
|
var $date_commande;
|
||||||
var $date_ouverture_prevue; // date start planned
|
var $date_ouverture_prevue; // date start planned
|
||||||
var $date_ouverture; // date start real
|
var $date_ouverture; // date start real
|
||||||
@ -2435,7 +2549,7 @@ class ContratLigne extends CommonObjectLine
|
|||||||
$result='';
|
$result='';
|
||||||
$label=$langs->trans("ShowContractOfService").': '.$this->label;
|
$label=$langs->trans("ShowContractOfService").': '.$this->label;
|
||||||
if (empty($label)) $label=$this->description;
|
if (empty($label)) $label=$this->description;
|
||||||
|
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$link = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
@ -2631,7 +2745,7 @@ class ContratLigne extends CommonObjectLine
|
|||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
if ($this->pa_ht == 0)
|
if ($this->pa_ht == 0)
|
||||||
{
|
{
|
||||||
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -124,6 +124,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'contract';
|
$modulepart = 'contract';
|
||||||
$permission = $user->rights->contrat->creer;
|
$permission = $user->rights->contrat->creer;
|
||||||
|
$permtoedit = $user->rights->contrat->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -88,6 +88,10 @@ if ($action == 'builddoc' && $permissioncreate)
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("FileGenerated"), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,8 +201,26 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
{
|
{
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
|
|
||||||
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
|
$fromtype = GETPOST('fromtype');
|
||||||
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
|
if ($fromtype === 'user') {
|
||||||
|
$from = $user->getFullName($langs) .' <'.$user->email.'>';
|
||||||
|
}
|
||||||
|
elseif ($fromtype === 'company') {
|
||||||
|
$from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>';
|
||||||
|
}
|
||||||
|
elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) {
|
||||||
|
$tmp=explode(',', $user->email_aliases);
|
||||||
|
$from = trim($tmp[($reg[1] - 1)]);
|
||||||
|
}
|
||||||
|
elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) {
|
||||||
|
$tmp=explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
|
||||||
|
$from = trim($tmp[($reg[1] - 1)]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
|
||||||
$message = $_POST['message'];
|
$message = $_POST['message'];
|
||||||
$sendtobcc= GETPOST('sendtoccc');
|
$sendtobcc= GETPOST('sendtoccc');
|
||||||
if ($mode == 'emailfromproposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO));
|
if ($mode == 'emailfromproposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO));
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com>
|
* Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2006 Jean Heimburger <jean@tiaris.info>
|
||||||
*
|
*
|
||||||
@ -491,8 +491,8 @@ class Conf
|
|||||||
// By default, we use the zip town autofill
|
// By default, we use the zip town autofill
|
||||||
if (! isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY=1;
|
if (! isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY=1;
|
||||||
|
|
||||||
// Define list of limited modules
|
// Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal"
|
||||||
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplier_proposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
||||||
|
|
||||||
// Enable select2
|
// Enable select2
|
||||||
if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') $this->global->MAIN_USE_JQUERY_MULTISELECT='select2';
|
if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') $this->global->MAIN_USE_JQUERY_MULTISELECT='select2';
|
||||||
|
|||||||
@ -4102,6 +4102,11 @@ class Form
|
|||||||
$out='';
|
$out='';
|
||||||
$out.= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
$out.= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||||
if ($useempty) $out .= '<option value=""></option>';
|
if ($useempty) $out .= '<option value=""></option>';
|
||||||
|
// If company current currency not in table, we add it into list. Should always be available.
|
||||||
|
if (! in_array($conf->currency, $TCurrency))
|
||||||
|
{
|
||||||
|
$TCurrency[$conf->currency] = $conf->currency;
|
||||||
|
}
|
||||||
if (count($TCurrency) > 0)
|
if (count($TCurrency) > 0)
|
||||||
{
|
{
|
||||||
foreach ($langs->cache_currencies as $code_iso => $currency)
|
foreach ($langs->cache_currencies as $code_iso => $currency)
|
||||||
|
|||||||
@ -370,29 +370,52 @@ class FormMail extends Form
|
|||||||
$out.= '<input type="hidden" id="fromname" name="fromname" value="'.$this->fromname.'" />';
|
$out.= '<input type="hidden" id="fromname" name="fromname" value="'.$this->fromname.'" />';
|
||||||
$out.= '<input type="hidden" id="frommail" name="frommail" value="'.$this->frommail.'" />';
|
$out.= '<input type="hidden" id="frommail" name="frommail" value="'.$this->frommail.'" />';
|
||||||
$out.= '<tr><td width="180">'.$langs->trans("MailFrom").'</td><td>';
|
$out.= '<tr><td width="180">'.$langs->trans("MailFrom").'</td><td>';
|
||||||
if ($this->fromtype == 'user' && $this->fromid > 0)
|
|
||||||
{
|
if (! ($this->fromtype === 'user' && $this->fromid > 0)
|
||||||
$langs->load("users");
|
&& ! ($this->fromtype === 'company')
|
||||||
$fuser=new User($this->db);
|
&& ! preg_match('/user_aliases/', $this->fromtype)
|
||||||
$fuser->fetch($this->fromid);
|
&& ! preg_match('/global_aliases/', $this->fromtype))
|
||||||
$out.= $fuser->getNomUrl(1);
|
{
|
||||||
}
|
// Use this->fromname and this->frommail or error if not defined
|
||||||
else
|
$out.= $this->fromname;
|
||||||
{
|
if ($this->frommail)
|
||||||
$out.= $this->fromname;
|
{
|
||||||
}
|
$out.= ' <'.$this->frommail.'>';
|
||||||
if ($this->frommail)
|
}
|
||||||
{
|
else
|
||||||
$out.= " <".$this->frommail.">";
|
{
|
||||||
}
|
if ($this->fromtype)
|
||||||
else
|
{
|
||||||
{
|
$langs->load('errors');
|
||||||
if ($this->fromtype)
|
$out.= '<span class="warning"> <'.$langs->trans('ErrorNoMailDefinedForThisUser').'> </span>';
|
||||||
{
|
}
|
||||||
$langs->load("errors");
|
}
|
||||||
$out.= '<font class="warning"> <'.$langs->trans("ErrorNoMailDefinedForThisUser").'> </font>';
|
} else {
|
||||||
}
|
$liste = array();
|
||||||
}
|
$liste['user'] = $user->getFullName($langs) .' <'.$user->email.'>';
|
||||||
|
$liste['company'] = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>';
|
||||||
|
// Add also email aliases if there is one
|
||||||
|
$listaliases=array('user_aliases'=>$user->email_aliases, 'global_aliases'=>$conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
|
||||||
|
foreach($listaliases as $typealias => $listalias)
|
||||||
|
{
|
||||||
|
$posalias=0;
|
||||||
|
$listaliasarray=explode(',', $listalias);
|
||||||
|
foreach ($listaliasarray as $listaliasval)
|
||||||
|
{
|
||||||
|
$posalias++;
|
||||||
|
$listaliasval=trim($listaliasval);
|
||||||
|
if ($listaliasval)
|
||||||
|
{
|
||||||
|
$listaliasval=preg_replace('/</', '<', $listaliasval);
|
||||||
|
$listaliasval=preg_replace('/>/', '>', $listaliasval);
|
||||||
|
if (! preg_match('/</', $listaliasval)) $listaliasval='<'.$listaliasval.'>';
|
||||||
|
$liste[$typealias.'_'.$posalias]=$listaliasval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$out.= ' '.$form->selectarray('fromtype', $liste, $this->fromtype, 0);
|
||||||
|
}
|
||||||
|
|
||||||
$out.= "</td></tr>\n";
|
$out.= "</td></tr>\n";
|
||||||
$out.= "</td></tr>\n";
|
$out.= "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,7 @@ function clean_account($account)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return General accounting account with defined length
|
* Return General accounting account with defined length (used for product and miscellaneous)
|
||||||
*
|
*
|
||||||
* @param string $account General accounting account
|
* @param string $account General accounting account
|
||||||
* @return string String with defined length
|
* @return string String with defined length
|
||||||
@ -114,7 +114,7 @@ function length_accountg($account)
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if ($account < 0 || empty($account)) return 'NotDefined';
|
if ($account < 0 || empty($account)) return '';
|
||||||
|
|
||||||
$g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT;
|
$g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT;
|
||||||
|
|
||||||
@ -139,8 +139,7 @@ function length_accountg($account)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return Auxiliary accounting account with defined length
|
* Return Auxiliary accounting account of thirdparties with defined length
|
||||||
* TODO For thirdparty accounts only, or products too ?
|
|
||||||
*
|
*
|
||||||
* @param string $accounta Auxiliary accounting account
|
* @param string $accounta Auxiliary accounting account
|
||||||
* @return string String with defined length
|
* @return string String with defined length
|
||||||
@ -149,7 +148,7 @@ function length_accounta($accounta)
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($accounta < 0 || empty($accounta)) return 'NotDefined';
|
if ($accounta < 0 || empty($accounta)) return '';
|
||||||
|
|
||||||
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
||||||
|
|
||||||
|
|||||||
@ -714,8 +714,11 @@ function activateModule($value,$withdeps=1)
|
|||||||
{
|
{
|
||||||
global $db, $modules, $langs, $conf;
|
global $db, $modules, $langs, $conf;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (empty($value)) return 'ErrorBadParameter';
|
if (empty($value)) {
|
||||||
|
$ret['errors'][] = 'ErrorBadParameter';
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
$ret=array('nbmodules'=>0, 'errors'=>array(), 'nbperms'=>0);
|
$ret=array('nbmodules'=>0, 'errors'=>array(), 'nbperms'=>0);
|
||||||
$modName = $value;
|
$modName = $value;
|
||||||
@ -740,25 +743,25 @@ function activateModule($value,$withdeps=1)
|
|||||||
// Test if PHP version ok
|
// Test if PHP version ok
|
||||||
$verphp=versionphparray();
|
$verphp=versionphparray();
|
||||||
$vermin=isset($objMod->phpmin)?$objMod->phpmin:0;
|
$vermin=isset($objMod->phpmin)?$objMod->phpmin:0;
|
||||||
if (is_array($vermin) && versioncompare($verphp,$vermin) < 0)
|
if (is_array($vermin) && versioncompare($verphp, $vermin) < 0) {
|
||||||
{
|
$ret['errors'][] = $langs->trans("ErrorModuleRequirePHPVersion", versiontostring($vermin));
|
||||||
return $langs->trans("ErrorModuleRequirePHPVersion",versiontostring($vermin));
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test if Dolibarr version ok
|
// Test if Dolibarr version ok
|
||||||
$verdol=versiondolibarrarray();
|
$verdol=versiondolibarrarray();
|
||||||
$vermin=isset($objMod->need_dolibarr_version)?$objMod->need_dolibarr_version:0;
|
$vermin=isset($objMod->need_dolibarr_version)?$objMod->need_dolibarr_version:0;
|
||||||
//print 'eee '.versioncompare($verdol,$vermin).' - '.join(',',$verdol).' - '.join(',',$vermin);exit;
|
//print 'eee '.versioncompare($verdol,$vermin).' - '.join(',',$verdol).' - '.join(',',$vermin);exit;
|
||||||
if (is_array($vermin) && versioncompare($verdol,$vermin) < 0)
|
if (is_array($vermin) && versioncompare($verdol, $vermin) < 0) {
|
||||||
{
|
$ret['errors'][] = $langs->trans("ErrorModuleRequireDolibarrVersion", versiontostring($vermin));
|
||||||
return $langs->trans("ErrorModuleRequireDolibarrVersion",versiontostring($vermin));
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test if javascript requirement ok
|
// Test if javascript requirement ok
|
||||||
if (! empty($objMod->need_javascript_ajax) && empty($conf->use_javascript_ajax))
|
if (!empty($objMod->need_javascript_ajax) && empty($conf->use_javascript_ajax)) {
|
||||||
{
|
$ret['errors'][] = $langs->trans("ErrorModuleRequireJavascript");
|
||||||
return $langs->trans("ErrorModuleRequireJavascript");
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result=$objMod->init();
|
$result=$objMod->init();
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
@ -1292,7 +1295,8 @@ function showModulesExludedForExternal($modules)
|
|||||||
|
|
||||||
//if (empty($conf->global->$moduleconst)) continue;
|
//if (empty($conf->global->$moduleconst)) continue;
|
||||||
if (! in_array($modulename,$listofmodules)) continue;
|
if (! in_array($modulename,$listofmodules)) continue;
|
||||||
|
//var_dump($modulename.'eee'.$langs->trans('Module'.$module->numero.'Name'));
|
||||||
|
|
||||||
if ($i > 0) $text.=', ';
|
if ($i > 0) $text.=', ';
|
||||||
else $text.=' ';
|
else $text.=' ';
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -1693,7 +1693,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
// Wrapping for accounting exports
|
// Wrapping for accounting exports
|
||||||
else if ($modulepart == 'export_compta')
|
else if ($modulepart == 'export_compta')
|
||||||
{
|
{
|
||||||
if ($fuser->rights->accounting->ventilation->dispatch || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,15 +210,18 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
||||||
-- Accounting Expert
|
-- Accounting Expert
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
||||||
|
-- Setup
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2451__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy_admin', 'Chartofaccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 0, 1, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2451__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2400__+MAX_llx_menu__, '/accountancy/admin/index.php?mainmenu=accountancy_admin', 'MenuDefaultAccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 0, 2, __ENTITY__);
|
||||||
-- Binding
|
-- Binding
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2415__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=admintools', 'ProductsBinding', 1, 'accountancy', '', '', 0, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2415__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=admintools', 'ProductsBinding', 1, 'accountancy', '', '', 0, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 4, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 5, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 6, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__);
|
||||||
-- Journals
|
-- Journals
|
||||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__);
|
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__);
|
||||||
-- General Ledger
|
-- General Ledger
|
||||||
@ -234,9 +237,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2447__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 24, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2447__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 24, __ENTITY__);
|
||||||
-- Admin
|
-- Accounting period
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2451__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 0, 25, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'FiscalPeriod', 1, 'admin', '', '', 2, 4, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup" && $conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__);
|
|
||||||
-- Rapports compta simple
|
-- Rapports compta simple
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
||||||
|
|||||||
@ -938,20 +938,25 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
{
|
{
|
||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
$permtoshowmenu=(! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire);
|
$permtoshowmenu=(! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire);
|
||||||
$newmenu->add("/accountancy/index.php?leftmenu=accountancy",$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
$newmenu->add("/accountancy/index.php?leftmenu=accountancy",$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
||||||
|
|
||||||
|
// Chart of account
|
||||||
|
$langs->load("admin");
|
||||||
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 1);
|
||||||
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 2);
|
||||||
|
|
||||||
// Binding
|
// Binding
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy", $langs->trans("ProductsBinding"), 1, $user->admin);
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy", $langs->trans("ProductsBinding"), 1, $user->admin);
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy",$langs->trans("CustomersVentilation"),1,$user->rights->accounting->ventilation->read, '', $mainmenu, 'dispatch_customer');
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy",$langs->trans("CustomersVentilation"),1,$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
|
||||||
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("ToBind"),2,$user->rights->accounting->ventilation->dispatch);
|
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("ToBind"),2,$user->rights->accounting->bind->write);
|
||||||
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("Binded"),2,$user->rights->accounting->ventilation->read);
|
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("Binded"),2,$user->rights->accounting->bind->write);
|
||||||
|
|
||||||
if (! empty($conf->supplier_invoice->enabled))
|
if (! empty($conf->supplier_invoice->enabled))
|
||||||
{
|
{
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy",$langs->trans("SuppliersVentilation"),1,$user->rights->accounting->ventilation->read, '', $mainmenu, 'dispatch_supplier');
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy",$langs->trans("SuppliersVentilation"),1,$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
|
||||||
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("ToBind"),2,$user->rights->accounting->ventilation->dispatch);
|
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("ToBind"),2,$user->rights->accounting->bind->write);
|
||||||
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("Binded"),2,$user->rights->accounting->ventilation->read);
|
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("Binded"),2,$user->rights->accounting->bind->write);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Journals
|
// Journals
|
||||||
@ -1006,12 +1011,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report",$langs->trans("ByUsers"),3,$user->rights->accounting->comptarapport->lire);
|
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report",$langs->trans("ByUsers"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report", $langs->trans("ByProductsAndServices"),3,$user->rights->accounting->comptarapport->lire);
|
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report", $langs->trans("ByProductsAndServices"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
|
|
||||||
// Admin
|
// Fiscal year
|
||||||
$langs->load("admin");
|
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'chartofaccount');
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // Not yet used. In a future will lock some periods.
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // Not yet used. In a future will lock some periods.
|
||||||
{
|
{
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Fiscalyear"),1,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"),1,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "sepamandate";
|
$this->name = "sepamandate";
|
||||||
$this->description = $langs->trans("DocumentModelSepaMandate");
|
$this->description = $langs->transnoentitiesnoconv("DocumentModelSepaMandate");
|
||||||
|
|
||||||
// Dimension page pour format A4
|
// Dimension page pour format A4
|
||||||
$this->type = 'pdf';
|
$this->type = 'pdf';
|
||||||
@ -128,7 +128,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
if (! empty($moreparams['force_dir_output'])) $dir = $moreparams['force_dir_output'];
|
if (! empty($moreparams['force_dir_output'])) $dir = $moreparams['force_dir_output'];
|
||||||
else $dir = $conf->bank->dir_output . "/" . $objectref;
|
else $dir = $conf->bank->dir_output . "/" . $objectref;
|
||||||
$file = $dir . "/" . $langs->trans("SepaMandateShort").' '.$objectref . "-".dol_sanitizeFileName($object->rum).".pdf";
|
$file = $dir . "/" . $langs->transnoentitiesnoconv("SepaMandateShort").' '.$objectref . "-".dol_sanitizeFileName($object->rum).".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! file_exists($dir))
|
if (! file_exists($dir))
|
||||||
@ -225,14 +225,14 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
$posY+=2;
|
$posY+=2;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posY);
|
$pdf->SetXY($this->marge_gauche, $posY);
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->trans("RUM").')'.' : '.$object->rum, 0, 'L');
|
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").')'.' : '.$object->rum, 0, 'L');
|
||||||
|
|
||||||
$posY=$pdf->GetY();
|
$posY=$pdf->GetY();
|
||||||
$posY+=2;
|
$posY+=2;
|
||||||
$pdf->SetXY($this->marge_gauche, $posY);
|
$pdf->SetXY($this->marge_gauche, $posY);
|
||||||
$ics='';
|
$ics='';
|
||||||
if (! empty($conf->global->PRELEVEMENT_ICS)) $ics=$conf->global->PRELEVEMENT_ICS;
|
if (! empty($conf->global->PRELEVEMENT_ICS)) $ics=$conf->global->PRELEVEMENT_ICS;
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->trans("ICS").')'.' : '.$ics, 0, 'L');
|
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").')'.' : '.$ics, 0, 'L');
|
||||||
|
|
||||||
$posY=$pdf->GetY();
|
$posY=$pdf->GetY();
|
||||||
$posY+=1;
|
$posY+=1;
|
||||||
@ -254,7 +254,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
|
|
||||||
$posY+=8;
|
$posY+=8;
|
||||||
$pdf->SetXY($this->marge_gauche, $posY);
|
$pdf->SetXY($this->marge_gauche, $posY);
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 8, $outputlangs->trans("SEPALegalText", $mysoc->name, $mysoc->name), 0, 'L');
|
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 8, $outputlangs->transnoentitiesnoconv("SEPALegalText", $mysoc->name, $mysoc->name), 0, 'L');
|
||||||
|
|
||||||
// Your data form
|
// Your data form
|
||||||
$posY=$pdf->GetY();
|
$posY=$pdf->GetY();
|
||||||
@ -328,20 +328,20 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
$pdf->SetXY(80, $posY);
|
$pdf->SetXY(80, $posY);
|
||||||
if ($object->frstrecur == 'FRST') $pdf->MultiCell(5, 3, 'X', 0, 'L');
|
if ($object->frstrecur == 'FRST') $pdf->MultiCell(5, 3, 'X', 0, 'L');
|
||||||
$pdf->SetXY(86, $posY);
|
$pdf->SetXY(86, $posY);
|
||||||
$txt = $langs->trans("ModeRECUR").' '.$langs->trans("or");
|
$txt = $langs->transnoentitiesnoconv("ModeRECUR").' '.$langs->transnoentitiesnoconv("or");
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
|
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
|
||||||
$posY+=6;
|
$posY+=6;
|
||||||
$pdf->Rect(80, $posY, 5, 5);
|
$pdf->Rect(80, $posY, 5, 5);
|
||||||
$pdf->SetXY(80, $posY);
|
$pdf->SetXY(80, $posY);
|
||||||
if ($object->frstrecur == 'RECUR') $pdf->MultiCell(5, 3, 'X', 0, 'L');
|
if ($object->frstrecur == 'RECUR') $pdf->MultiCell(5, 3, 'X', 0, 'L');
|
||||||
$pdf->SetXY(86, $posY);
|
$pdf->SetXY(86, $posY);
|
||||||
$txt = $langs->trans("ModeFRST");
|
$txt = $langs->transnoentitiesnoconv("ModeFRST");
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
|
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
|
||||||
if (empty($object->frstrecur))
|
if (empty($object->frstrecur))
|
||||||
{
|
{
|
||||||
$posY+=6;
|
$posY+=6;
|
||||||
$pdf->SetXY(80, $posY);
|
$pdf->SetXY(80, $posY);
|
||||||
$txt = '('.$langs->trans("PleaseCheckOne").')';
|
$txt = '('.$langs->transnoentitiesnoconv("PleaseCheckOne").')';
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
|
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('','', $default_font_size);
|
$pdf->SetFont('','', $default_font_size);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->trans("PleaseReturnMandate", $mysoc->email).':', 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("PleaseReturnMandate", $mysoc->email).':', 0, 'L', 0);
|
||||||
$posy=$pdf->GetY()+2;
|
$posy=$pdf->GetY()+2;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
@ -486,7 +486,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 2);
|
$pdf->SetFont('','', $default_font_size - 2);
|
||||||
|
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->trans("DateOfSignature"), 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateOfSignature"), 0, 'L', 0);
|
||||||
$pdf->MultiCell(100, 3, ' ');
|
$pdf->MultiCell(100, 3, ' ');
|
||||||
$pdf->MultiCell(100, 3, '______________________', 0, 'L', 0);
|
$pdf->MultiCell(100, 3, '______________________', 0, 'L', 0);
|
||||||
|
|
||||||
@ -497,7 +497,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
// Total HT
|
// Total HT
|
||||||
$pdf->SetFillColor(255,255,255);
|
$pdf->SetFillColor(255,255,255);
|
||||||
$pdf->SetXY($posx, $tab_top + 0);
|
$pdf->SetXY($posx, $tab_top + 0);
|
||||||
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("Signature"), 0, 'L', 1);
|
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentitiesnoconv("Signature"), 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY($posx, $tab_top + $tab_hl);
|
$pdf->SetXY($posx, $tab_top + $tab_hl);
|
||||||
$pdf->MultiCell($largcol, $tab_hl*3, '', 1, 'R');
|
$pdf->MultiCell($largcol, $tab_hl*3, '', 1, 'R');
|
||||||
|
|||||||
@ -231,24 +231,34 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->rights = array(); // Permission array used by this module
|
$this->rights = array(); // Permission array used by this module
|
||||||
$r = 0;
|
$r = 0;
|
||||||
|
|
||||||
|
$this->rights[$r][0] = 50440;
|
||||||
|
$this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy';
|
||||||
|
$this->rights[$r][2] = 'r';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'chartofaccount';
|
||||||
|
$this->rights[$r][5] = '';
|
||||||
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50401;
|
$this->rights[$r][0] = 50401;
|
||||||
$this->rights[$r][1] = 'Read ventilation';
|
$this->rights[$r][1] = 'Bind products and invoices with accounting accounts';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'ventilation';
|
$this->rights[$r][4] = 'bind';
|
||||||
$this->rights[$r][5] = 'read';
|
$this->rights[$r][5] = 'write';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
/*
|
||||||
$this->rights[$r][0] = 50402;
|
$this->rights[$r][0] = 50402;
|
||||||
$this->rights[$r][1] = 'Dispatched ventilation';
|
$this->rights[$r][1] = 'Make binding with products and invoices';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'ventilation';
|
$this->rights[$r][4] = 'ventilation';
|
||||||
$this->rights[$r][5] = 'dispatch';
|
$this->rights[$r][5] = 'dispatch_advanced';
|
||||||
$r++;
|
$r++;
|
||||||
|
*/
|
||||||
|
|
||||||
$this->rights[$r][0] = 50411;
|
$this->rights[$r][0] = 50411;
|
||||||
$this->rights[$r][1] = 'Lire les mouvements comptables';
|
$this->rights[$r][1] = 'Read operations in General Ledger';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'mouvements';
|
$this->rights[$r][4] = 'mouvements';
|
||||||
@ -256,7 +266,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50412;
|
$this->rights[$r][0] = 50412;
|
||||||
$this->rights[$r][1] = 'Creer/modifier/annuler les mouvements comptables';
|
$this->rights[$r][1] = 'Write/Edit operations in General Ledger';
|
||||||
$this->rights[$r][2] = 'w';
|
$this->rights[$r][2] = 'w';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'mouvements';
|
$this->rights[$r][4] = 'mouvements';
|
||||||
@ -264,7 +274,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50420;
|
$this->rights[$r][0] = 50420;
|
||||||
$this->rights[$r][1] = 'Lire CA, bilans, resultats, journaux, grands livres';
|
$this->rights[$r][1] = 'Report and export reports (turnover, balance, journals, general ledger)';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'comptarapport';
|
$this->rights[$r][4] = 'comptarapport';
|
||||||
@ -279,14 +289,6 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->rights[$r][5] = '';
|
$this->rights[$r][5] = '';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50440;
|
|
||||||
$this->rights[$r][1] = 'Manage chart of accounts';
|
|
||||||
$this->rights[$r][2] = 'r';
|
|
||||||
$this->rights[$r][3] = 0;
|
|
||||||
$this->rights[$r][4] = 'chartofaccount';
|
|
||||||
$this->rights[$r][5] = '';
|
|
||||||
$r++;
|
|
||||||
|
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
//-------
|
//-------
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class modSociete extends DolibarrModules
|
|||||||
// Dependencies
|
// Dependencies
|
||||||
$this->depends = array();
|
$this->depends = array();
|
||||||
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande");
|
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande");
|
||||||
$this->langfiles = array("companies");
|
$this->langfiles = array("companies",'bills');
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
@ -258,13 +258,13 @@ class modSociete extends DolibarrModules
|
|||||||
$this->export_label[$r]='ExportDataset_company_1';
|
$this->export_label[$r]='ExportDataset_company_1';
|
||||||
$this->export_icon[$r]='company';
|
$this->export_icon[$r]='company';
|
||||||
$this->export_permission[$r]=array(array("societe","export"));
|
$this->export_permission[$r]=array(array("societe","export"));
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"AccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'d.nom'=>'State','c.label'=>"Country",'c.code'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','st.code'=>'ProspectStatus');
|
$this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"AccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'d.nom'=>'State','c.label'=>"Country",'c.code'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode');
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
|
||||||
$keyforselect='societe'; $keyforelement='company'; $keyforaliasextra='extra';
|
$keyforselect='societe'; $keyforelement='company'; $keyforaliasextra='extra';
|
||||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||||
$this->export_fields_array[$r]+=array('u.login'=>'SaleRepresentativeLogin','u.firstname'=>'SaleRepresentativeFirstname', 'u.lastname'=>'SaleRepresentativeLastname');
|
$this->export_fields_array[$r]+=array('u.login'=>'SaleRepresentativeLogin','u.firstname'=>'SaleRepresentativeFirstname', 'u.lastname'=>'SaleRepresentativeLastname');
|
||||||
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'c.label'=>"List:c_country:label:label",'c.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid');
|
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'c.label'=>"List:c_country:label:label",'c.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid');
|
||||||
$this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Numeric",'s.client'=>"Numeric",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'c.label'=>"List:c_country:label:label",'c.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text');
|
$this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Numeric",'s.client'=>"Numeric",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'c.label'=>"List:c_country:label:label",'c.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text','paymode.libelle'=>'Text');
|
||||||
|
|
||||||
$this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto
|
$this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto
|
||||||
$this->export_examplevalues_array[$r]=array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
|
$this->export_examplevalues_array[$r]=array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
|
||||||
@ -278,6 +278,8 @@ class modSociete extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcomm as st ON s.fk_stcomm = st.id';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcomm as st ON s.fk_stcomm = st.id';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON sc.fk_user = u.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON sc.fk_user = u.rowid';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as payterm ON s.cond_reglement = payterm.rowid';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as paymode ON s.mode_reglement = paymode.id';
|
||||||
$this->export_sql_end[$r] .=' WHERE s.entity IN ('.getEntity('societe', 1).')';
|
$this->export_sql_end[$r] .=' WHERE s.entity IN ('.getEntity('societe', 1).')';
|
||||||
if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
|
if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
|
||||||
|
|
||||||
|
|||||||
@ -122,6 +122,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'don';
|
$modulepart = 'don';
|
||||||
$permission = $user->rights->don->lire;
|
$permission = $user->rights->don->lire;
|
||||||
|
$permtoedit = $user->rights->don->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -1979,10 +1979,12 @@ else if ($id || $ref)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='shi'.$object->id;
|
$formmail->trackid='shi'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1432,71 +1432,120 @@ else
|
|||||||
|
|
||||||
if ($action == 'save')
|
if ($action == 'save')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_validate","","",1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_validate","","",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'save_from_refuse')
|
if ($action == 'save_from_refuse')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save_from_refuse","","",1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save_from_refuse","","",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete","","",1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete","","",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'validate')
|
if ($action == 'validate')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("ValideTrip"),$langs->trans("ConfirmValideTrip"),"confirm_approve","","",1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("ValideTrip"),$langs->trans("ConfirmValideTrip"),"confirm_approve","","",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'paid')
|
if ($action == 'paid')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("PaidTrip"),$langs->trans("ConfirmPaidTrip"),"confirm_paid","","",1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("PaidTrip"),$langs->trans("ConfirmPaidTrip"),"confirm_paid","","",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'cancel')
|
if ($action == 'cancel')
|
||||||
{
|
{
|
||||||
$array_input = array('text'=>$langs->trans("ConfirmCancelTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_cancel",'size'=>"50",'value'=>""));
|
$array_input = array('text'=>$langs->trans("ConfirmCancelTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_cancel",'size'=>"50",'value'=>""));
|
||||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("Cancel"),"","confirm_cancel",$array_input,"",1);
|
$formconfirm=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("Cancel"),"","confirm_cancel",$array_input,"",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'brouillonner'):
|
if ($action == 'brouillonner')
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("BrouillonnerTrip"),$langs->trans("ConfirmBrouillonnerTrip"),"confirm_brouillonner","","",1);
|
{
|
||||||
if ($ret == 'html') print '<br>';
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("BrouillonnerTrip"),$langs->trans("ConfirmBrouillonnerTrip"),"confirm_brouillonner","","",1);
|
||||||
endif;
|
}
|
||||||
|
|
||||||
if ($action == 'refuse') // Deny
|
if ($action == 'refuse') // Deny
|
||||||
{
|
{
|
||||||
$array_input = array('text'=>$langs->trans("ConfirmRefuseTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_refuse",'size'=>"50",'value'=>""));
|
$array_input = array('text'=>$langs->trans("ConfirmRefuseTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_refuse",'size'=>"50",'value'=>""));
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("Deny"),'',"confirm_refuse",$array_input,"yes",1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("Deny"),'',"confirm_refuse",$array_input,"yes",1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delete_line')
|
if ($action == 'delete_line')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOST('rowid'),$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1);
|
$formconfirm=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOST('rowid'),$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1);
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print form confirm
|
||||||
|
print $formconfirm;
|
||||||
|
|
||||||
|
|
||||||
|
// Expense report card
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
/*
|
||||||
|
// Ref customer
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1);
|
||||||
|
// Thirdparty
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||||
|
// Project
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
|
if ($user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
if ($action != 'classify')
|
||||||
|
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
if ($action == 'classify') {
|
||||||
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="fichehalfleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
|
/*
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2">';
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2">';
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Period").'</td>';
|
print '<td class="titlefield">'.$langs->trans("Period").'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td>';
|
||||||
print get_date_range($object->date_debut,$object->date_fin,'',$langs,0);
|
print get_date_range($object->date_debut,$object->date_fin,'',$langs,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -1504,22 +1553,24 @@ else
|
|||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("ModePaiement").'</td>';
|
print '<td>'.$langs->trans("ModePaiement").'</td>';
|
||||||
print '<td colspan="2">'.$object->libelle_paiement.'</td>';
|
print '<td>'.$object->libelle_paiement.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
// Status
|
// Status
|
||||||
|
/*
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Statut").'</td>';
|
print '<td>'.$langs->trans("Statut").'</td>';
|
||||||
print '<td colspan="2">'.$object->getLibStatut(4).'</td>';
|
print '<td colspan="2">'.$object->getLibStatut(4).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("NotePublic").'</td>';
|
print '<td>'.$langs->trans("NotePublic").'</td>';
|
||||||
print '<td colspan="2">'.$object->note_public.'</td>';
|
print '<td>'.$object->note_public.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("NotePrivate").'</td>';
|
print '<td>'.$langs->trans("NotePrivate").'</td>';
|
||||||
print '<td colspan="2">'.$object->note_private.'</td>';
|
print '<td>'.$object->note_private.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -1531,75 +1582,14 @@ else
|
|||||||
else $rowspan+=2;
|
else $rowspan+=2;
|
||||||
if ($object->fk_statut==99 || !empty($object->detail_refuse)) $rowspan+=2;
|
if ($object->fk_statut==99 || !empty($object->detail_refuse)) $rowspan+=2;
|
||||||
if($object->fk_statut==6) $rowspan+=2;
|
if($object->fk_statut==6) $rowspan+=2;
|
||||||
|
|
||||||
print '<td rowspan="'.$rowspan.'" valign="top">';
|
|
||||||
|
|
||||||
// List of payments
|
|
||||||
$sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount,";
|
|
||||||
$sql.= "c.code as type_code,c.libelle as payment_type";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p";
|
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."c_paiement as c ";
|
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."expensereport as e";
|
|
||||||
$sql.= " WHERE e.rowid = '".$id."'";
|
|
||||||
$sql.= " AND p.fk_expensereport = e.rowid";
|
|
||||||
$sql.= " AND e.entity = ".$conf->entity;
|
|
||||||
$sql.= " AND p.fk_typepayment = c.id";
|
|
||||||
$sql.= " ORDER BY dp";
|
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0; $total = 0;
|
|
||||||
print '<table class="nobordernopadding paymenttable" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
|
||||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
|
||||||
print '<td> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var=True;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($resql);
|
|
||||||
$var=!$var;
|
|
||||||
print "<tr ".$bc[$var]."><td>";
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/expensereport/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
|
||||||
$labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->fk_typepayment;
|
|
||||||
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
|
|
||||||
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
|
||||||
print "</tr>";
|
|
||||||
$totalpaid += $objp->amount;
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($object->paid == 0)
|
|
||||||
{
|
|
||||||
print "<tr><td colspan=\"2\" align=\"right\">".$langs->trans("AlreadyPaid")." :</td><td align=\"right\"><b>".price($totalpaid)."</b></td><td> ".$langs->trans("Currency".$conf->currency)."</td></tr>\n";
|
|
||||||
print "<tr><td colspan=\"2\" align=\"right\">".$langs->trans("AmountExpected")." :</td><td align=\"right\" bgcolor=\"#d0d0d0\">".price($object->total_ttc)."</td><td bgcolor=\"#d0d0d0\"> ".$langs->trans("Currency".$conf->currency)."</td></tr>\n";
|
|
||||||
|
|
||||||
$remaintopay = $object->total_ttc - $totalpaid;
|
|
||||||
|
|
||||||
print "<tr><td colspan=\"2\" align=\"right\">".$langs->trans("RemainderToPay")." :</td>";
|
|
||||||
print "<td align=\"right\" bgcolor=\"#f0f0f0\"><b>".price($remaintopay)."</b></td><td bgcolor=\"#f0f0f0\"> ".$langs->trans("Currency".$conf->currency)."</td></tr>\n";
|
|
||||||
}
|
|
||||||
print "</table>";
|
|
||||||
$db->free($resql);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("AmountVAT").'</td>';
|
print '<td>'.$langs->trans("AmountVAT").'</td>';
|
||||||
print '<td>'.price($object->total_tva).'</td>';
|
print '<td>'.price($object->total_tva).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("AmountTTC").'</td>';
|
print '<td>'.$langs->trans("AmountTTC").'</td>';
|
||||||
print '<td>'.price($object->total_ttc).'</td>';
|
print '<td>'.price($object->total_ttc).'</td>';
|
||||||
@ -1658,6 +1648,7 @@ else
|
|||||||
print $userfee->getNomUrl(-1);
|
print $userfee->getNomUrl(-1);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("MOTIF_CANCEL").'</td>';
|
print '<td>'.$langs->trans("MOTIF_CANCEL").'</td>';
|
||||||
print '<td>'.$object->detail_cancel.'</td></tr>';
|
print '<td>'.$object->detail_cancel.'</td></tr>';
|
||||||
@ -1679,6 +1670,7 @@ else
|
|||||||
print $userapp->getNomUrl(-1);
|
print $userapp->getNomUrl(-1);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DateApprove").'</td>';
|
print '<td>'.$langs->trans("DateApprove").'</td>';
|
||||||
print '<td>'.dol_print_date($object->date_approve,'dayhour').'</td></tr>';
|
print '<td>'.dol_print_date($object->date_approve,'dayhour').'</td></tr>';
|
||||||
@ -1694,6 +1686,7 @@ else
|
|||||||
$userfee->fetch($object->fk_user_refuse);
|
$userfee->fetch($object->fk_user_refuse);
|
||||||
print $userfee->getNomUrl(-1);
|
print $userfee->getNomUrl(-1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DATE_REFUS").'</td>';
|
print '<td>'.$langs->trans("DATE_REFUS").'</td>';
|
||||||
print '<td>'.dol_print_date($object->date_refuse,'dayhour');
|
print '<td>'.dol_print_date($object->date_refuse,'dayhour');
|
||||||
@ -1725,6 +1718,77 @@ else
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright">';
|
||||||
|
print '<div class="ficheaddleft">';
|
||||||
|
//print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
// List of payments
|
||||||
|
$sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount,";
|
||||||
|
$sql.= "c.code as type_code,c.libelle as payment_type";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p";
|
||||||
|
$sql.= ", ".MAIN_DB_PREFIX."c_paiement as c ";
|
||||||
|
$sql.= ", ".MAIN_DB_PREFIX."expensereport as e";
|
||||||
|
$sql.= " WHERE e.rowid = '".$id."'";
|
||||||
|
$sql.= " AND p.fk_expensereport = e.rowid";
|
||||||
|
$sql.= " AND e.entity = ".$conf->entity;
|
||||||
|
$sql.= " AND p.fk_typepayment = c.id";
|
||||||
|
$sql.= " ORDER BY dp";
|
||||||
|
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0; $total = 0;
|
||||||
|
print '<table class="noborder paymenttable" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object($resql);
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var]."><td>";
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/expensereport/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
||||||
|
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
||||||
|
$labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->fk_typepayment;
|
||||||
|
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
|
||||||
|
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
||||||
|
print "</tr>";
|
||||||
|
$totalpaid += $objp->amount;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($object->paid == 0)
|
||||||
|
{
|
||||||
|
print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("AlreadyPaid")." :</td><td align=\"right\">".price($totalpaid)."</td></tr>\n";
|
||||||
|
print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("AmountExpected")." :</td><td align=\"right\">".price($object->total_ttc)."</td></tr>\n";
|
||||||
|
|
||||||
|
$remaintopay = $object->total_ttc - $totalpaid;
|
||||||
|
|
||||||
|
print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("RemainderToPay")." :</td>";
|
||||||
|
print '<td align="right"'.($remaintopay?' class="amountremaintopay"':'').'>'.price($remaintopay)."</td></tr>\n";
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
|
$db->free($resql);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div><br>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Fetch Lines of current expense report
|
// Fetch Lines of current expense report
|
||||||
|
|||||||
@ -34,6 +34,7 @@ class ExpenseReport extends CommonObject
|
|||||||
var $table_element='expensereport';
|
var $table_element='expensereport';
|
||||||
var $table_element_line = 'expensereport_det';
|
var $table_element_line = 'expensereport_det';
|
||||||
var $fk_element = 'fk_expensereport';
|
var $fk_element = 'fk_expensereport';
|
||||||
|
var $picto = 'trip';
|
||||||
|
|
||||||
var $lignes=array();
|
var $lignes=array();
|
||||||
|
|
||||||
|
|||||||
@ -1843,10 +1843,12 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='int'.$object->id;
|
$formmail->trackid='int'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -121,6 +121,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'ficheinter';
|
$modulepart = 'ficheinter';
|
||||||
$permission = $user->rights->ficheinter->creer;
|
$permission = $user->rights->ficheinter->creer;
|
||||||
|
$permtoedit = $user->rights->ficheinter->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -2158,10 +2158,12 @@ elseif (! empty($object->id))
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='sor'.$object->id;
|
$formmail->trackid='sor'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -161,6 +161,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
$modulepart = 'commande_fournisseur';
|
$modulepart = 'commande_fournisseur';
|
||||||
$permission = $user->rights->fournisseur->commande->creer;
|
$permission = $user->rights->fournisseur->commande->creer;
|
||||||
|
$permtoedit = $user->rights->fournisseur->commande->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -2519,10 +2519,12 @@ else
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
$formmail->fromtype = 'user';
|
$formmail->fromtype = (GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
|
||||||
$formmail->fromid = $user->id;
|
|
||||||
$formmail->fromname = $user->getFullName($langs);
|
if($formmail->fromtype === 'user'){
|
||||||
$formmail->frommail = $user->email;
|
$formmail->fromid = $user->id;
|
||||||
|
|
||||||
|
}
|
||||||
$formmail->trackid='sin'.$object->id;
|
$formmail->trackid='sin'.$object->id;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -208,6 +208,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
$modulepart = 'facture_fournisseur';
|
$modulepart = 'facture_fournisseur';
|
||||||
$permission = $user->rights->fournisseur->facture->creer;
|
$permission = $user->rights->fournisseur->facture->creer;
|
||||||
|
$permtoedit = $user->rights->fournisseur->facture->creer;
|
||||||
$param = '&facid=' . $object->id;
|
$param = '&facid=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -404,7 +404,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
if(!empty($conf->global->INVOICE_AUTO_FILLJS)){
|
if (!empty($conf->use_javascript_ajax)){
|
||||||
//Add js for AutoFill
|
//Add js for AutoFill
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
print ' $(document).ready(function () {';
|
print ' $(document).ready(function () {';
|
||||||
@ -419,13 +419,14 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print '<td>'.$langs->trans('Invoice').'</td>';
|
print '<td>'.$langs->trans('Invoice').'</td>';
|
||||||
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
||||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('AmountTTC').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('AlreadyPaid').'</td>';
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('RemainderToPay').'</td>';
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
||||||
print '<td align="center">'.$langs->trans('PaymentAmount').'</td>';
|
print '<td align="right">'.$langs->trans('AmountTTC').'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans('AlreadyPaid').'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans('PaymentAmount').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -453,24 +454,44 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
print '<td align="center"><b>!!!</b></td>';
|
print '<td align="center"><b>!!!</b></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Currency
|
||||||
|
print '<td align="center">'.$objp->multicurrency_code."</td>\n";
|
||||||
|
|
||||||
|
// Multicurrency
|
||||||
|
if (!empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
|
{
|
||||||
|
print price($objp->multicurrency_total_ttc);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
|
{
|
||||||
|
print price($objp->multicurrency_am);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
|
{
|
||||||
|
print price($objp->multicurrency_total_ttc - $objp->multicurrency_am);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
||||||
|
|
||||||
// Multicurrency
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.price($objp->multicurrency_total_ttc).'</td>';
|
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->am).'</td>';
|
print '<td align="right">'.price($objp->am).'</td>';
|
||||||
|
|
||||||
// Multicurrency
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.price($objp->multicurrency_am).'</td>';
|
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->total_ttc - $objp->am).'</td>';
|
print '<td align="right">'.price($objp->total_ttc - $objp->am).'</td>';
|
||||||
|
|
||||||
// Multicurrency
|
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.price($objp->multicurrency_total_ttc - $objp->multicurrency_am).'</td>';
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$namef = 'amount_'.$objp->facid;
|
$namef = 'amount_'.$objp->facid;
|
||||||
if(!empty($conf->global->INVOICE_AUTO_FILLJS))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($objp->total_ttc - $objp->am)."'");
|
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($objp->total_ttc - $objp->am)."'");
|
||||||
print '<input type="text" size="8" name="'.$namef.'" value="'.GETPOST($namef).'">';
|
print '<input type="text" size="8" name="'.$namef.'" value="'.GETPOST($namef).'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -479,10 +500,13 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$namef = 'multicurrency_amount_'.$objp->facid;
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
if(!empty($conf->global->INVOICE_AUTO_FILLJS))
|
{
|
||||||
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($objp->multicurrency_total_ttc - $objp->multicurrency_am)."'");
|
$namef = 'multicurrency_amount_'.$objp->facid;
|
||||||
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.GETPOST($namef).'">';
|
if (!empty($conf->use_javascript_ajax))
|
||||||
|
print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($objp->multicurrency_total_ttc - $objp->multicurrency_am)."'");
|
||||||
|
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.GETPOST($namef).'">';
|
||||||
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,7 +520,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
// Print total
|
// Print total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="3" align="left">'.$langs->trans('TotalTTC').':</td>';
|
print '<td colspan="4" align="left">'.$langs->trans('TotalTTC').':</td>';
|
||||||
print '<td align="right"><b>'.price($total_ttc).'</b></td>';
|
print '<td align="right"><b>'.price($total_ttc).'</b></td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||||
print '<td align="right"><b>'.price($totalrecu).'</b></td>';
|
print '<td align="right"><b>'.price($totalrecu).'</b></td>';
|
||||||
|
|||||||
@ -222,6 +222,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'holiday';
|
$modulepart = 'holiday';
|
||||||
$permission = $user->rights->holiday->write;
|
$permission = $user->rights->holiday->write;
|
||||||
|
$permtoedit = $user->rights->holiday->write;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -696,13 +696,12 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
|
|||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (630, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '628', 'Installations bâtiments administratifs et commerciaux', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (630, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '628', 'Installations bâtiments administratifs et commerciaux', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (631, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '628', 'Installations bâtiments d''exploitation', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (631, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '628', 'Installations bâtiments d''exploitation', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (632, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '628', 'Installations voies de transport et ouvrages d''art', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (632, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '628', 'Installations voies de transport et ouvrages d''art', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (633, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2300', '628', 'Installation d''eau', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (633, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2304', '628', 'Installation d''eau', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (634, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '628', 'Installation d''électricité', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (634, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2305', '628', 'Installation d''électricité', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (635, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '628', 'Installation de vapeur', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (635, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2306', '628', 'Installation de vapeur', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (636, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '628', 'Installation de gaz', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (636, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2307', '628', 'Installation de gaz', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (637, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2304', '628', 'Installation de chauffage', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (637, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2308', '628', 'Installation de chauffage', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (638, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2305', '628', 'Installation de conditionnement d''air', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (638, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2309', '628', 'Installation de conditionnement d''air', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (639, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2306', '628', 'Installation de chargement', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (640, 'PCMN-BASE', 'IMMO', 'XXXXXX', '231', '627', 'Machines', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (640, 'PCMN-BASE', 'IMMO', 'XXXXXX', '231', '627', 'Machines', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (641, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2310', '640', 'Division A', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (641, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2310', '640', 'Division A', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (642, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2311', '640', 'Division B', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (642, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2311', '640', 'Division B', 1);
|
||||||
@ -1297,7 +1296,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
|
|||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1231, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6632', '1228', 'Sur immobilisations détenues en location-financement et droits similaires', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1231, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6632', '1228', 'Sur immobilisations détenues en location-financement et droits similaires', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1232, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6633', '1228', 'Sur immobilisations financières', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1232, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6633', '1228', 'Sur immobilisations financières', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1233, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6634', '1228', 'Sur immeubles acquis ou construits en vue de la revente', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1233, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6634', '1228', 'Sur immeubles acquis ou construits en vue de la revente', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1234, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '1221', 'à 668 Autres charges exceptionnelles', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1234, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '668', '1221', 'Autres charges exceptionnelles', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1235, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '1221', 'Pénalités et amendes diverses', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1235, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '1221', 'Pénalités et amendes diverses', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1236, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '665', '1221', 'Différence de charge', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1236, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '665', '1221', 'Différence de charge', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1237, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '669', '1221', 'Charges exceptionnelles transférées à l''actif en frais de restructuration', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1237, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '669', '1221', 'Charges exceptionnelles transférées à l''actif en frais de restructuration', 1);
|
||||||
@ -1367,7 +1366,6 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
|
|||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1302, 'PCMN-BASE', 'PROD', 'XXXXXX', '740', '1301', 'Subsides d''exploitation et montants compensatoires', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1302, 'PCMN-BASE', 'PROD', 'XXXXXX', '740', '1301', 'Subsides d''exploitation et montants compensatoires', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1303, 'PCMN-BASE', 'PROD', 'XXXXXX', '741', '1301', 'Plus-values sur réalisations courantes d''immobilisations corporelles', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1303, 'PCMN-BASE', 'PROD', 'XXXXXX', '741', '1301', 'Plus-values sur réalisations courantes d''immobilisations corporelles', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1304, 'PCMN-BASE', 'PROD', 'XXXXXX', '742', '1301', 'Plus-values sur réalisations de créances commerciales', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1304, 'PCMN-BASE', 'PROD', 'XXXXXX', '742', '1301', 'Plus-values sur réalisations de créances commerciales', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1305, 'PCMN-BASE', 'PROD', 'XXXXXX', '743', '1301', 'à 749 Produits d''exploitation divers', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1306, 'PCMN-BASE', 'PROD', 'XXXXXX', '743', '1301', 'Produits de services exploités dans l''intérêt du personnel', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1306, 'PCMN-BASE', 'PROD', 'XXXXXX', '743', '1301', 'Produits de services exploités dans l''intérêt du personnel', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1307, 'PCMN-BASE', 'PROD', 'XXXXXX', '744', '1301', 'Commissions et courtages', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1307, 'PCMN-BASE', 'PROD', 'XXXXXX', '744', '1301', 'Commissions et courtages', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1308, 'PCMN-BASE', 'PROD', 'XXXXXX', '745', '1301', 'Redevances pour brevets et licences', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1308, 'PCMN-BASE', 'PROD', 'XXXXXX', '745', '1301', 'Redevances pour brevets et licences', 1);
|
||||||
@ -1387,7 +1385,6 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
|
|||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1322, 'PCMN-BASE', 'PROD', 'XXXXXX', '753', '1315', 'Subsides en capital et en intérêts', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1322, 'PCMN-BASE', 'PROD', 'XXXXXX', '753', '1315', 'Subsides en capital et en intérêts', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1323, 'PCMN-BASE', 'PROD', 'XXXXXX', '754', '1315', 'Différences de change', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1323, 'PCMN-BASE', 'PROD', 'XXXXXX', '754', '1315', 'Différences de change', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1324, 'PCMN-BASE', 'PROD', 'XXXXXX', '755', '1315', 'Ecarts de conversion des devises', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1324, 'PCMN-BASE', 'PROD', 'XXXXXX', '755', '1315', 'Ecarts de conversion des devises', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1325, 'PCMN-BASE', 'PROD', 'XXXXXX', '756', '1315', 'à 759 Produits financiers divers', 1);
|
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1326, 'PCMN-BASE', 'PROD', 'XXXXXX', '756', '1315', 'Produits des autres créances', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1326, 'PCMN-BASE', 'PROD', 'XXXXXX', '756', '1315', 'Produits des autres créances', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1327, 'PCMN-BASE', 'PROD', 'XXXXXX', '757', '1315', 'Escomptes obtenus', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1327, 'PCMN-BASE', 'PROD', 'XXXXXX', '757', '1315', 'Escomptes obtenus', 1);
|
||||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1328, 'PCMN-BASE', 'PROD', 'XXXXXX', '76', '1357', 'Produits exceptionnels', 1);
|
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1328, 'PCMN-BASE', 'PROD', 'XXXXXX', '76', '1357', 'Produits exceptionnels', 1);
|
||||||
|
|||||||
@ -30,6 +30,11 @@ ALTER TABLE llx_product_lot MODIFY COLUMN entity integer DEFAULT 1;
|
|||||||
UPDATE llx_product_lot SET entity = 1 WHERE entity IS NULL;
|
UPDATE llx_product_lot SET entity = 1 WHERE entity IS NULL;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_code_ventilation (fk_code_ventilation);
|
||||||
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_code_ventilation (fk_code_ventilation);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_product (fk_product);
|
||||||
|
|
||||||
ALTER TABLE llx_facture_rec ADD COLUMN fk_user_modif integer;
|
ALTER TABLE llx_facture_rec ADD COLUMN fk_user_modif integer;
|
||||||
|
|
||||||
ALTER TABLE llx_adherent ADD COLUMN model_pdf varchar(255);
|
ALTER TABLE llx_adherent ADD COLUMN model_pdf varchar(255);
|
||||||
@ -132,6 +137,6 @@ ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp;
|
|||||||
-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN numero_compte SET NOT NULL;
|
-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN numero_compte SET NOT NULL;
|
||||||
-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN code_journal SET NOT NULL;
|
-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN code_journal SET NOT NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_accounting_account ADD INDEX uk_accounting_account (account_number, entity);
|
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
||||||
|
|
||||||
ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint
|
ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_fk_pcg_version (fk_pcg_version);
|
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_fk_pcg_version (fk_pcg_version);
|
||||||
ALTER TABLE llx_accounting_account ADD INDEX uk_accounting_account (account_number, entity);
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
||||||
|
|
||||||
-- This keys are created into foreign table after creation of foreign index
|
-- This keys are created into foreign table after creation of foreign index
|
||||||
--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
|
--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.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
|
||||||
@ -21,5 +21,8 @@
|
|||||||
-- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL;
|
-- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn);
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn);
|
||||||
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_product (fk_product);
|
||||||
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_code_ventilation (fk_code_ventilation);
|
||||||
|
|
||||||
ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid);
|
ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid);
|
||||||
ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid);
|
ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid);
|
||||||
@ -1,6 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
-- Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
-- Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
-- Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.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
|
||||||
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture);
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture);
|
||||||
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_product (fk_product);
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_product (fk_product);
|
||||||
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_code_ventilation (fk_code_ventilation);
|
||||||
|
|
||||||
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture);
|
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture);
|
||||||
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
||||||
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid);
|
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid);
|
||||||
|
|||||||
@ -419,6 +419,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
|
|||||||
|
|
||||||
// Reload modules (this must be always and only into last targeted version)
|
// Reload modules (this must be always and only into last targeted version)
|
||||||
$listofmodule=array(
|
$listofmodule=array(
|
||||||
|
'MAIN_MODULE_ACCOUNTING'=>'newboxdefonly',
|
||||||
'MAIN_MODULE_BARCODE'=>'newboxdefonly',
|
'MAIN_MODULE_BARCODE'=>'newboxdefonly',
|
||||||
'MAIN_MODULE_CRON'=>'newboxdefonly',
|
'MAIN_MODULE_CRON'=>'newboxdefonly',
|
||||||
'MAIN_MODULE_FACTURE'=>'newboxdefonly',
|
'MAIN_MODULE_FACTURE'=>'newboxdefonly',
|
||||||
|
|||||||
@ -39,6 +39,7 @@ Ventilation=Binding to accounts
|
|||||||
ProductsBinding=Products binding
|
ProductsBinding=Products binding
|
||||||
|
|
||||||
MenuAccountancy=Accountancy
|
MenuAccountancy=Accountancy
|
||||||
|
MenuDefaultAccounts=Default accounts
|
||||||
CustomersVentilation=Customer invoice binding
|
CustomersVentilation=Customer invoice binding
|
||||||
SuppliersVentilation=Supplier invoice binding
|
SuppliersVentilation=Supplier invoice binding
|
||||||
CreateMvts=Create new transaction
|
CreateMvts=Create new transaction
|
||||||
@ -53,12 +54,12 @@ InvoiceLinesDone=Bound lines of invoices
|
|||||||
IntoAccount=Bind line with the accounting account
|
IntoAccount=Bind line with the accounting account
|
||||||
|
|
||||||
Ventilate=Bind
|
Ventilate=Bind
|
||||||
|
LineId=Id line
|
||||||
Processing=Processing
|
Processing=Processing
|
||||||
EndProcessing=The end of processing
|
EndProcessing=Process terminated.
|
||||||
AnyLineVentilate=Any lines to bind
|
|
||||||
SelectedLines=Selected lines
|
SelectedLines=Selected lines
|
||||||
Lineofinvoice=Line of invoice
|
Lineofinvoice=Line of invoice
|
||||||
|
NoAccountSelected=No accounting account selected
|
||||||
VentilatedinAccount=Binded successfully to the accounting account
|
VentilatedinAccount=Binded successfully to the accounting account
|
||||||
NotVentilatedinAccount=Not bound to the accounting account
|
NotVentilatedinAccount=Not bound to the accounting account
|
||||||
XLineSuccessfullyBinded=%s products/services successfuly bound to an accounting account
|
XLineSuccessfullyBinded=%s products/services successfuly bound to an accounting account
|
||||||
@ -68,12 +69,12 @@ ACCOUNTING_LIMIT_LIST_VENTILATION=Number of elements to bind shown by page (maxi
|
|||||||
ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the page "Binding to do" by the most recent elements
|
ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the page "Binding to do" by the most recent elements
|
||||||
ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding done" by the most recent elements
|
ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding done" by the most recent elements
|
||||||
|
|
||||||
ACCOUNTING_LENGTH_DESCRIPTION=Length for displaying product & services description in listings (Best = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50)
|
||||||
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (Best = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50)
|
||||||
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts
|
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts
|
||||||
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts
|
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts
|
||||||
ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disable by default. Be careful with the function "length of the accounts".
|
ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disabled by default. If set to on, you must also set the 2 following parameters (or it is ignored)
|
||||||
BANK_DISABLE_DIRECT_INPUT=Disable free input of bank transactions (Enabled by default with this module).
|
BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account
|
||||||
|
|
||||||
ACCOUNTING_SELL_JOURNAL=Sell journal
|
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||||
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal
|
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal
|
||||||
@ -98,12 +99,14 @@ Labelcompte=Label account
|
|||||||
Sens=Sens
|
Sens=Sens
|
||||||
Codejournal=Journal
|
Codejournal=Journal
|
||||||
NumPiece=Piece number
|
NumPiece=Piece number
|
||||||
|
TransactionNumShort=Num. transaction
|
||||||
AccountingCategory=Accounting category
|
AccountingCategory=Accounting category
|
||||||
|
GroupByAccountAccounting=Group by accounting account
|
||||||
NotMatch=Not Set
|
NotMatch=Not Set
|
||||||
DeleteMvt=Delete general ledger lines
|
DeleteMvt=Delete general ledger lines
|
||||||
DelYear=Year to delete
|
DelYear=Year to delete
|
||||||
DelJournal=Journal to delete
|
DelJournal=Journal to delete
|
||||||
ConfirmDeleteMvt=This will delete all lines of the general ledger for year and/or from a specifics journal
|
ConfirmDeleteMvt=This will delete all lines of the general ledger for year and/or from a specific journal. At least one criteria is required.
|
||||||
ConfirmDeleteMvtPartial=This will delete the selected line(s) of the general ledger
|
ConfirmDeleteMvtPartial=This will delete the selected line(s) of the general ledger
|
||||||
DelBookKeeping=Delete the record of the general ledger
|
DelBookKeeping=Delete the record of the general ledger
|
||||||
FinanceJournal=Finance journal
|
FinanceJournal=Finance journal
|
||||||
@ -186,7 +189,7 @@ Calculated=Calculated
|
|||||||
Formula=Formula
|
Formula=Formula
|
||||||
|
|
||||||
## Error
|
## Error
|
||||||
ErrorNoAccountingCategoryForThisCountry=No accounting category are available for this country
|
ErrorNoAccountingCategoryForThisCountry=No accounting category available for country %s (See Home - Setup - Dictionaries)
|
||||||
ExportNotSupported=The export format setuped is not supported into this page
|
ExportNotSupported=The export format setuped is not supported into this page
|
||||||
BookeppingLineAlreayExists=Lines already existing into bookeeping
|
BookeppingLineAlreayExists=Lines already existing into bookeeping
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ ErrorDecimalLargerThanAreForbidden=Error, a precision higher than <b>%s</b> is n
|
|||||||
DictionarySetup=Dictionary setup
|
DictionarySetup=Dictionary setup
|
||||||
Dictionary=Dictionaries
|
Dictionary=Dictionaries
|
||||||
Chartofaccounts=Chart of accounts
|
Chartofaccounts=Chart of accounts
|
||||||
Fiscalyear=Fiscal year
|
FiscalPeriod=Accounting period
|
||||||
ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record
|
ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record
|
||||||
ErrorCodeCantContainZero=Code can't contain value 0
|
ErrorCodeCantContainZero=Code can't contain value 0
|
||||||
DisableJavascript=Disable JavaScript and Ajax functions (Recommended for blind person or text browsers)
|
DisableJavascript=Disable JavaScript and Ajax functions (Recommended for blind person or text browsers)
|
||||||
@ -244,6 +244,9 @@ MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt
|
|||||||
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
|
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
|
||||||
MAIN_SMS_SENDMODE=Method to use to send SMS
|
MAIN_SMS_SENDMODE=Method to use to send SMS
|
||||||
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending
|
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending
|
||||||
|
MAIN_MAIL_DEFAULT_FROMTYPE=Sender e-mail by default for manual sendings (User email or Company email)
|
||||||
|
UserEmail=User email
|
||||||
|
CompanyEmail=Company email
|
||||||
FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally.
|
FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally.
|
||||||
SubmitTranslation=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit your change to www.transifex.com/dolibarr-association/dolibarr/
|
SubmitTranslation=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit your change to www.transifex.com/dolibarr-association/dolibarr/
|
||||||
SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr.
|
SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr.
|
||||||
@ -1523,14 +1526,14 @@ TaskModelModule=Tasks reports document model
|
|||||||
UseSearchToSelectProject=Use autocompletion fields to choose project (instead of using a list box)
|
UseSearchToSelectProject=Use autocompletion fields to choose project (instead of using a list box)
|
||||||
##### ECM (GED) #####
|
##### ECM (GED) #####
|
||||||
##### Fiscal Year #####
|
##### Fiscal Year #####
|
||||||
FiscalYears=Fiscal years
|
AccountingPeriods=Accounting periods
|
||||||
FiscalYearCard=Fiscal year card
|
AccountingPeriodCard=Accounting period
|
||||||
NewFiscalYear=New fiscal year
|
NewFiscalYear=New accounting period
|
||||||
OpenFiscalYear=Open fiscal year
|
OpenFiscalYear=Open accounting period
|
||||||
CloseFiscalYear=Close fiscal year
|
CloseFiscalYear=Close accounting period
|
||||||
DeleteFiscalYear=Delete fiscal year
|
DeleteFiscalYear=Delete accounting period
|
||||||
ConfirmDeleteFiscalYear=Are you sure to delete this fiscal year?
|
ConfirmDeleteFiscalYear=Are you sure to delete this accounting period?
|
||||||
ShowFiscalYear=Show fiscal year
|
ShowFiscalYear=Show accounting period
|
||||||
AlwaysEditable=Can always be edited
|
AlwaysEditable=Can always be edited
|
||||||
MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application)
|
MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application)
|
||||||
NbMajMin=Minimum number of uppercase characters
|
NbMajMin=Minimum number of uppercase characters
|
||||||
|
|||||||
@ -176,6 +176,7 @@ ErrorStockIsNotEnoughToAddProductOnShipment=Stock is not enougth for product %s
|
|||||||
ErrorStockIsNotEnoughToAddProductOnProposal=Stock is not enougth for product %s to add it into a new proposal.
|
ErrorStockIsNotEnoughToAddProductOnProposal=Stock is not enougth for product %s to add it into a new proposal.
|
||||||
ErrorFailedToLoadLoginFileForMode=Failed to get the login file for mode '%s'.
|
ErrorFailedToLoadLoginFileForMode=Failed to get the login file for mode '%s'.
|
||||||
ErrorModuleNotFound=File of module was not found.
|
ErrorModuleNotFound=File of module was not found.
|
||||||
|
ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined for source bank line %s
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
||||||
|
|||||||
@ -28,6 +28,7 @@ NoTemplateDefined=No template defined for this email type
|
|||||||
AvailableVariables=Available substitution variables
|
AvailableVariables=Available substitution variables
|
||||||
NoTranslation=No translation
|
NoTranslation=No translation
|
||||||
NoRecordFound=No record found
|
NoRecordFound=No record found
|
||||||
|
NoRecordDeleted=No record deleted
|
||||||
NotEnoughDataYet=Not enough data
|
NotEnoughDataYet=Not enough data
|
||||||
NoError=No error
|
NoError=No error
|
||||||
Error=Error
|
Error=Error
|
||||||
@ -69,6 +70,7 @@ SeeHere=See here
|
|||||||
BackgroundColorByDefault=Default background color
|
BackgroundColorByDefault=Default background color
|
||||||
FileRenamed=The file was successfully renamed
|
FileRenamed=The file was successfully renamed
|
||||||
FileUploaded=The file was successfully uploaded
|
FileUploaded=The file was successfully uploaded
|
||||||
|
FileGenerated=The file was successfully generated
|
||||||
FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this.
|
FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this.
|
||||||
NbOfEntries=Nb of entries
|
NbOfEntries=Nb of entries
|
||||||
GoToWikiHelpPage=Read online help (Internet access needed)
|
GoToWikiHelpPage=Read online help (Internet access needed)
|
||||||
@ -574,6 +576,7 @@ CanBeModifiedIfOk=Can be modified if valid
|
|||||||
CanBeModifiedIfKo=Can be modified if not valid
|
CanBeModifiedIfKo=Can be modified if not valid
|
||||||
ValueIsValid=Value is valid
|
ValueIsValid=Value is valid
|
||||||
ValueIsNotValid=Value is not valid
|
ValueIsNotValid=Value is not valid
|
||||||
|
RecordCreatedSuccessfully=Record created successfully
|
||||||
RecordModifiedSuccessfully=Record modified successfully
|
RecordModifiedSuccessfully=Record modified successfully
|
||||||
RecordsModified=%s record modified
|
RecordsModified=%s record modified
|
||||||
RecordsDeleted=%s record deleted
|
RecordsDeleted=%s record deleted
|
||||||
@ -716,6 +719,7 @@ DeleteLine=Delete line
|
|||||||
ConfirmDeleteLine=Are you sure you want to delete this line?
|
ConfirmDeleteLine=Are you sure you want to delete this line?
|
||||||
NoPDFAvailableForDocGenAmongChecked=No PDF were available for the document generation among checked records
|
NoPDFAvailableForDocGenAmongChecked=No PDF were available for the document generation among checked records
|
||||||
TooManyRecordForMassAction=Too many record selected for mass action. The action is restricted to a list of %s records.
|
TooManyRecordForMassAction=Too many record selected for mass action. The action is restricted to a list of %s records.
|
||||||
|
NoRecordSelected=No record were selected
|
||||||
MassFilesArea=Area for files built by mass actions
|
MassFilesArea=Area for files built by mass actions
|
||||||
ShowTempMassFilesArea=Show area of files built by mass actions
|
ShowTempMassFilesArea=Show area of files built by mass actions
|
||||||
RelatedObjects=Related Objects
|
RelatedObjects=Related Objects
|
||||||
@ -727,8 +731,12 @@ BackOffice=Back office
|
|||||||
View=View
|
View=View
|
||||||
Export=Export
|
Export=Export
|
||||||
Exports=Exports
|
Exports=Exports
|
||||||
|
ExportFilteredList=Export filtered list
|
||||||
|
ExportList=Export list
|
||||||
Miscellaneous=Miscellaneous
|
Miscellaneous=Miscellaneous
|
||||||
Calendar=Calendar
|
Calendar=Calendar
|
||||||
|
GroupBy=Group by...
|
||||||
|
ViewFlatList=View flat list
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Monday
|
Monday=Monday
|
||||||
Tuesday=Tuesday
|
Tuesday=Tuesday
|
||||||
|
|||||||
@ -12,4 +12,7 @@ multicurrency_appCurrencySource=Currency source
|
|||||||
multicurrency_alternateCurrencySource= Alternate currency souce
|
multicurrency_alternateCurrencySource= Alternate currency souce
|
||||||
CurrenciesUsed=Currencies used
|
CurrenciesUsed=Currencies used
|
||||||
CurrenciesUsed_help_to_add=Add the differents currencies and rates you need to use on you <b>proposals</b>, <b>orders</b>, etc.
|
CurrenciesUsed_help_to_add=Add the differents currencies and rates you need to use on you <b>proposals</b>, <b>orders</b>, etc.
|
||||||
rate=rate
|
rate=rate
|
||||||
|
MulticurrencyReceived=Received, original currency
|
||||||
|
MulticurrencyRemainderToTake=Remaining amout, original currency
|
||||||
|
MulticurrencyPaymentAmount=Payment amount, original currency
|
||||||
@ -39,11 +39,9 @@ Ventilation=Liés aux comptes
|
|||||||
ProductsBinding=Liaison produits
|
ProductsBinding=Liaison produits
|
||||||
|
|
||||||
MenuAccountancy=Comptabilité
|
MenuAccountancy=Comptabilité
|
||||||
|
MenuDefaultAccounts=Comptes par défaut
|
||||||
CustomersVentilation=Factures client liées
|
CustomersVentilation=Factures client liées
|
||||||
SuppliersVentilation=Factures fournisseurs liées
|
SuppliersVentilation=Factures fournisseurs liées
|
||||||
Reports=Rapports
|
|
||||||
NewAccount=Nouveau compte comptable
|
|
||||||
Create=Créer
|
|
||||||
CreateMvts=Créer nouvelle transaction
|
CreateMvts=Créer nouvelle transaction
|
||||||
UpdateMvts=Modification d'une transaction
|
UpdateMvts=Modification d'une transaction
|
||||||
WriteBookKeeping=Enregistrer les opérations dans le Grand Livre
|
WriteBookKeeping=Enregistrer les opérations dans le Grand Livre
|
||||||
@ -56,12 +54,12 @@ InvoiceLinesDone=Lignes de factures liées
|
|||||||
IntoAccount=Lier ligne avec le compte comptable
|
IntoAccount=Lier ligne avec le compte comptable
|
||||||
|
|
||||||
Ventilate=Lier
|
Ventilate=Lier
|
||||||
|
LineId=Id ligne
|
||||||
Processing=Traitement en cours
|
Processing=Traitement en cours
|
||||||
EndProcessing=Fin du traitement
|
EndProcessing=Fin du traitement
|
||||||
AnyLineVentilate=Toutes lignes à lier
|
|
||||||
SelectedLines=Lignes sélectionnées
|
SelectedLines=Lignes sélectionnées
|
||||||
Lineofinvoice=Ligne de la facture
|
Lineofinvoice=Ligne de la facture
|
||||||
|
NoAccountSelected=Pas de compte comptable sélectionné
|
||||||
VentilatedinAccount=Liée avec succès sur compte comptable
|
VentilatedinAccount=Liée avec succès sur compte comptable
|
||||||
NotVentilatedinAccount=Non lié au compte comptable
|
NotVentilatedinAccount=Non lié au compte comptable
|
||||||
XLineSuccessfullyBinded=%s produits/services liés avec succès à un compte comptable
|
XLineSuccessfullyBinded=%s produits/services liés avec succès à un compte comptable
|
||||||
@ -71,12 +69,12 @@ ACCOUNTING_LIMIT_LIST_VENTILATION=Nombre d'éléments à lier représentés par
|
|||||||
ACCOUNTING_LIST_SORT_VENTILATION_TODO=Trier de la page "Lien à réaliser" par les éléments les plus récents
|
ACCOUNTING_LIST_SORT_VENTILATION_TODO=Trier de la page "Lien à réaliser" par les éléments les plus récents
|
||||||
ACCOUNTING_LIST_SORT_VENTILATION_DONE=Trier la page "Liens réalisés" par les éléments les plus récents
|
ACCOUNTING_LIST_SORT_VENTILATION_DONE=Trier la page "Liens réalisés" par les éléments les plus récents
|
||||||
|
|
||||||
ACCOUNTING_LENGTH_DESCRIPTION=Longueur pour afficher la description des produits & services dans les listes (Idéalement = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION=Tronquer la description des produits & services dans les listes à n caractères (Idéalement = 50)
|
||||||
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Longueur pour afficher la description du compte des produits & services dans les listes (Idéalement = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Tronquer la description du compte des produits & services dans les listes à n caractères (Idéalement = 50)
|
||||||
ACCOUNTING_LENGTH_GACCOUNT=Longueur des comptes généraux
|
ACCOUNTING_LENGTH_GACCOUNT=Longueur des comptes généraux
|
||||||
ACCOUNTING_LENGTH_AACCOUNT=Longueur des comptes tiers
|
ACCOUNTING_LENGTH_AACCOUNT=Longueur des comptes tiers
|
||||||
ACCOUNTING_MANAGE_ZERO=Ajouter des 0 à la fin des codes comptable. Fonctionnalité nécessaire pour certains pays, désactivée par défaut. Attention à la fonction "longueur des comptes" de vos codes comptables.
|
ACCOUNTING_MANAGE_ZERO=Ajouter des 0 à la fin des codes comptables. Fonctionnalité nécessaire pour certains pays. Désactivée par défaut. Si vous positionnez cette option à Oui, il vous faut aussi définir les 2 paramètres suivants (sinon celui-ci sera ignoré)
|
||||||
BANK_DISABLE_DIRECT_INPUT=Désactiver la saisie directe de transactions en banque (Activé par défaut avec ce module).
|
BANK_DISABLE_DIRECT_INPUT=Désactiver la saisie directe de transactions en banque
|
||||||
|
|
||||||
ACCOUNTING_SELL_JOURNAL=Journal des ventes
|
ACCOUNTING_SELL_JOURNAL=Journal des ventes
|
||||||
ACCOUNTING_PURCHASE_JOURNAL=Journal des achats
|
ACCOUNTING_PURCHASE_JOURNAL=Journal des achats
|
||||||
@ -101,16 +99,16 @@ Labelcompte=Libellé du compte
|
|||||||
Sens=Sens
|
Sens=Sens
|
||||||
Codejournal=Journal
|
Codejournal=Journal
|
||||||
NumPiece=Numéro de pièce
|
NumPiece=Numéro de pièce
|
||||||
|
TransactionNumShort=Num. transaction
|
||||||
AccountingCategory=Catégorie comptable
|
AccountingCategory=Catégorie comptable
|
||||||
|
GroupByAccountAccounting=Grouper par compte comptable
|
||||||
NotMatch=Non défini
|
NotMatch=Non défini
|
||||||
DeleteMvt=Supprimer les lignes du grand livre
|
DeleteMvt=Supprimer les lignes du grand livre
|
||||||
DelYear=Année à supprimer
|
DelYear=Année à supprimer
|
||||||
DelJournal=Journal à supprimer
|
DelJournal=Journal à supprimer
|
||||||
ConfirmDeleteMvt=Cela supprimera toutes les lignes du Grand Livre pour l'année et/ou un journal spécifique
|
ConfirmDeleteMvt=Cela supprimera toutes les lignes du Grand Livre pour l'année et/ou un journal spécifique. Au moins un critère est requis.
|
||||||
ConfirmDeleteMvtPartial=Ceci va supprimer la(les) ligne(s) sélectionnée(s) du Grand Livre
|
ConfirmDeleteMvtPartial=Ceci va supprimer la(les) ligne(s) sélectionnée(s) du Grand Livre
|
||||||
DelBookKeeping=Supprimer les écritures du grand livre
|
DelBookKeeping=Supprimer les écritures du grand livre
|
||||||
DescSellsJournal=Journal des ventes
|
|
||||||
DescPurchasesJournal=Journal des achats
|
|
||||||
FinanceJournal=Journal de trésorerie
|
FinanceJournal=Journal de trésorerie
|
||||||
DescFinanceJournal=Journal de trésorerie comprenant tous les types de paiements par compte bancaire / caisse
|
DescFinanceJournal=Journal de trésorerie comprenant tous les types de paiements par compte bancaire / caisse
|
||||||
DescJournalOnlyBindedVisible=Ceci est une vue de enregistrements qui sont liés à un compte comptable produits et qui peuvent être enregistrées dans le Grand Livre.
|
DescJournalOnlyBindedVisible=Ceci est une vue de enregistrements qui sont liés à un compte comptable produits et qui peuvent être enregistrées dans le Grand Livre.
|
||||||
@ -127,12 +125,10 @@ ErrorDebitCredit=Débit et crédit ne peuvent pas avoir la même valeur en même
|
|||||||
|
|
||||||
ReportThirdParty=Liste des comptes tiers
|
ReportThirdParty=Liste des comptes tiers
|
||||||
DescThirdPartyReport=Consultez ici la liste des tiers clients et fournisseurs et leurs codes comptables
|
DescThirdPartyReport=Consultez ici la liste des tiers clients et fournisseurs et leurs codes comptables
|
||||||
|
|
||||||
ListAccounts=Liste des comptes comptables
|
ListAccounts=Liste des comptes comptables
|
||||||
|
|
||||||
Pcgtype=Classe de compte
|
Pcgtype=Classe de compte
|
||||||
Pcgsubtype=Sous classe de compte
|
Pcgsubtype=Sous classe de compte
|
||||||
Accountparent=Racine des comptes
|
|
||||||
|
|
||||||
TotalVente=Total chiffre affaires hors taxe
|
TotalVente=Total chiffre affaires hors taxe
|
||||||
TotalMarge=Total marge
|
TotalMarge=Total marge
|
||||||
@ -193,7 +189,7 @@ Calculated=Calculé
|
|||||||
Formula=Formule
|
Formula=Formule
|
||||||
|
|
||||||
## Error
|
## Error
|
||||||
ErrorNoAccountingCategoryForThisCountry=Pas de catégories comptable disponibles pour ce pays
|
ErrorNoAccountingCategoryForThisCountry=Pas de catégories comptable disponibles pour le pays %s (Voir Accueil - Configuration - Dictionnaires)
|
||||||
ExportNotSupported=Le format de l'export n'est pas supporté par cette page
|
ExportNotSupported=Le format de l'export n'est pas supporté par cette page
|
||||||
BookeppingLineAlreayExists=Lignes dejà existantes dans le grand livre
|
BookeppingLineAlreayExists=Lignes dejà existantes dans le grand livre
|
||||||
|
|
||||||
@ -201,4 +197,3 @@ Binded=Lignes liées
|
|||||||
ToBind=Lignes à lier
|
ToBind=Lignes à lier
|
||||||
|
|
||||||
WarningReportNotReliable=Attention, ce rapport ne se fonde pas sur le Grand Livre, donc n'est pas précis pour l'instant. Il sera remplacé par un rapport plus fiable dans une prochaine version.
|
WarningReportNotReliable=Attention, ce rapport ne se fonde pas sur le Grand Livre, donc n'est pas précis pour l'instant. Il sera remplacé par un rapport plus fiable dans une prochaine version.
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ ErrorDecimalLargerThanAreForbidden=Erreur, les précisions supérieures à <b>%s
|
|||||||
DictionarySetup=Dictionnaires
|
DictionarySetup=Dictionnaires
|
||||||
Dictionary=Dictionnaires
|
Dictionary=Dictionnaires
|
||||||
Chartofaccounts=Plan comptable
|
Chartofaccounts=Plan comptable
|
||||||
Fiscalyear=Exercice fiscal
|
FiscalPeriod=Période fiscale
|
||||||
ErrorReservedTypeSystemSystemAuto=Erreur, les valeurs 'system' et 'systemauto' sont réservées. Vous pouvez utiliser la valeur 'user' pour ajouter vos propres enregistrements
|
ErrorReservedTypeSystemSystemAuto=Erreur, les valeurs 'system' et 'systemauto' sont réservées. Vous pouvez utiliser la valeur 'user' pour ajouter vos propres enregistrements
|
||||||
ErrorCodeCantContainZero=Erreur, le code ne peut contenir la valeur 0
|
ErrorCodeCantContainZero=Erreur, le code ne peut contenir la valeur 0
|
||||||
DisableJavascript=Désactive les fonctions Javascript et Ajax (Recommandé pour les personnes aveugles ou navigateurs text).
|
DisableJavascript=Désactive les fonctions Javascript et Ajax (Recommandé pour les personnes aveugles ou navigateurs text).
|
||||||
@ -1105,9 +1105,8 @@ WatermarkOnDraft=Filigrane sur les documents brouillons
|
|||||||
JSOnPaimentBill=Activer la fonctionnalité de remplissage automatique des lignes de paiement sur le formulaire de paiement
|
JSOnPaimentBill=Activer la fonctionnalité de remplissage automatique des lignes de paiement sur le formulaire de paiement
|
||||||
CompanyIdProfChecker=Règles sur les Identifiants professionnels
|
CompanyIdProfChecker=Règles sur les Identifiants professionnels
|
||||||
MustBeUnique=Doit être unique ?
|
MustBeUnique=Doit être unique ?
|
||||||
MustBeMandatory=Obligatoire pour creer tiers ?
|
MustBeMandatory=Obligatoire pour créer des tiers ?
|
||||||
MustBeInvoiceMandatory=Obligatoire pour valider factures ?
|
MustBeInvoiceMandatory=Obligatoire pour valider des factures ?
|
||||||
Miscellaneous=Divers
|
|
||||||
##### Webcal setup #####
|
##### Webcal setup #####
|
||||||
WebCalUrlForVCalExport=Un lien d'exportation du calendrier au format <b>%s</b> sera disponible à l'url :<br>%s
|
WebCalUrlForVCalExport=Un lien d'exportation du calendrier au format <b>%s</b> sera disponible à l'url :<br>%s
|
||||||
##### Invoices #####
|
##### Invoices #####
|
||||||
@ -1524,14 +1523,14 @@ TaskModelModule=Modèles de document de rapport tâches
|
|||||||
UseSearchToSelectProject=Utilisez un champ avec auto-complétion pour choisir les projets (plutôt qu'une liste déroulante).
|
UseSearchToSelectProject=Utilisez un champ avec auto-complétion pour choisir les projets (plutôt qu'une liste déroulante).
|
||||||
##### ECM (GED) #####
|
##### ECM (GED) #####
|
||||||
##### Fiscal Year #####
|
##### Fiscal Year #####
|
||||||
FiscalYears=Exercices fiscaux
|
AccountingPeriods=Période fiscales
|
||||||
FiscalYearCard=Fiche exercice fiscal
|
AccountingPeriodCard=Période fiscale
|
||||||
NewFiscalYear=Nouvel exercice fiscal
|
NewFiscalYear=Nouvelle période fiscale
|
||||||
OpenFiscalYear=Exercice fiscal ouvert
|
OpenFiscalYear=Ouvrir période fiscale
|
||||||
CloseFiscalYear=Exercice fiscal cloturé
|
CloseFiscalYear=Fermer période fiscale
|
||||||
DeleteFiscalYear=Effacer exercice fiscal
|
DeleteFiscalYear=Effacer période fiscale
|
||||||
ConfirmDeleteFiscalYear=Êtes-vous sûr de vouloir supprimer cet exercice fiscal ?
|
ConfirmDeleteFiscalYear=Êtes-vous sûr de vouloir supprimer cette période fiscale ?
|
||||||
ShowFiscalYear=Voir l'exercice fiscal
|
ShowFiscalYear=Afficher période fiscale
|
||||||
AlwaysEditable=Peut toujours être édité
|
AlwaysEditable=Peut toujours être édité
|
||||||
MAIN_APPLICATION_TITLE=Forcer la valeur visible du nom de l'application (attention : positionner ici son propre nom rendra inopérante la fonction de remplissage automatique de l'identifiant lorsque vous utilisez l'application mobile DoliDroid)
|
MAIN_APPLICATION_TITLE=Forcer la valeur visible du nom de l'application (attention : positionner ici son propre nom rendra inopérante la fonction de remplissage automatique de l'identifiant lorsque vous utilisez l'application mobile DoliDroid)
|
||||||
NbMajMin=Nombre minimal de caractères majuscules
|
NbMajMin=Nombre minimal de caractères majuscules
|
||||||
|
|||||||
@ -3,7 +3,6 @@ IdAgenda=ID évènement
|
|||||||
Actions=Événements
|
Actions=Événements
|
||||||
Agenda=Agenda
|
Agenda=Agenda
|
||||||
Agendas=Agendas
|
Agendas=Agendas
|
||||||
Calendar=Calendrier
|
|
||||||
LocalAgenda=Calendrier interne
|
LocalAgenda=Calendrier interne
|
||||||
ActionsOwnedBy=Propriétaire de l'événement
|
ActionsOwnedBy=Propriétaire de l'événement
|
||||||
ActionsOwnedByShort=Propriétaire
|
ActionsOwnedByShort=Propriétaire
|
||||||
@ -34,11 +33,27 @@ AgendaAutoActionDesc= Définissez ici les événements pour lesquels Dolibarr cr
|
|||||||
AgendaSetupOtherDesc= Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (Thunderbird, Google calendar, …)
|
AgendaSetupOtherDesc= Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (Thunderbird, Google calendar, …)
|
||||||
AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr.
|
AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr.
|
||||||
ActionsEvents=Événements pour lesquels Dolibarr doit insérer un évènement dans l'agenda en automatique.
|
ActionsEvents=Événements pour lesquels Dolibarr doit insérer un évènement dans l'agenda en automatique.
|
||||||
|
##### Agenda event labels #####
|
||||||
|
NewCompanyToDolibarr=Tiers %s créé
|
||||||
|
ContractValidatedInDolibarr=Contrat %s validé
|
||||||
|
PropalClosedSignedInDolibarr=Proposition %s signée
|
||||||
|
PropalClosedRefusedInDolibarr=Proposition %s refusée
|
||||||
PropalValidatedInDolibarr=Proposition %s validée
|
PropalValidatedInDolibarr=Proposition %s validée
|
||||||
|
PropalClassifiedBilledInDolibarr=Proposition %s classée payée
|
||||||
InvoiceValidatedInDolibarr=Facture %s validée
|
InvoiceValidatedInDolibarr=Facture %s validée
|
||||||
InvoiceValidatedInDolibarrFromPos=Facture %s validée depuis le Point de Vente
|
InvoiceValidatedInDolibarrFromPos=Facture %s validée depuis le Point de Vente
|
||||||
InvoiceBackToDraftInDolibarr=Facture %s repassée en brouillon
|
InvoiceBackToDraftInDolibarr=Facture %s repassée en brouillon
|
||||||
InvoiceDeleteDolibarr=Facture %s supprimée
|
InvoiceDeleteDolibarr=Facture %s supprimée
|
||||||
|
InvoicePaidInDolibarr=Facture %s passée à payée
|
||||||
|
InvoiceCanceledInDolibarr=Facture %s annulée
|
||||||
|
MemberValidatedInDolibarr=Adhérent %s validé
|
||||||
|
MemberResiliatedInDolibarr=Adhérent %s résilié
|
||||||
|
MemberDeletedInDolibarr=Adhérent %s supprimé
|
||||||
|
MemberSubscriptionAddedInDolibarr=Souscription adhérent %s
|
||||||
|
ShipmentValidatedInDolibarr=Expédition %s validée
|
||||||
|
ShipmentClassifyClosedInDolibarr=Expédition %s classée payée
|
||||||
|
ShipmentUnClassifyCloseddInDolibarr=Expédition %s réouverte
|
||||||
|
ShipmentDeletedInDolibarr=Expédition %s supprimée
|
||||||
OrderValidatedInDolibarr=Commande %s validée
|
OrderValidatedInDolibarr=Commande %s validée
|
||||||
OrderDeliveredInDolibarr=Commande %s classée Livrée
|
OrderDeliveredInDolibarr=Commande %s classée Livrée
|
||||||
OrderCanceledInDolibarr=Commande %s annulée
|
OrderCanceledInDolibarr=Commande %s annulée
|
||||||
@ -57,9 +72,9 @@ InterventionSentByEMail=Intervention %s envoyée par email
|
|||||||
ProposalDeleted=Proposition commerciale supprimée
|
ProposalDeleted=Proposition commerciale supprimée
|
||||||
OrderDeleted=Commande supprimée
|
OrderDeleted=Commande supprimée
|
||||||
InvoiceDeleted=Facture supprimée
|
InvoiceDeleted=Facture supprimée
|
||||||
NewCompanyToDolibarr= Tiers créé
|
##### End agenda events #####
|
||||||
DateActionStart= Date de début
|
DateActionStart=Date de début
|
||||||
DateActionEnd= Date de fin
|
DateActionEnd=Date de fin
|
||||||
AgendaUrlOptions1=Vous pouvez aussi ajouter les paramètres suivants pour filtrer les réponses :
|
AgendaUrlOptions1=Vous pouvez aussi ajouter les paramètres suivants pour filtrer les réponses :
|
||||||
AgendaUrlOptions2=<b>login=%s</b> pour limiter l'export aux actions créées par ou assignées à l'utilisateur <b>%s</b>.
|
AgendaUrlOptions2=<b>login=%s</b> pour limiter l'export aux actions créées par ou assignées à l'utilisateur <b>%s</b>.
|
||||||
AgendaUrlOptions3=<b>logina=%s</b> pour limiter l'export aux actions dont l'utilisateur <b>%s</b> est propriétaire.
|
AgendaUrlOptions3=<b>logina=%s</b> pour limiter l'export aux actions dont l'utilisateur <b>%s</b> est propriétaire.
|
||||||
@ -86,7 +101,7 @@ MyAvailability=Ma disponibilité
|
|||||||
ActionType=Type événement
|
ActionType=Type événement
|
||||||
DateActionBegin=Date début événément
|
DateActionBegin=Date début événément
|
||||||
CloneAction=Cloner l'événement
|
CloneAction=Cloner l'événement
|
||||||
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cet événement <b>%s</b> ?
|
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cette facture <b>%s</b> ?
|
||||||
RepeatEvent=Répétez événement
|
RepeatEvent=Répétez événement
|
||||||
EveryWeek=Chaque semaine
|
EveryWeek=Chaque semaine
|
||||||
EveryMonth=Chaque mois
|
EveryMonth=Chaque mois
|
||||||
|
|||||||
@ -41,7 +41,7 @@ BankAccountOwner=Nom du propriétaire du compte
|
|||||||
BankAccountOwnerAddress=Adresse du propriétaire du compte
|
BankAccountOwnerAddress=Adresse du propriétaire du compte
|
||||||
RIBControlError=Les contrôles indiquent que les informations de ce compte bancaire sont incomplètes ou incorrectes (vérifier le pays, les numéros de compte ou IBAN).
|
RIBControlError=Les contrôles indiquent que les informations de ce compte bancaire sont incomplètes ou incorrectes (vérifier le pays, les numéros de compte ou IBAN).
|
||||||
CreateAccount=Créer compte
|
CreateAccount=Créer compte
|
||||||
NewAccount=Nouveau compte
|
NewBankAccount=Nouveau compte
|
||||||
NewFinancialAccount=Nouveau compte financier
|
NewFinancialAccount=Nouveau compte financier
|
||||||
MenuNewFinancialAccount=Nouveau compte
|
MenuNewFinancialAccount=Nouveau compte
|
||||||
EditFinancialAccount=Édition compte
|
EditFinancialAccount=Édition compte
|
||||||
@ -53,12 +53,12 @@ BankType2=Compte caisse/liquide
|
|||||||
AccountsArea=Espace comptes
|
AccountsArea=Espace comptes
|
||||||
AccountCard=Fiche compte
|
AccountCard=Fiche compte
|
||||||
DeleteAccount=Suppression de compte
|
DeleteAccount=Suppression de compte
|
||||||
ConfirmDeleteAccount=Êtes-vous sûr de vouloir supprimer ce compte ?
|
ConfirmDeleteAccount=Êtes-vous sûr de vouloir effacer cet événement ?
|
||||||
Account=Compte
|
Account=Compte
|
||||||
BankTransactionByCategories=Écritures bancaires par rubriques
|
BankTransactionByCategories=Écritures bancaires par rubriques
|
||||||
BankTransactionForCategory=Écritures bancaires pour la rubrique <b>%s</b>
|
BankTransactionForCategory=Écritures bancaires pour la rubrique <b>%s</b>
|
||||||
RemoveFromRubrique=Supprimer lien avec rubrique
|
RemoveFromRubrique=Supprimer lien avec rubrique
|
||||||
RemoveFromRubriqueConfirm=Êtes-vous sûr de vouloir supprimer le lien entre la transaction et la rubrique ?
|
RemoveFromRubriqueConfirm=Êtes-vous sûr de vouloir supprimer le lien entre la transaction et la catégorie ?
|
||||||
ListBankTransactions=Liste des écritures
|
ListBankTransactions=Liste des écritures
|
||||||
IdTransaction=Id écriture
|
IdTransaction=Id écriture
|
||||||
BankTransactions=Écritures bancaires
|
BankTransactions=Écritures bancaires
|
||||||
@ -94,7 +94,7 @@ SocialContributionPayment=Paiement de charge fiscale/sociale
|
|||||||
BankTransfer=Virement bancaire
|
BankTransfer=Virement bancaire
|
||||||
BankTransfers=Virements bancaire
|
BankTransfers=Virements bancaire
|
||||||
MenuBankInternalTransfer=Virement interne
|
MenuBankInternalTransfer=Virement interne
|
||||||
TransferDesc=Transférer d'un compte bancaire à un autre, Dolibarr ajoutera deux lignes d'écritures (une ligne de débit dans le compte source et une ligne de crédit dans le compte de destination. le même montant (excepté le signe), le libellé et la date seront repris.
|
TransferDesc=Transférer d'un compte bancaire à un autre, Dolibarr ajoutera deux lignes d'écritures (une ligne de débit dans le compte source et une ligne de crédit dans le compte de destination. le même montant (excepté le signe), le libellé et la date seront repris).
|
||||||
TransferFrom=De
|
TransferFrom=De
|
||||||
TransferTo=Vers
|
TransferTo=Vers
|
||||||
TransferFromToDone=Le virement depuis <b>%s</b> vers <b>%s</b> de <b>%s</b> %s a été créé.
|
TransferFromToDone=Le virement depuis <b>%s</b> vers <b>%s</b> de <b>%s</b> %s a été créé.
|
||||||
|
|||||||
@ -34,7 +34,7 @@ BoxTitleOldestUnpaidCustomerBills=Les %s plus anciennes factures clients impayé
|
|||||||
BoxTitleOldestUnpaidSupplierBills=Les %s plus anciennes factures fournisseurs impayées
|
BoxTitleOldestUnpaidSupplierBills=Les %s plus anciennes factures fournisseurs impayées
|
||||||
BoxTitleCurrentAccounts=Balances des comptes ouverts
|
BoxTitleCurrentAccounts=Balances des comptes ouverts
|
||||||
BoxTitleLastModifiedContacts=Les %s derniers contacts/adresses modifiés
|
BoxTitleLastModifiedContacts=Les %s derniers contacts/adresses modifiés
|
||||||
BoxMyLastBookmarks=Mes %s derniers marque-pages\n
|
BoxMyLastBookmarks=Mes %s derniers marque-pages
|
||||||
BoxOldestExpiredServices=Plus anciens services expirés
|
BoxOldestExpiredServices=Plus anciens services expirés
|
||||||
BoxLastExpiredServices=Les %s plus anciens contrats avec services actifs expirés
|
BoxLastExpiredServices=Les %s plus anciens contrats avec services actifs expirés
|
||||||
BoxTitleLastActionsToDo=Les %s derniers événements à réaliser
|
BoxTitleLastActionsToDo=Les %s derniers événements à réaliser
|
||||||
|
|||||||
@ -91,7 +91,7 @@ SupplierAccountancyCode=Compte comptable fournisseur
|
|||||||
CustomerAccountancyCodeShort=Compte comptable client
|
CustomerAccountancyCodeShort=Compte comptable client
|
||||||
SupplierAccountancyCodeShort=Compte comptable fournisseur
|
SupplierAccountancyCodeShort=Compte comptable fournisseur
|
||||||
AccountNumber=Numéro du compte
|
AccountNumber=Numéro du compte
|
||||||
NewAccount=Nouveau compte
|
NewAccountingAccount=Nouveau compte
|
||||||
SalesTurnover=Chiffre d'affaires
|
SalesTurnover=Chiffre d'affaires
|
||||||
SalesTurnoverMinimum=Chiffre d'affaires minimum
|
SalesTurnoverMinimum=Chiffre d'affaires minimum
|
||||||
ByExpenseIncome=Par recettes et dépenses
|
ByExpenseIncome=Par recettes et dépenses
|
||||||
|
|||||||
@ -72,7 +72,7 @@ DeleteContractLine=Supprimer ligne de contrat
|
|||||||
ConfirmDeleteContractLine=Êtes-vous sûr de vouloir supprimer cette ligne de contrat de service ?
|
ConfirmDeleteContractLine=Êtes-vous sûr de vouloir supprimer cette ligne de contrat de service ?
|
||||||
MoveToAnotherContract=Déplacer le service vers un autre contrat de ce tiers.
|
MoveToAnotherContract=Déplacer le service vers un autre contrat de ce tiers.
|
||||||
ConfirmMoveToAnotherContract=J'ai choisi le contrat cible et confirme le déplacement du service dans ce contrat.
|
ConfirmMoveToAnotherContract=J'ai choisi le contrat cible et confirme le déplacement du service dans ce contrat.
|
||||||
ConfirmMoveToAnotherContractQuestion=Choisissez vers quel autre contrat de ce même tiers, vous voulez déplacer ce service ?
|
ConfirmMoveToAnotherContractQuestion=Choisissez vers quel autre contrat (du même tiers), vous voulez déplacer ce service ?
|
||||||
PaymentRenewContractId=Renouvellement service (numéro %s)
|
PaymentRenewContractId=Renouvellement service (numéro %s)
|
||||||
ExpiredSince=Expiré le
|
ExpiredSince=Expiré le
|
||||||
NoExpiredServices=Pas de services actifs expirés
|
NoExpiredServices=Pas de services actifs expirés
|
||||||
|
|||||||
@ -41,4 +41,3 @@ CannotRemoveDirectoryContainsFiles=Suppression impossible car des fichiers sont
|
|||||||
ECMFileManager=Gestionnaire de fichier
|
ECMFileManager=Gestionnaire de fichier
|
||||||
ECMSelectASection=Sélectionner un répertoire sur l'arbre de gauche…
|
ECMSelectASection=Sélectionner un répertoire sur l'arbre de gauche…
|
||||||
DirNotSynchronizedSyncFirst=Ce répertoire a été crée ou modifié en dehors du module GED. Cliquer sur le bouton "Rafraîchir" afin de resyncroniser les informations sur disque et la base pour voir le contenu de ce répertoire.
|
DirNotSynchronizedSyncFirst=Ce répertoire a été crée ou modifié en dehors du module GED. Cliquer sur le bouton "Rafraîchir" afin de resyncroniser les informations sur disque et la base pour voir le contenu de ce répertoire.
|
||||||
|
|
||||||
|
|||||||
@ -176,6 +176,7 @@ ErrorStockIsNotEnoughToAddProductOnShipment=Le stock du produit %s est insuffisa
|
|||||||
ErrorStockIsNotEnoughToAddProductOnProposal=Le stock du produit %s est insuffisant pour permettre un ajout dans une nouvelle proposition
|
ErrorStockIsNotEnoughToAddProductOnProposal=Le stock du produit %s est insuffisant pour permettre un ajout dans une nouvelle proposition
|
||||||
ErrorFailedToLoadLoginFileForMode=Impossible d'obtenir le fichier de connexion pour le mode '%s'.
|
ErrorFailedToLoadLoginFileForMode=Impossible d'obtenir le fichier de connexion pour le mode '%s'.
|
||||||
ErrorModuleNotFound=Fichier du module non trouvé.
|
ErrorModuleNotFound=Fichier du module non trouvé.
|
||||||
|
ErrorFieldAccountNotDefinedForBankLine=Valeur du compte comptable non défini pour la ligne de bank source %s
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningPasswordSetWithNoAccount=Un mot de passe a été fixé pour cet adhérent. Cependant, aucun compte d'utilisateur n'a été créé. Donc, ce mot de passe est stocké, mais ne peut être utilisé pour accéder à Dolibarr. Il peut être utilisé par un module/interface externe, mais si vous n'avez pas besoin de définir ni login ni mot de passe pour un adhérent, vous pouvez désactiver l'option «Gérer un login pour chaque adhérent" depuis la configuration du module Adhérents. Si vous avez besoin de gérer un login, mais pas de mot de passe, vous pouvez laisser ce champ vide pour éviter cet avertissement. Remarque: L'email peut également être utilisé comme login si l'adhérent est lié à un utilisateur.
|
WarningPasswordSetWithNoAccount=Un mot de passe a été fixé pour cet adhérent. Cependant, aucun compte d'utilisateur n'a été créé. Donc, ce mot de passe est stocké, mais ne peut être utilisé pour accéder à Dolibarr. Il peut être utilisé par un module/interface externe, mais si vous n'avez pas besoin de définir ni login ni mot de passe pour un adhérent, vous pouvez désactiver l'option «Gérer un login pour chaque adhérent" depuis la configuration du module Adhérents. Si vous avez besoin de gérer un login, mais pas de mot de passe, vous pouvez laisser ce champ vide pour éviter cet avertissement. Remarque: L'email peut également être utilisé comme login si l'adhérent est lié à un utilisateur.
|
||||||
|
|||||||
@ -26,8 +26,6 @@ FieldTitle=Titre champ
|
|||||||
NowClickToGenerateToBuildExportFile=Maintenant, sélectionnez le format d'export dans la liste déroulante et cliquez sur "Générer" pour fabriquer le fichier export…
|
NowClickToGenerateToBuildExportFile=Maintenant, sélectionnez le format d'export dans la liste déroulante et cliquez sur "Générer" pour fabriquer le fichier export…
|
||||||
AvailableFormats=Formats disponibles
|
AvailableFormats=Formats disponibles
|
||||||
LibraryShort=Bibliothèque
|
LibraryShort=Bibliothèque
|
||||||
LibraryUsed=Bibliothèque utilisée
|
|
||||||
LibraryVersion=Version
|
|
||||||
Step=Étape
|
Step=Étape
|
||||||
FormatedImport=Assistant import
|
FormatedImport=Assistant import
|
||||||
FormatedImportDesc1=Cet espace permet de réaliser des imports personnalisés des données via un assistant qui ne nécessite pas d'avoir des connaissances techniques.
|
FormatedImportDesc1=Cet espace permet de réaliser des imports personnalisés des données via un assistant qui ne nécessite pas d'avoir des connaissances techniques.
|
||||||
|
|||||||
@ -62,7 +62,6 @@ KeepEmptyIfNoPassword=Laissez vide si l'administrateur n'a pas de mot de passe
|
|||||||
SaveConfigurationFile=Enregistrement du fichier de configuration
|
SaveConfigurationFile=Enregistrement du fichier de configuration
|
||||||
ServerConnection=Connexion au serveur
|
ServerConnection=Connexion au serveur
|
||||||
DatabaseCreation=Création de la base de données
|
DatabaseCreation=Création de la base de données
|
||||||
UserCreation=Création de l'utilisateur
|
|
||||||
CreateDatabaseObjects=Création des objets de la base
|
CreateDatabaseObjects=Création des objets de la base
|
||||||
ReferenceDataLoading=Chargement des données de référence
|
ReferenceDataLoading=Chargement des données de référence
|
||||||
TablesAndPrimaryKeysCreation=Création des tables et des clés primaires
|
TablesAndPrimaryKeysCreation=Création des tables et des clés primaires
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# Dolibarr language file - Source file is en_US - languages
|
||||||
LinkANewFile=Lier un nouveau fichier/document
|
LinkANewFile=Lier un nouveau fichier/document
|
||||||
LinkedFiles=Fichiers et documents liés
|
LinkedFiles=Fichiers et documents liés
|
||||||
NoLinkFound=Aucun lien associé
|
NoLinkFound=Aucun lien associé
|
||||||
|
|||||||
@ -28,6 +28,7 @@ NoTemplateDefined=Pas de modèle défini pour ce type d'email
|
|||||||
AvailableVariables=Variables de substitution disponibles
|
AvailableVariables=Variables de substitution disponibles
|
||||||
NoTranslation=Pas de traduction
|
NoTranslation=Pas de traduction
|
||||||
NoRecordFound=Aucun enregistrement trouvé
|
NoRecordFound=Aucun enregistrement trouvé
|
||||||
|
NoRecordDeleted=Aucu enregistrement supprimé
|
||||||
NotEnoughDataYet=Pas assez de données
|
NotEnoughDataYet=Pas assez de données
|
||||||
NoError=Aucune erreur
|
NoError=Aucune erreur
|
||||||
Error=Erreur
|
Error=Erreur
|
||||||
@ -574,9 +575,10 @@ CanBeModifiedIfOk=Peut être modifié si valide
|
|||||||
CanBeModifiedIfKo=Peut être modifié si invalide
|
CanBeModifiedIfKo=Peut être modifié si invalide
|
||||||
ValueIsValid=Valeur valide
|
ValueIsValid=Valeur valide
|
||||||
ValueIsNotValid=Valeur non valide
|
ValueIsNotValid=Valeur non valide
|
||||||
|
RecordCreatedSuccessfully=Enregistrement créé avec succès
|
||||||
RecordModifiedSuccessfully=Enregistrement modifié avec succès
|
RecordModifiedSuccessfully=Enregistrement modifié avec succès
|
||||||
RecordsModified=%s enregistrements modifiés
|
RecordsModified=%s enregistrements modifiés
|
||||||
RecordsDeleted=Les %s dernières suppressions d'éléments
|
RecordsDeleted=%s enregistrements supprimés
|
||||||
AutomaticCode=Création automatique du code
|
AutomaticCode=Création automatique du code
|
||||||
FeatureDisabled=Fonction désactivée
|
FeatureDisabled=Fonction désactivée
|
||||||
MoveBox=Déplacer le widget
|
MoveBox=Déplacer le widget
|
||||||
@ -716,6 +718,7 @@ DeleteLine=Effacer ligne
|
|||||||
ConfirmDeleteLine=Êtes-vous sûr de vouloir supprimer cette ligne ?
|
ConfirmDeleteLine=Êtes-vous sûr de vouloir supprimer cette ligne ?
|
||||||
NoPDFAvailableForDocGenAmongChecked=Aucun PDF n'est disponible pour la génération du document parmi les enregistrements cochés
|
NoPDFAvailableForDocGenAmongChecked=Aucun PDF n'est disponible pour la génération du document parmi les enregistrements cochés
|
||||||
TooManyRecordForMassAction=Trop d'enregistrements sélectionnés pour l'action de masse. De telles actions sont restreintes à une liste de %s enregistrements maximum.
|
TooManyRecordForMassAction=Trop d'enregistrements sélectionnés pour l'action de masse. De telles actions sont restreintes à une liste de %s enregistrements maximum.
|
||||||
|
NoRecordSelected=Pas d'enregistrement sélectionné
|
||||||
MassFilesArea=Zone des fichiers générés en masse
|
MassFilesArea=Zone des fichiers générés en masse
|
||||||
ShowTempMassFilesArea=Afficher la zone des fichiers générés en masse
|
ShowTempMassFilesArea=Afficher la zone des fichiers générés en masse
|
||||||
RelatedObjects=Objets liés
|
RelatedObjects=Objets liés
|
||||||
@ -725,6 +728,14 @@ ClickHere=Cliquer ici
|
|||||||
FrontOffice=Front office
|
FrontOffice=Front office
|
||||||
BackOffice=Back office
|
BackOffice=Back office
|
||||||
View=Vue
|
View=Vue
|
||||||
|
Export=Exporter
|
||||||
|
Exports=Exports
|
||||||
|
ExportFilteredList=Exporter liste filtrée
|
||||||
|
ExportList=Exporter liste
|
||||||
|
Miscellaneous=Divers
|
||||||
|
Calendar=Calendrier
|
||||||
|
GroupBy=Grouper par...
|
||||||
|
ViewFlatList=Voir vue liste
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Lundi
|
Monday=Lundi
|
||||||
Tuesday=Mardi
|
Tuesday=Mardi
|
||||||
@ -756,7 +767,7 @@ ShortSaturday=S
|
|||||||
ShortSunday=D
|
ShortSunday=D
|
||||||
SelectMailModel=Sélectionner un modèle de courriels
|
SelectMailModel=Sélectionner un modèle de courriels
|
||||||
SetRef=Définir réf.
|
SetRef=Définir réf.
|
||||||
Select2ResultFoundUseArrows=
|
Select2ResultFoundUseArrows=Résultats trouvés. Utilisez les flèches pour sélectionner.
|
||||||
Select2NotFound=Aucun enregistrement trouvé
|
Select2NotFound=Aucun enregistrement trouvé
|
||||||
Select2Enter=Entrez
|
Select2Enter=Entrez
|
||||||
Select2MoreCharacter=caractère ou plus
|
Select2MoreCharacter=caractère ou plus
|
||||||
|
|||||||
@ -152,7 +152,6 @@ MenuMembersStats=Statistiques
|
|||||||
LastMemberDate=Date dernier adhérent
|
LastMemberDate=Date dernier adhérent
|
||||||
Nature=Nature
|
Nature=Nature
|
||||||
Public=Informations publiques
|
Public=Informations publiques
|
||||||
Exports=Exports
|
|
||||||
NewMemberbyWeb=Nouvel adhérent ajouté. En attente de validation
|
NewMemberbyWeb=Nouvel adhérent ajouté. En attente de validation
|
||||||
NewMemberForm=Nouvel Adhérent form
|
NewMemberForm=Nouvel Adhérent form
|
||||||
SubscriptionsStatistics=Statistiques sur les cotisations
|
SubscriptionsStatistics=Statistiques sur les cotisations
|
||||||
|
|||||||
@ -11,7 +11,6 @@ RequestAccess=Cliquez ici pour demander/renouveler un accès et recevoir un nouv
|
|||||||
DeleteAccess=Cliquez ici pour effacer le jeton
|
DeleteAccess=Cliquez ici pour effacer le jeton
|
||||||
UseTheFollowingUrlAsRedirectURI=Utilisez l'URL suivante comme URI de redirection quand vous créez un crédit avec votre fournisseur OAuth :
|
UseTheFollowingUrlAsRedirectURI=Utilisez l'URL suivante comme URI de redirection quand vous créez un crédit avec votre fournisseur OAuth :
|
||||||
ListOfSupportedOauthProviders=Saisissez ici le crédit fourni par votre fournisseur OAuth2. Seuls les fournisseurs OAuth2 supportés sont visibles ici. Ce paramétrage est potentiellement utilisé par d'autres modules qui nécessitent une authentification OAuth2.
|
ListOfSupportedOauthProviders=Saisissez ici le crédit fourni par votre fournisseur OAuth2. Seuls les fournisseurs OAuth2 supportés sont visibles ici. Ce paramétrage est potentiellement utilisé par d'autres modules qui nécessitent une authentification OAuth2.
|
||||||
TOKEN_ACCESS=
|
|
||||||
TOKEN_REFRESH=Token Refresh présent
|
TOKEN_REFRESH=Token Refresh présent
|
||||||
TOKEN_EXPIRED=Token expiré
|
TOKEN_EXPIRED=Token expiré
|
||||||
TOKEN_EXPIRE_AT=Token expire le
|
TOKEN_EXPIRE_AT=Token expire le
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
# Dolibarr language file - Source file is en_US - other
|
# Dolibarr language file - Source file is en_US - other
|
||||||
SecurityCode=Code de sécurité
|
SecurityCode=Code de sécurité
|
||||||
Calendar=Calendrier
|
|
||||||
NumberingShort=N°
|
NumberingShort=N°
|
||||||
Tools=Outils
|
Tools=Outils
|
||||||
ToolsDesc=Cet espace est dédié au regroupement d'outils divers non disponibles dans les autres entrées du menu.<br><br>La liste de ces outils est accessible par le menu sur le côté.
|
ToolsDesc=Cet espace est dédié au regroupement d'outils divers non disponibles dans les autres entrées du menu.<br><br>La liste de ces outils est accessible par le menu sur le côté.
|
||||||
@ -55,7 +54,6 @@ TotalSizeOfAttachedFiles=Taille totale fichiers/documents liés
|
|||||||
MaxSize=Taille maximum
|
MaxSize=Taille maximum
|
||||||
AttachANewFile=Ajouter un nouveau fichier/document
|
AttachANewFile=Ajouter un nouveau fichier/document
|
||||||
LinkedObject=Objet lié
|
LinkedObject=Objet lié
|
||||||
Miscellaneous=Divers
|
|
||||||
NbOfActiveNotifications=Nombre de notifications (nb de destinataires emails)
|
NbOfActiveNotifications=Nombre de notifications (nb de destinataires emails)
|
||||||
PredefinedMailTest=Ceci est un message de test.\nLes 2 lignes sont séparées par un retour à la ligne.\n\n__SIGNATURE__
|
PredefinedMailTest=Ceci est un message de test.\nLes 2 lignes sont séparées par un retour à la ligne.\n\n__SIGNATURE__
|
||||||
PredefinedMailTestHtml=Ceci est un message de <b>test</b> (le mot test doit être en gras).<br>Les 2 lignes sont séparées par un retour à la ligne.<br><br>__SIGNATURE__
|
PredefinedMailTestHtml=Ceci est un message de <b>test</b> (le mot test doit être en gras).<br>Les 2 lignes sont séparées par un retour à la ligne.<br><br>__SIGNATURE__
|
||||||
@ -201,33 +199,13 @@ IfAmountHigherThan=Si le montant est supérieur à <strong>%s</strong>
|
|||||||
SourcesRepository=Répertoire pour les sources
|
SourcesRepository=Répertoire pour les sources
|
||||||
Chart=Graphique
|
Chart=Graphique
|
||||||
|
|
||||||
##### Calendar common #####
|
|
||||||
NewCompanyToDolibarr=Société %s ajoutée
|
|
||||||
ContractValidatedInDolibarr=Contrat %s validé
|
|
||||||
PropalClosedSignedInDolibarr=Proposition %s signée
|
|
||||||
PropalClosedRefusedInDolibarr=Proposition %s refusée
|
|
||||||
PropalValidatedInDolibarr=Proposition %s validée
|
|
||||||
PropalClassifiedBilledInDolibarr=Proposition %s classée payée
|
|
||||||
InvoiceValidatedInDolibarr=Facture %s validée
|
|
||||||
InvoicePaidInDolibarr=Facture %s passée à payée
|
|
||||||
InvoiceCanceledInDolibarr=Facture %s annulée
|
|
||||||
MemberValidatedInDolibarr=Adhérent %s validé
|
|
||||||
MemberResiliatedInDolibarr=Adhérent %s résilié
|
|
||||||
MemberDeletedInDolibarr=Adhérent %s supprimé
|
|
||||||
MemberSubscriptionAddedInDolibarr=Souscription adhérent %s
|
|
||||||
ShipmentValidatedInDolibarr=Expédition %s validée
|
|
||||||
ShipmentClassifyClosedInDolibarr=Expédition %s classée payée
|
|
||||||
ShipmentUnClassifyCloseddInDolibarr=Expédition %s réouverte
|
|
||||||
ShipmentDeletedInDolibarr=Expédition %s supprimée
|
|
||||||
##### Export #####
|
##### Export #####
|
||||||
Export=Export
|
|
||||||
ExportsArea=Espace exports
|
ExportsArea=Espace exports
|
||||||
AvailableFormats=Formats disponibles
|
AvailableFormats=Formats disponibles
|
||||||
LibraryUsed=Librairie utilisée
|
LibraryUsed=Bibliothèque utilisée
|
||||||
LibraryVersion=Version
|
LibraryVersion=Version bibliothèque
|
||||||
ExportableDatas=Données exportables
|
ExportableDatas=Données exportables
|
||||||
NoExportableData=Pas de données exportables (pas de module avec données exportables chargé, ou manque de permissions)
|
NoExportableData=Pas de données exportables (pas de module avec données exportables chargé, ou manque de permissions)
|
||||||
NewExport=Nouvel export
|
|
||||||
##### External sites #####
|
##### External sites #####
|
||||||
WebsiteSetup=Configuration du module Sites webs
|
WebsiteSetup=Configuration du module Sites webs
|
||||||
WEBSITE_PAGEURL=URL de la page
|
WEBSITE_PAGEURL=URL de la page
|
||||||
|
|||||||
@ -157,6 +157,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'loan';
|
$modulepart = 'loan';
|
||||||
$permission = $user->rights->loan->write;
|
$permission = $user->rights->loan->write;
|
||||||
|
$permtoedit = $user->rights->loan->write;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3159,10 +3159,10 @@ class Product extends CommonObject
|
|||||||
$label .= '<br><b>' . $langs->trans('ProductLabel') . ':</b> ' . $this->label;
|
$label .= '<br><b>' . $langs->trans('ProductLabel') . ':</b> ' . $this->label;
|
||||||
|
|
||||||
$tmptext='';
|
$tmptext='';
|
||||||
if ($this->weight) $tmptext.="<br>".$langs->trans("Weight").': '.$this->weight.' '.measuring_units_string($this->weight_units,"weight");
|
if ($this->weight) $tmptext.="<br>".$langs->trans("Weight").': '.$this->weight.' '.measuring_units_string($this->weight_units,"weight");
|
||||||
if ($this->length) $tmptext.="<br>".$langs->trans("Length").': '.$this->length.' '.measuring_units_string($this->length_units,'length');
|
if ($this->length) $tmptext.="<br>".$langs->trans("Length").': '.$this->length.' '.measuring_units_string($this->length_units,'length');
|
||||||
if ($this->surface) $tmptext.="<br>".$langs->trans("Surface").': '.$this->surface.' '.measuring_units_string($this->surface_units,'surface');
|
if ($this->surface) $tmptext.="<br>".$langs->trans("Surface").': '.$this->surface.' '.measuring_units_string($this->surface_units,'surface');
|
||||||
if ($this->volume) $tmptext.="<br>".$langs->trans("Volume").': '.$this->volume.' '.measuring_units_string($this->volume_units,'volume');
|
if ($this->volume) $tmptext.="<br>".$langs->trans("Volume").': '.$this->volume.' '.measuring_units_string($this->volume_units,'volume');
|
||||||
if ($tmptext) $label .= $tmptext;
|
if ($tmptext) $label .= $tmptext;
|
||||||
|
|
||||||
if (! empty($this->entity))
|
if (! empty($this->entity))
|
||||||
|
|||||||
@ -148,6 +148,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
$modulepart = 'project';
|
$modulepart = 'project';
|
||||||
$permission = ($userWrite > 0);
|
$permission = ($userWrite > 0);
|
||||||
|
$permtoedit = ($userWrite > 0);
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -242,6 +242,7 @@ if ($object->id > 0)
|
|||||||
if ($withproject) $param .= '&withproject=1';
|
if ($withproject) $param .= '&withproject=1';
|
||||||
$modulepart = 'project_task';
|
$modulepart = 'project_task';
|
||||||
$permission = $user->rights->projet->creer;
|
$permission = $user->rights->projet->creer;
|
||||||
|
$permtoedit = $user->rights->projet->creer;
|
||||||
$relativepathwithnofile=dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/';
|
$relativepathwithnofile=dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,6 +156,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$modulepart = 'societe';
|
$modulepart = 'societe';
|
||||||
$permission = $user->rights->societe->creer;
|
$permission = $user->rights->societe->creer;
|
||||||
|
$permtoedit = $user->rights->societe->creer;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user