Merge branch 'develop' into dev_clonecontract
This commit is contained in:
commit
a0470e987c
@ -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;
|
||||||
|
|||||||
@ -41,8 +41,10 @@ $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');
|
||||||
|
|
||||||
@ -51,6 +53,7 @@ $list = array (
|
|||||||
'ACCOUNTING_LIMIT_LIST_VENTILATION',
|
'ACCOUNTING_LIMIT_LIST_VENTILATION',
|
||||||
'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_MANAGE_ZERO',
|
||||||
'ACCOUNTING_LENGTH_GACCOUNT',
|
'ACCOUNTING_LENGTH_GACCOUNT',
|
||||||
'ACCOUNTING_LENGTH_AACCOUNT'
|
'ACCOUNTING_LENGTH_AACCOUNT'
|
||||||
);
|
);
|
||||||
@ -71,6 +74,7 @@ $list_account = array (
|
|||||||
'DONATION_ACCOUNTINGACCOUNT'
|
'DONATION_ACCOUNTINGACCOUNT'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -180,6 +184,7 @@ if ($action == 'setdisabledirectinput') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -200,174 +205,194 @@ 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))
|
||||||
|
{
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Cas du parametre ACCOUNTING_MODE
|
// Cas du parametre ACCOUNTING_MODE
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
|
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
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 '<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 colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
|
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
|
||||||
// Write info on way to count VAT
|
// Write info on way to count VAT
|
||||||
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||||
// {
|
// {
|
||||||
// // print "<br>\n";
|
// // print "<br>\n";
|
||||||
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// // print "<br>\n";
|
// // print "<br>\n";
|
||||||
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
|
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
|
||||||
// }
|
// }
|
||||||
print "</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 '<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 colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
print "<br>\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 '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $langs->trans("Chartofaccounts") . '</td>';
|
print $langs->trans("Chartofaccounts") . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr ' . $bc[$var] . '>';
|
print '<tr ' . $bc[$var] . '>';
|
||||||
print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
||||||
|
|
||||||
$sql = "SELECT rowid, pcg_version, label, active";
|
$sql = "SELECT rowid, pcg_version, label, active";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
||||||
$sql .= " WHERE active = 1";
|
$sql .= " WHERE active = 1";
|
||||||
|
|
||||||
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
$var = true;
|
$var = true;
|
||||||
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ( $i < $num ) {
|
while ( $i < $num ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
print '<option value="' . $row[0] . '"';
|
print '<option value="' . $row[0] . '"';
|
||||||
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
||||||
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
||||||
|
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
print "</select>";
|
||||||
|
print "</td></tr>";
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
}
|
}
|
||||||
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
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||||
|
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&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=setlistsorttodo&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
$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="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>';
|
||||||
|
|
||||||
// Param
|
$var = ! $var;
|
||||||
$label = $langs->trans($key);
|
print "<tr " . $bc[$var] . ">";
|
||||||
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||||
|
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||||
// Value
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||||
print '<td>';
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
print '</a></td>';
|
||||||
print '</td></tr>';
|
} 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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
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))
|
||||||
|
{
|
||||||
|
foreach ( $list as $key ) {
|
||||||
|
$var = ! $var;
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
if ($key != 'ACCOUNTING_MANAGE_ZERO')
|
||||||
|
{
|
||||||
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
|
|
||||||
// Param
|
// Param
|
||||||
$label = $langs->trans($key);
|
$label = $langs->trans($key);
|
||||||
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
||||||
|
|
||||||
// Value
|
// Value
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||||
print '</td></tr>';
|
print '</td></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="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>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ( $list_account as $key ) {
|
||||||
|
$var = ! $var;
|
||||||
|
|
||||||
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
|
|
||||||
|
// Param
|
||||||
|
$label = $langs->trans($key);
|
||||||
|
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
||||||
|
|
||||||
|
// Value
|
||||||
|
print '<td>';
|
||||||
|
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TO DO Mutualize code for yes/no constants
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&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=setlistsorttodo&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_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";
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -225,7 +225,7 @@ if ($action == 'delbookkeepingyearconfirm') {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages("NothingDeleted", null, 'warnings');
|
setEventMessages("NoRecordDeleted", null, 'warnings');
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -321,7 +321,7 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ if ($user->societe_id > 0)
|
|||||||
/*
|
/*
|
||||||
* 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')) {
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||||
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -82,7 +82,7 @@ if (! $sortorder) {
|
|||||||
// 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);
|
||||||
|
|||||||
@ -84,7 +84,7 @@ if (! $sortorder) {
|
|||||||
// 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);
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $id = GETPOST('id');
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||||
if (! GETPOST('cancel', 'alpha')) {
|
if (! GETPOST('cancel', 'alpha')) {
|
||||||
$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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -80,7 +80,7 @@ if (! $sortorder) {
|
|||||||
// 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);
|
||||||
|
|||||||
@ -84,7 +84,7 @@ if (! $sortorder) {
|
|||||||
// 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);
|
||||||
|
|||||||
@ -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'].'" />';
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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>';
|
||||||
@ -625,11 +629,34 @@ 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>';
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
@ -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,15 @@ 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__);
|
||||||
-- 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__, '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', 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
|
||||||
|
|||||||
@ -938,20 +938,24 @@ 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, 'chartofaccount');
|
||||||
|
|
||||||
// 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,9 +1010,7 @@ 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("Fiscalyear"),1,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
||||||
|
|||||||
@ -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] = 50401;
|
$this->rights[$r][0] = 50440;
|
||||||
$this->rights[$r][1] = 'Read ventilation';
|
$this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy';
|
||||||
$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] = 'chartofaccount';
|
||||||
$this->rights[$r][5] = 'read';
|
$this->rights[$r][5] = '';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
$this->rights[$r][0] = 50401;
|
||||||
|
$this->rights[$r][1] = 'Bind products and invoices with accounting accounts';
|
||||||
|
$this->rights[$r][2] = 'r';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'bind';
|
||||||
|
$this->rights[$r][5] = 'write';
|
||||||
|
$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
|
||||||
//-------
|
//-------
|
||||||
|
|||||||
@ -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>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
|
||||||
|
|
||||||
// Multicurrency
|
// Currency
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.price($objp->multicurrency_total_ttc).'</td>';
|
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->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>';
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
@ -72,7 +72,7 @@ ACCOUNTING_LENGTH_DESCRIPTION=Length for displaying product & services descripti
|
|||||||
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (Best = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (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 free input of bank transactions (Enabled by default with this module).
|
||||||
|
|
||||||
ACCOUNTING_SELL_JOURNAL=Sell journal
|
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||||
@ -103,7 +103,7 @@ 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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -13,3 +13,6 @@ 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
|
||||||
Loading…
Reference in New Issue
Block a user