Merge remote-tracking branch 'Upstream/develop' into 5.0-p22

Conflicts:
	htdocs/langs/en_US/accountancy.lang
This commit is contained in:
aspangaro 2016-10-16 13:44:09 +02:00
commit 53c8649629
23 changed files with 340 additions and 298 deletions

View File

@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.
// Langs
$langs->load("compta");
$langs->load("bills");
$langs->load("admin");
$langs->load("accountancy");
$langs->load("salaries");
$mesg = '';
$action = GETPOST('action');
@ -172,17 +175,18 @@ $sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
}
$sql .= $db->plimit($limit + 1, $offset);
dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
$result = $db->query($sql);
$resql = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
if ($resql) {
$num = $db->num_rows($resql);
$params='';
if ($search_account != "") $params.= '&search_account='.urlencode($search_account);
@ -206,14 +210,14 @@ if ($result) {
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
$sql .= " WHERE active = 1";
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
$resql = $db->query($sql);
$resqlchart = $db->query($sql);
$var = true;
if ($resql) {
$num = $db->num_rows($resql);
if ($resqlchart) {
$numbis = $db->num_rows($resqlchart);
$i = 0;
while ( $i < $num ) {
while ( $i < $numbis ) {
$var = ! $var;
$row = $db->fetch_row($resql);
$row = $db->fetch_row($resqlchart);
print '<option value="' . $row[0] . '"';
print $pcgver == $row[0] ? ' selected' : '';

View File

@ -48,15 +48,6 @@ if (! empty($user->rights->accountancy->chartofaccount))
$action = GETPOST('action', 'alpha');
// Parameters ACCOUNTING_* and others
$list = array (
//'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_ACCOUNT', // adjust size displayed for select account description for dol_trunc
);
$list_account = array (
'ACCOUNTING_ACCOUNT_SUPPLIER',
@ -99,25 +90,6 @@ if (GETPOST('change_chart'))
if ($action == 'update') {
$error = 0;
$chartofaccounts = GETPOST('chartofaccounts', 'int');
if (! empty($chartofaccounts)) {
if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
} else {
$error ++;
}
foreach ( $list as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
foreach ( $list_account as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
@ -133,56 +105,6 @@ if ($action == 'update') {
}
}
// TO DO Mutualize code for yes/no constants
if ($action == 'setlistsorttodo') {
$setlistsorttodo = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setlistsortdone') {
$setlistsortdone = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setmanagezero') {
$setmanagezero = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisabledirectinput') {
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
/*
* View
@ -196,149 +118,34 @@ $formaccountancy = new FormVentilation($db);
$linkback = '';
print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy');
print '<br>';
print $langs->trans("DefaultBindingDesc").'<br>';
print '<br>';
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
// Box to select active chart of accoun
$var = ! $var;
print $langs->trans("Selectchartofaccounts") . " : ";
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 $pcgver == $row[0] ? ' selected' : '';
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
$i ++;
}
}
print "</select>";
print '<input type="submit" class="button" name="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
print '<br>';
print "<br>\n";
/*
* Define Chart of accounts
*/
// Others params
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans('OtherOptions') . '</td>';
print "</tr>\n";
if (! empty($user->admin))
{
// 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="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td align="right"><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>' . $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 ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
// Param
$label = $langs->trans($key);
print '<td>' . $label . '</td>';
// Value
print '<td align="right">';
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}
// Param a user $user->rights->accountancy->chartofaccount can access
if (! empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
{
foreach ( $list as $key ) {
$var = ! $var;
if ($key != 'ACCOUNTING_MANAGE_ZERO')
{
print '<tr ' . $bc[$var] . ' class="value">';
// Param
$label = $langs->trans($key);
print '<td>'.$label.'</td>';
// 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>';
}
}
foreach ( $list_account as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
// Param
$label = $langs->trans($key);
print '<td>' . $label . '</td>';
// Value
print '<td align="right">';
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}
}
print "</table>\n";

View File

@ -48,6 +48,17 @@ if (empty($user->admin))
$action = GETPOST('action', 'alpha');
// Parameters ACCOUNTING_* and others
$list = array (
//'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_ACCOUNT', // adjust size displayed for select account description for dol_trunc
);
/*
* Actions
@ -79,6 +90,70 @@ if ($action == 'update') {
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
foreach ( $list as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
// TO DO Mutualize code for yes/no constants
if ($action == 'setlistsorttodo') {
$setlistsorttodo = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setlistsortdone') {
$setlistsortdone = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setmanagezero') {
$setmanagezero = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisabledirectinput') {
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
@ -103,9 +178,9 @@ print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
print '<table class="noborder" width="100%">';
// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
// Cas du parametre ACCOUNTING_MODE
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
@ -129,6 +204,108 @@ print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td
print "</table>\n";
print '<br>';
// Others params
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans('OtherOptions') . '</td>';
print "</tr>\n";
if (! empty($user->admin))
{
// 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="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td align="right"><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>' . $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>';
}
// Param a user $user->rights->accountancy->chartofaccount can access
foreach ( $list as $key ) {
$var = ! $var;
if ($key != 'ACCOUNTING_MANAGE_ZERO')
{
print '<tr ' . $bc[$var] . ' class="value">';
// Param
$label = $langs->trans($key);
print '<td>'.$label.'</td>';
// 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>';
}
}
print '</table>';
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="button"></div>';

View File

@ -204,20 +204,23 @@ $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');
$tmp=dol_getdate($search_date_start);
$param .= '&date_startmonth=' . $tmp['mon'] . '&date_startday=' . $tmp['mday'] . '&date_startyear=' . $tmp['year'];
}
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');
$tmp=dol_getdate($search_date_end);
$param .= '&date_endmonth=' . $tmp['mon'] . '&date_endday=' . $tmp['mday'] . '&date_endyear=' . $tmp['year'];
}
if (! empty($search_doc_date)) {
$filter['t.doc_date'] = $search_doc_date;
$tmp=dol_getdate($search_doc_date);
$param .= '&doc_datemonth=' . $tmp['mon'] . '&doc_dateday=' . $tmp['mday'] . '&doc_dateyear=' . $tmp['year'];
}
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;

View File

@ -278,7 +278,7 @@ if ($result) {
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" align="right"></td>';
print '<td class="liste_titre" align="center">';
print '<td class="liste_titre" align="right">';
$searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco;
print "</td></tr>\n";

View File

@ -87,23 +87,26 @@ print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step,
print "<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Dictionaries")."-".$langs->transnoentitiesnoconv("DictionaryVAT").'</strong>');
$textlink = '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Dictionaries")."-".$langs->transnoentitiesnoconv("DictionaryVAT").'</strong>';
//$textlink.= ' '.$langs->trans("and").' ';
//$textlink.= '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy").'-'.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
print "<br>\n";
if (! empty($conf->tax->enabled))
{
$textlink = '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Dictionaries")."-".$langs->transnoentitiesnoconv("DictionarySocialContributions").'</strong>';
$textlink.= ' '.$langs->trans("and").' ';
$textlink.= '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>';
//$textlink.= ' '.$langs->trans("and").' ';
//$textlink.= '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
print "<br>\n";
}
if (! empty($conf->salaries->enabled))
/*if (! empty($conf->salaries->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
@ -119,11 +122,17 @@ if (! empty($conf->loan->enabled))
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
print "<br>\n";
}
// Other: bank transfer, bank accounts
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescMisc", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>')."<br>\n";
print "<br>\n";
$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";
print "<br>\n";
print_fiche_titre($langs->trans("AccountancyAreaDescActionFreq"), '', 'object_calendarweek');
@ -131,9 +140,6 @@ print '<hr>';
print "<br>\n";
$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++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
print "<br>\n";
@ -143,8 +149,9 @@ print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", $step)."<br>\n";
print "<br>\n";
llxFooter();
$db->close();

View File

@ -295,7 +295,7 @@ if ($action == 'writebookkeeping') {
}
if (empty($error)) {
if (empty($error) && count($tabpay)) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)

View File

@ -313,7 +313,7 @@ if ($action == 'writebookkeeping') {
}
if (empty($error)) {
if (empty($error) && count($tabpay) > 0) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)

View File

@ -249,7 +249,7 @@ if ($result) {
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="right"', $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("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre('', '', '', '', '', 'align="center"');

View File

@ -401,10 +401,6 @@ foreach ($accounts as $key=>$type)
$var = !$var;
$solde = $acc->solde(1);
print '<tr '.$bc[$var].'>';
print '<td class="titlefield">'.$acc->getNomUrl(1).'</td>';
print '<td>';
@ -450,7 +446,7 @@ if (! $found) print '<tr '.$bc[$var].'><td colspan="7" class="opacitymedium">'.$
// Total
foreach ($total as $key=>$solde)
{
print '<tr class="liste_total"><td colspan="6" class="liste_total">'.$langs->trans("Total").' '.$key.'</td><td align="right" class="liste_total">'.price($solde, 0, $langs, 0, 0, -1, $key).'</td></tr>';
print '<tr class="liste_total"><td colspan="6" class="liste_total">'.$langs->trans("Total").' '.$key.'</td><td align="right" class="liste_total">'.price($solde, 0, $langs, 0, 0, -1, $key).'</td><td></td></tr>';
}
print '</table>';

View File

@ -212,11 +212,11 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
-- 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->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_chartmodel', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy_admin', 'Pcg_version', 1, 'accountancy_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', 2452__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy_admin', 'Chartofaccounts', 1, 'accountancy_admin', '$user->rights->accounting->chartofaccount', '', 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', __HANDLER__, 'left', 2453__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2400__+MAX_llx_menu__, '/accountancy/admin/index.php?mainmenu=accountancy_admin', 'MenuDefaultAccounts', 1, 'accountancy_admin', '$user->rights->accounting->chartofaccount', '', 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', __HANDLER__, 'left', 2451__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chartmodel', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Pcg_version', 1, 'accountancy_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', 2452__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Chartofaccounts', 1, 'accountancy_admin', '$user->rights->accounting->chartofaccount', '', 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', __HANDLER__, 'left', 2453__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2400__+MAX_llx_menu__, '/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuDefaultAccounts', 1, 'accountancy_admin', '$user->rights->accounting->chartofaccount', '', 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', __HANDLER__, 'left', 2454__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_product', 2400__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'ProductsBinding', 1, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 4, __ENTITY__);
-- 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__, 'accountancy', '', 2400__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&amp;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->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->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->bind->write', '', 0, 3, __ENTITY__);

View File

@ -942,13 +942,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$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/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 1);
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/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 2);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("", $langs->trans("Setup"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 2);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 3);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 2);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&amp;leftmenu=accountancy", $langs->trans("MenuProductsAccounts"), 2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 2);
// Binding
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&amp;leftmenu=accountancy", $langs->trans("ProductsBinding"), 1, $user->admin);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&amp;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&amp;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&amp;leftmenu=accountancy_dispatch_customer",$langs->trans("Binded"),2,$user->rights->accounting->bind->write);
@ -963,7 +963,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
// Journals
if(! empty($conf->accounting->enabled) && ! empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy')
{
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add('',$langs->trans("Journaux"),1,$user->rights->accounting->comptarapport->lire);
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add('',$langs->trans("Journalization"),1,$user->rights->accounting->comptarapport->lire);
$sql = "SELECT rowid, label, accountancy_journal";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";

View File

@ -1032,7 +1032,7 @@ class FactureFournisseur extends CommonInvoice
// Check parameters
if (preg_match('/^'.preg_quote($langs->trans("CopyOf").' ').'/', $this->ref_supplier))
{
$this->error=$langs->trans("ErrorFieldFormat",$langs->transnoentities("RefSupplier"));
$this->error=$langs->trans("ErrorFieldFormat",$langs->transnoentities("RefSupplier")).'. '.$langs->trans('RemoveString',$langs->transnoentitiesnoconv("CopyOf"));
return -1;
}

View File

@ -0,0 +1,22 @@
-- ============================================================================
-- Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ============================================================================
ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_doc_date (doc_date);
ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_fk_docdet (fk_docdet);
ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_numero_compte (numero_compte);
ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_code_journal (code_journal);

View File

@ -11,9 +11,11 @@ ACCOUNTING_EXPORT_PREFIX_SPEC=Specify the prefix for the file name
AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s
ConfigAccountingExpert=Configuration of the module accounting expert
Journalization=Journalization
Journaux=Journals
JournalFinancial=Financial journals
BackToChartofaccounts=Return chart of accounts
Chartofaccounts=Chart of accounts
AccountancyArea=Accountancy area
AccountancyAreaDescIntro=Usage of the accountancy module is done in several step:
@ -21,34 +23,38 @@ AccountancyAreaDescActionOnce=The following actions are usually executed one tim
AccountancyAreaDescActionFreq=The following actions are usually executed every month, week or day for very large companies...
AccountancyAreaDescChartModel=STEP %s: Create a model of chart of account from menu %s
AccountancyAreaDescChart=STEP %s: Create or check content of your chart of account from menu %s
AccountancyAreaDescProd=STEP %s: Check the binding between products/services and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on your invoice lines.<br>For this you can use the menu entry %s.
AccountancyAreaDescBank=STEP %s: Check the binding between bank accounts and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on your payment lines.<br>For this, go on the card of each financial account. You can start from page %s.
AccountancyAreaDescVat=STEP %s: Check the binding between vat payment and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on record related to VAT payments.<br>You can set accounting accounts to use for each VAT from page %s.
AccountancyAreaDescSal=STEP %s: Check the binding between salaries payment and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on record related to payment of salaries.<br>For this you can use the menu entry %s.
AccountancyAreaDescContrib=STEP %s: Check the binding between special expences (social or fiscal contributions) and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on record related to payments of social contributions.<br>For this you can use the menu entry %s.
AccountancyAreaDescContrib=STEP %s: Check the binding between special expences (miscellaneous taxes) and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on record related to payments of taxes.<br>For this you can use the menu entry %s.
AccountancyAreaDescDonation=STEP %s: Check the binding between donation and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on record related to payments of donation.<br>You can set the account dedicated for that from the menu entry %s.
AccountancyAreaDescMisc=STEP %s: Check the default binding between miscellaneous transaction lines and accounting account is done. Complete missing bindings.<br>For this you can use the menu entry %s.
AccountancyAreaDescProd=STEP %s: Check the binding between products/services and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on your invoice lines.<br>For this you can use the menu entry %s.
AccountancyAreaDescLoan=STEP %s: Check the binding between loans payment and accounting account is done. Complete missing bindings. This will save you time in future for the next steps by suggesting you the correct default accounting account on record related to payment of loans.<br>For this you can use the menu entry %s.
AccountancyAreaDescCustomer=STEP %s: Check the binding between existing customer invoice lines and accounting account is done. Complete missing bindings. Once binding is complete, application will be able to record transactions in General Ledger in one click.<br>For this you can use the menu entry %s.
AccountancyAreaDescSupplier=STEP %s: Check the binding between existing supplier invoice lines and accounting account is done. Complete missing bindings. Once binding is complete, application will be able to record transactions in General Ledger in one click.<br>For this you can use the menu entry %s.
AccountancyAreaDescWriteRecords=STEP %s: Write transactions into the General Ledger. Add or edit existing transactions and generate reports
AccountancyAreaDescCustomer=STEP %s: Check the binding between existing customer invoice lines and accounting account is done. Complete missing bindings. Once binding is complete, application will be able to journalize transactions in General Ledger in one click.<br>For this you can use the menu entry %s.
AccountancyAreaDescSupplier=STEP %s: Check the binding between existing supplier invoice lines and accounting account is done. Complete missing bindings. Once binding is complete, application will be able to journalize transactions in General Ledger in one click.<br>For this you can use the menu entry %s.
AccountancyAreaDescWriteRecords=STEP %s: Write transactions into the General Ledger. For this, go into each Journal, and click into button "Journalize transactions in General Ledger".
AccountancyAreaDescAnalyze=STEP %s: Add or edit existing transactions and generate reports and exports.
AccountancyAreaDescClosePeriod=STEP %s: Close period so we can't make modification in a future.
MenuAccountancy=Accountancy
Selectchartofaccounts=Select active chart of accounts
ChangeAndLoad=Change and load
Addanaccount=Add an accounting account
AccountAccounting=Accounting account
AccountAccountingShort=Account
AccountAccountingSuggest=Accounting account suggest
Ventilation=Binding to accounts
ProductsBinding=Products binding
MenuAccountancy=Accountancy
MenuDefaultAccounts=Default accounts
MenuProductsAccounts=Product accounts
ProductsBinding=Products accounts
Ventilation=Binding to accounts
CustomersVentilation=Customer invoice binding
SuppliersVentilation=Supplier invoice binding
CreateMvts=Create new transaction
UpdateMvts=Modification of a transaction
WriteBookKeeping=Record operations in General Ledger
WriteBookKeeping=Journalize transactions in General Ledger
Bookkeeping=General ledger
AccountBalance=Account balance
@ -152,7 +158,7 @@ AutomaticBindingDone=Automatic binding done
ErrorAccountancyCodeIsAlreadyUse=Error, you cannot delete this accounting account because it is used
MvtNotCorrectlyBalanced=Mouvement not correctly balanced. Credit = %s. Debit = %s
FicheVentilation=Binding card
GeneralLedgerIsWritten=Operations are written in the general ledger
GeneralLedgerIsWritten=Transactions are written in the general ledger
GeneralLedgerSomeRecordWasNotRecorded=Some of the transactions could not be recorded.
NoNewRecordSaved=No new record saved
ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account
@ -178,7 +184,8 @@ Modelcsv_cogilog=Export towards Cogilog
## Tools - Init accounting account on product / service
InitAccountancy=Init accountancy
InitAccountancyDesc=This page can be used to initialize an accounting account on products and services that does not have accountancy account defined for sales and purchases. Check before that setup of chart of accounts is complete.
InitAccountancyDesc=This page can be used to initialize an accounting account on products and services that does not have accountancy account defined for sales and purchases.
DefaultBindingDesc=This page can be used to set a default account to use to link transactions record about payment salaries, donation, taxes and vat when no specific accounting account were already set.
Options=Options
OptionModeProductSell=Mode sales
OptionModeProductBuy=Mode purchases

View File

@ -53,8 +53,6 @@ ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %
ErrorDecimalLargerThanAreForbidden=Error, a precision higher than <b>%s</b> is not supported.
DictionarySetup=Dictionary setup
Dictionary=Dictionaries
Chartofaccounts=Chart of accounts
FiscalPeriod=Accounting period
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
DisableJavascript=Disable JavaScript and Ajax functions (Recommended for blind person or text browsers)

View File

@ -184,11 +184,11 @@ CalculationRuleDescSupplier=According to supplier, choose appropriate method to
TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a <b>cash accountancy</b> mode is not relevant. This report is only available when using <b>engagement accountancy</b> mode (see setup of accountancy module).
CalculationMode=Calculation mode
AccountancyJournal=Accountancy code journal
ACCOUNTING_VAT_SOLD_ACCOUNT=Default accountancy code for collecting VAT (VAT on sales)
ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for recovered VAT (VAT on purchases)
ACCOUNTING_VAT_PAY_ACCOUNT=Default accountancy code for paying VAT
ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties
ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties
ACCOUNTING_VAT_SOLD_ACCOUNT=Accounting account by default for collecting VAT (VAT on sales)
ACCOUNTING_VAT_BUY_ACCOUNT=Accounting account by default for recovered VAT (VAT on purchases)
ACCOUNTING_VAT_PAY_ACCOUNT=Accounting account by default for paying VAT
ACCOUNTING_ACCOUNT_CUSTOMER=Accounting account by default for customer thirdparties
ACCOUNTING_ACCOUNT_SUPPLIER=Accounting account by default for supplier thirdparties
CloneTax=Clone a social/fiscal tax
ConfirmCloneTax=Confirm the clone of a social/fiscal tax payment
CloneTaxForNextMonth=Clone it for next month
@ -202,3 +202,4 @@ LinkedFichinter=Link to an intervention
ImportDataset_tax_contrib=Import social/fiscal taxes
ImportDataset_tax_vat=Import vat payments
ErrorBankAccountNotFound=Error: Bank account not found
FiscalPeriod=Accounting period

View File

@ -737,6 +737,7 @@ Miscellaneous=Miscellaneous
Calendar=Calendar
GroupBy=Group by...
ViewFlatList=View flat list
RemoveString=Remove string '%s'
# Week day
Monday=Monday
Tuesday=Tuesday

View File

@ -1,6 +1,6 @@
# Dolibarr language file - Source file is en_US - salaries
SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Accountancy code for salaries payments
SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Accountancy code for personnel expenses
SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Accounting account by default for salaries payments
SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Accounting account by default for personnel expenses
Salary=Salary
Salaries=Salaries
NewSalaryPayment=New salary payment

View File

@ -9,42 +9,51 @@ ACCOUNTING_EXPORT_DEVISE=Exporter la devise
Selectformat=Sélectionnez le format du fichier
ACCOUNTING_EXPORT_PREFIX_SPEC=Spécifiez le préfixe pour le nom du fichier
AccountancySetupDoneFromAccountancyMenu=La plupart configuration de la comptabilité se fait depuis le menu %s
ConfigAccountingExpert=Configuration du module comptabilité expert
Journalization=Ventilation
Journaux=Journaux
JournalFinancial=Journaux financiers
BackToChartofaccounts=Retour au plan comptable
Chartofaccounts=Plan comptable
AccountancyArea=Espace comptabilité
AccountancyAreaDescIntro=L'utilisation du module de comptabilité se fait en plusieurs étapes:
AccountancyAreaDescActionOnce=Les actions suivantes sont habituellement exécutées une seule fois, ou une fois par an ...
AccountancyAreaDescActionFreq=Les actions suivantes sont habituellement exécutées chaque mois, semaine, ou jour pour les très grandes entreprises ...
AccountancyAreaDescChart=STEP %s: Créer ou vérifier votre plan de compte dans le menu %s
AccountancyAreaDescProd=STEP %s: Vérifier que la liaison entre les produits/services et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le bon compte comptable par défaut sur vos lignes de facture. <br> Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescChartModel=STEP %s: Créer un modèle de plan de compte depuis le menu %s
AccountancyAreaDescChart=STEP %s: Créer ou vérifier le contenu de votre plan de compte depuis le menu %s
AccountancyAreaDescBank=STEP %s: Vérifier que la liaison entre les comptes bancaires et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le bon compte comptable par défaut sur vos lignes de paiement. <br>Pour cela, rendez-vous sur la fiche de chaque compte financier. Vous pouvez commencer à partir de la page %s.
AccountancyAreaDescVat=STEP %s: Vérifiez que la liaison entre le paiement de la TVA et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le compte comptable par défaut correcte sur les enregistrements liés aux paiements de TVA.<br>Vous pouvez définir les comptes comptables à utiliser pour chaque taux de TVA sur la page %s.
AccountancyAreaDescSal=STEP %s: Vérifier que la liaison entre les paiements de salaires et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le bon compte comptable par défaut sur les enregistrements en rapport avec les paiements des salaires.<br>Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescContrib=STEP %s: Vérifier que la liaison entre les dépenses spéciales (cotisations sociales ou fiscales) et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le bon compte comptable par défaut sur les enregistrements liés aux paiements des cotisations sociales.<br>Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescDonation=STEP %s: Vérifier que la liaison entre les paiements de dons et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le bon compte comptable par défaut sur les enregistrements liés aux paiements de don. <br> Vous pouvez définir le compte dédié pour cela à partir de l'entrée de menu %s.
AccountancyAreaDescMisc=STEP %s: Vérifier que les lignes de transactions divers et le compte comptable est fait. Compléter les liaisons manquantes.<br>Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescProd=STEP %s: Vérifier que la liaison entre les produits/services et le compte comptable est faite. Compléter les liaisons manquantes. Cela vous fera économiser du temps dans le futur pour les prochaines étapes en vous proposant le bon compte comptable par défaut sur vos lignes de facture. <br> Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescCustomer=STEP %s: Vérifier que la liaison entre les lignes de factures client existantes et le compte comptable est faite. Compléter les liaisons manquantes. Une fois que la liaison est terminée, l'application sera en mesure d'enregistrer les transactions dans le Grand Livre en un seul clic.<br>Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescSupplier=STEP %s: Vérifier que la liaison entre les lignes de factures fournisseurs existantes et le compte comptable est faite. Compléter les liaisons manquantes. Une fois que la liaison est terminée, l'application sera en mesure d'enregistrer les transactions dans le Grand Livre en un seul clic. <br> Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescWriteRecords=STEP %s: Ecrire les transactions dans le Grand Livre. Ajouter ou modifier les transactions existantes et générer les rapports.
AccountancyAreaDescCustomer=STEP %s: Vérifier que la liaison entre les lignes de factures client existantes et le compte comptable est faite. Compléter les liaisons manquantes. Une fois que la liaison est terminée, l'application sera en mesure d'enregistrer les opérations dans le Grand Livre en un seul clic.<br>Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescSupplier=STEP %s: Vérifier que la liaison entre les lignes de factures fournisseurs existantes et le compte comptable est faite. Compléter les liaisons manquantes. Une fois que la liaison est terminée, l'application sera en mesure d'enregistrer les opérations dans le Grand Livre en un seul clic. <br> Pour cela, vous pouvez utiliser l'entrée de menu %s.
AccountancyAreaDescWriteRecords=STEP %s: Ecrire les transactions dans le Grand Livre. Pour cela, aller sur chaque Journal, et cliquer sur le bouton "Enregistrer les opérations dans le Grand Livre".
AccountancyAreaDescAnalyze=STEP %s: Ajouter ou modifier les opérations existantes et générer des rapports et des exportations.
Selectchartofaccounts=Sélectionner un plan comptable
AccountancyAreaDescClosePeriod=STEP %s: Fermer la périodepour ne plus pouvoir faire de modification à l'avenir.
MenuAccountancy=Comptabilité
Selectchartofaccounts=Sélectionnez le plan de compte actif
ChangeAndLoad=Changer et charger
Addanaccount=Ajouter un compte comptable
AccountAccounting=Compte comptable
AccountAccountingShort=Compte
AccountAccountingSuggest=Suggestion du compte
Ventilation=Liés aux comptes
ProductsBinding=Liaison produits
MenuAccountancy=Comptabilité
MenuDefaultAccounts=Comptes par défaut
CustomersVentilation=Factures client liées
SuppliersVentilation=Factures fournisseurs liées
MenuProductsAccounts=Compte produits
ProductsBinding=Comptes produits
Ventilation=Liés aux comptes
CustomersVentilation=Liaison factures client
SuppliersVentilation=Liaison factures fournisseur
CreateMvts=Créer nouvelle transaction
UpdateMvts=Modification d'une transaction
WriteBookKeeping=Enregistrer les opérations dans le Grand Livre
WriteBookKeeping=Ventiler les opérations dans le Grand Livre
Bookkeeping=Grand livre
AccountBalance=Balance des comptes
@ -174,7 +183,8 @@ Modelcsv_cogilog=Export vers Cogilog
## Tools - Init accounting account on product / service
InitAccountancy=Initialisation comptabilité
InitAccountancyDesc=Cette page peut être utilisée pour initialiser un compte comptable sur les produits et services qui ne disposent pas de compte comptable défini pour les ventes et les achats. Vérifiez avant que la définition du plan de compte est terminée.
InitAccountancyDesc=Cette page peut être utilisée pour initialiser un compte comptable sur les produits et services qui ne disposent pas de compte comptable défini pour les ventes et les achats.
DefaultBindingDesc=Cette page peut être utilisée pour définir un compte par défaut à utiliser pour la ventilation des transactions sur les salaires de paiement, les dons, les charges sociales et fiscales et la TVA lorsqu'aucun compte spécifique n'a été défini.
Options=Options
OptionModeProductSell=Mode ventes
OptionModeProductBuy=Modes achats

View File

@ -53,8 +53,6 @@ ErrorModuleRequireDolibarrVersion=Erreur, ce module requiert une version %s ou s
ErrorDecimalLargerThanAreForbidden=Erreur, les précisions supérieures à <b>%s</b> ne sont pas prises en charge.
DictionarySetup=Dictionnaires
Dictionary=Dictionnaires
Chartofaccounts=Plan comptable
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
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).
@ -244,6 +242,9 @@ MAIN_MAIL_EMAIL_STARTTLS= Utiliser le cryptage TTS (STARTTLS)
MAIN_DISABLE_ALL_SMS=Désactiver globalement tout envoi de SMS (pour mode test ou démos)
MAIN_SMS_SENDMODE=Méthode d'envoi des SMS
MAIN_MAIL_SMS_FROM=Numéro de téléphone par défaut pour l'envoi des SMS
MAIN_MAIL_DEFAULT_FROMTYPE=E-mail par défaut pour les envois manuels (email de l'utilisateur ou de l'entreprise)
UserEmail=Email utilisateur
CompanyEmail=Email institution
FeatureNotAvailableOnLinux=Fonctionnalité non disponible sous systèmes Unix. Tester votre sendmail localement.
SubmitTranslation=Si la traduction de cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez corriger cela en éditant les fichiers dans le répertoire <b>langs/%s</b> et soumettre votre changement sur www.transifex.com/dolibarr-association/dolibarr/
SubmitTranslationENUS=Si la traduction pour cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez les corriger en éditant les fichiers dans le répertoire <b>langs/%s</b> et soumettre les modifications sur le forum dolibarr.org/forum ou pour les développeurs sur github.com/Dolibarr/dolibarr.

View File

@ -661,7 +661,7 @@ else
{
$formquestion=array(
'text' => $langs->trans("ConfirmClone"),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int')>0?GETPOST('socid', 'int'):$object->socid, 'socid', '', "None")),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int')>0?GETPOST('socid', 'int'):$object->socid, 'socid', '', "None", 0, 0, null, 0, 'minwidth200')),
array('type' => 'checkbox', 'name' => 'clone_contacts', 'label' => $langs->trans("CloneContacts"), 'value' => true),
array('type' => 'checkbox', 'name' => 'clone_tasks', 'label' => $langs->trans("CloneTasks"), 'value' => true),
array('type' => 'checkbox', 'name' => 'move_date', 'label' => $langs->trans("CloneMoveDate"), 'value' => true),
@ -670,7 +670,7 @@ else
array('type' => 'checkbox', 'name' => 'clone_task_files', 'label' => $langs->trans("CloneTaskFiles"), 'value' => false)
);
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CloneProject"), $langs->trans("ConfirmCloneProject"), "confirm_clone", $formquestion, '', 1, 300);
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CloneProject"), $langs->trans("ConfirmCloneProject"), "confirm_clone", $formquestion, '', 1, 300, 590);
}

View File

@ -705,6 +705,13 @@ class Project extends CommonObject
if ($this->statut != 1)
{
// Check parameters
if (preg_match('/^'.preg_quote($langs->trans("CopyOf").' ').'/', $this->title))
{
$this->error=$langs->trans("ErrorFieldFormat",$langs->transnoentities("Label")).'. '.$langs->trans('RemoveString',$langs->transnoentitiesnoconv("CopyOf"));
return -1;
}
$this->db->begin();
$sql = "UPDATE " . MAIN_DB_PREFIX . "projet";
@ -1196,6 +1203,7 @@ class Project extends CommonObject
if (is_numeric($defaultref) && $defaultref <= 0) $defaultref='';
$clone_project->ref=$defaultref;
$clone_project->title=$langs->trans("CopyOf").' '.$clone_project->title;
// Create clone
$result=$clone_project->create($user,$notrigger);