Complete help

This commit is contained in:
Laurent Destailleur 2016-10-06 19:03:40 +02:00
parent 539ee1ace2
commit 0cfb0ff7b7
5 changed files with 449 additions and 413 deletions

View File

@ -43,7 +43,8 @@ $langs->load("admin");
$langs->load("dict"); $langs->load("dict");
$langs->load("bills"); $langs->load("bills");
$langs->load("accountancy"); $langs->load("accountancy");
$langs->load("compta");
$langs->load("banks");
/* /*
* Actions * Actions
@ -78,13 +79,22 @@ print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step,
print "<br>\n"; print "<br>\n";
print "<br>\n"; print "<br>\n";
$step++; $step++;
//$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>';
$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
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>'); print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Dictionaries")."-".$langs->transnoentitiesnoconv("DictionaryVAT").'</strong>');
print "<br>\n"; print "<br>\n";
print "<br>\n"; print "<br>\n";
if (! empty($conf->tax->enabled)) 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>';
$step++; $step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, '<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Dictionaries")."-".$langs->transnoentitiesnoconv("DictionarySocialContributions").'</strong>'); print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n"; print "<br>\n";
print "<br>\n"; print "<br>\n";
} }
@ -103,7 +113,7 @@ if (! empty($conf->don->enabled))
print "<br>\n"; print "<br>\n";
print "<br>\n"; print "<br>\n";
} }
// Other: bank transfer, bank accounts
print "<br>\n"; print "<br>\n";
print_fiche_titre($langs->trans("AccountancyAreaDescActionFreq"), '', 'object_calendarweek'); print_fiche_titre($langs->trans("AccountancyAreaDescActionFreq"), '', 'object_calendarweek');
@ -117,6 +127,9 @@ print "<br>\n";
$step++; $step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSupplier", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n"; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSupplier", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n";
print "<br>\n"; 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";

View File

@ -59,6 +59,7 @@ if ($user->societe_id > 0)
$action = GETPOST('action'); $action = GETPOST('action');
/* /*
* Actions * Actions
*/ */
@ -303,12 +304,16 @@ if ($action == 'writebookkeeping') {
{ {
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings'); setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
} }
$action='';
} }
/* /*
* View * View
*/ */
$form = new Form($db);
$companystatic = new Fournisseur($db); $companystatic = new Fournisseur($db);
// Export // Export
@ -429,12 +434,12 @@ if ($action == 'export_csv') {
print "\n"; print "\n";
} }
} }
} else { }
if (empty($action) || $action == 'view') {
llxHeader('', $langs->trans("PurchasesJournal")); llxHeader('', $langs->trans("PurchasesJournal"));
$form = new Form($db);
$nom = $langs->trans("PurchasesJournal"); $nom = $langs->trans("PurchasesJournal");
$nomlink = ''; $nomlink = '';
$periodlink = ''; $periodlink = '';
@ -484,6 +489,7 @@ if ($action == 'export_csv') {
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("JournalNum")."</td>"; // /print "<td>".$langs->trans("JournalNum")."</td>";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>"; print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>"; print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>"; print "<td>" . $langs->trans("AccountAccounting") . "</td>";
@ -514,6 +520,7 @@ if ($action == 'export_csv') {
if ($mt) { if ($mt) {
print "<tr " . $bc[$var] . " >"; print "<tr " . $bc[$var] . " >";
print "<td></td>";
print "<td>" . $date . "</td>"; print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>" . length_accountg($k) . "</td>"; print "<td>" . length_accountg($k) . "</td>";
@ -530,6 +537,7 @@ if ($action == 'export_csv') {
foreach ( $tabtva[$key] as $k => $mt ) { foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) { if ($mt) {
print "<tr " . $bc[$var] . " >"; print "<tr " . $bc[$var] . " >";
print "<td></td>";
print "<td>" . $date . "</td>"; print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>" . length_accountg($k) . "</td>"; print "<td>" . length_accountg($k) . "</td>";
@ -543,6 +551,7 @@ if ($action == 'export_csv') {
// Third party // Third party
foreach ( $tabttc[$key] as $k => $mt ) { foreach ( $tabttc[$key] as $k => $mt ) {
print "<td></td>";
print "<td>" . $date . "</td>"; print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id']; $companystatic->id = $tabcompany[$key]['id'];

View File

@ -62,8 +62,9 @@ if ($user->societe_id > 0)
$action = GETPOST('action'); $action = GETPOST('action');
/* /*
* View * Actions
*/ */
$year_current = strftime("%Y", dol_now()); $year_current = strftime("%Y", dol_now());
@ -187,11 +188,6 @@ if ($result) {
dol_print_error($db); dol_print_error($db);
} }
/*
* Action
* FIXME Action must be set before any view part to respect MVC
*/
// Bookkeeping Write // Bookkeeping Write
if ($action == 'writebookkeeping') { if ($action == 'writebookkeeping') {
$now = dol_now(); $now = dol_now();
@ -326,8 +322,18 @@ if ($action == 'writebookkeeping') {
{ {
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings'); setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
} }
$action='';
} }
/*
* View
*/
$form = new Form($db);
// Export // Export
if ($action == 'export_csv') { if ($action == 'export_csv') {
@ -448,9 +454,9 @@ if ($action == 'export_csv') {
} }
} }
} }
} else { }
$form = new Form($db); if (empty($action) || $action == 'view') {
llxHeader('', $langs->trans("SellsJournal")); llxHeader('', $langs->trans("SellsJournal"));
@ -500,6 +506,7 @@ if ($action == 'export_csv') {
$i = 0; $i = 0;
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>"; print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>"; print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>"; print "<td>" . $langs->trans("AccountAccounting") . "</td>";
@ -524,6 +531,7 @@ if ($action == 'export_csv') {
// Third party // Third party
foreach ( $tabttc[$key] as $k => $mt ) { foreach ( $tabttc[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">"; print "<tr " . $bc[$var] . ">";
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>"; print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id']; $companystatic->id = $tabcompany[$key]['id'];
@ -545,6 +553,7 @@ if ($action == 'export_csv') {
if ($mt) { if ($mt) {
print "<tr " . $bc[$var] . ">"; print "<tr " . $bc[$var] . ">";
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>"; print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>" . length_accountg($k) . "</td>"; print "<td>" . length_accountg($k) . "</td>";
@ -560,6 +569,7 @@ if ($action == 'export_csv') {
foreach ( $tabtva[$key] as $k => $mt ) { foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) { if ($mt) {
print "<tr " . $bc[$var] . ">"; print "<tr " . $bc[$var] . ">";
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>"; print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>" . length_accountg($k) . "</td>"; print "<td>" . length_accountg($k) . "</td>";

View File

@ -105,7 +105,7 @@ function clean_account($account)
} }
/** /**
* Return general accounting account with defined length * Return General accounting account with defined length
* *
* @param string $account General accounting account * @param string $account General accounting account
* @return string String with defined length * @return string String with defined length
@ -137,7 +137,8 @@ function length_accountg($account)
} }
/** /**
* Return auxiliary accounting account with defined length * Return Auxiliary accounting account with defined length
* TODO For thirdparty accounts only, or products too ?
* *
* @param string $accounta Auxiliary accounting account * @param string $accounta Auxiliary accounting account
* @return string String with defined length * @return string String with defined length

View File

@ -20,6 +20,7 @@ AccountancyAreaDescActionOnce=The following action are usually executed one time
AccountancyAreaDescActionFreq=The following action are usually executed every month, week or day for very large companies... AccountancyAreaDescActionFreq=The following action are usually executed every month, week or day for very large companies...
AccountancyAreaDescChart=STEP %s: Create or check your chart of account from menu %s AccountancyAreaDescChart=STEP %s: Create or check 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. 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 records related to VAT payments.<br>You can set accounting accounts to use for each VAT 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 records 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 records related to payment of salaries.<br>For this you can use the menu entry %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 records 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 records 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 (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 records related to payments of social contributions.<br>For this you can use the menu entry %s.
@ -27,6 +28,7 @@ AccountancyAreaDescDonation=STEP %s: Check the binding between donation and acco
AccountancyAreaDescCustomer=STEP %s: Check the binding between existing customer invoice lines and accounting accounting 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. AccountancyAreaDescCustomer=STEP %s: Check the binding between existing customer invoice lines and accounting accounting 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 accounting 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 accounting 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
Selectchartofaccounts=Select a chart of accounts Selectchartofaccounts=Select a chart of accounts
Addanaccount=Add an accounting account Addanaccount=Add an accounting account
@ -195,7 +197,8 @@ ErrorNoAccountingCategoryForThisCountry=No accounting category are available for
ExportNotSupported=The export format setuped is not supported into this page ExportNotSupported=The export format setuped is not supported into this page
BookeppingLineAlreayExists=Lines already existing into bookeeping BookeppingLineAlreayExists=Lines already existing into bookeeping
Binded=Lines binded Binded=Lines binded
ToBind=Lines to bind ToBind=Lines to bind
WarningReportNotReliable=Warning, this report is not based on the General Ledger, so is not reliable yet. It will be replaced be a correct report in a next version.