Merge pull request #1903 from aspangaro/develop-accounting
Patch Accounting Expert module
This commit is contained in:
commit
99f1876aa2
@ -137,11 +137,11 @@ else {
|
|||||||
|
|
||||||
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
|
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
|
||||||
|
|
||||||
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" />';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a>';
|
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
|
|
||||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
|
|||||||
@ -132,7 +132,7 @@ if ($result) {
|
|||||||
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
||||||
$cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
$cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||||
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
||||||
$cptsociale = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||||
|
|
||||||
$tabpay = array ();
|
$tabpay = array ();
|
||||||
$tabbq = array ();
|
$tabbq = array ();
|
||||||
@ -173,21 +173,26 @@ if ($result) {
|
|||||||
|
|
||||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||||
|
|
||||||
if ($links[$key]['type'] == 'payment') {
|
if ($links[$key]['type'] == 'payment')
|
||||||
|
{
|
||||||
$paymentstatic->id = $links[$key]['url_id'];
|
$paymentstatic->id = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||||
} else if ($links[$key]['type'] == 'payment_supplier') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_supplier')
|
||||||
|
{
|
||||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||||
} else if ($links[$key]['type'] == 'company') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'company')
|
||||||
|
{
|
||||||
$societestatic->id = $links[$key]['url_id'];
|
$societestatic->id = $links[$key]['url_id'];
|
||||||
$societestatic->nom = $links[$key]['label'];
|
$societestatic->nom = $links[$key]['label'];
|
||||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'sc') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'sc')
|
||||||
|
{
|
||||||
$chargestatic->id = $links[$key]['url_id'];
|
$chargestatic->id = $links[$key]['url_id'];
|
||||||
$chargestatic->ref = $links[$key]['url_id'];
|
$chargestatic->ref = $links[$key]['url_id'];
|
||||||
|
|
||||||
@ -196,7 +201,9 @@ if ($result) {
|
|||||||
if ($reg[1] == 'socialcontribution')
|
if ($reg[1] == 'socialcontribution')
|
||||||
$reg[1] = 'SocialContribution';
|
$reg[1] = 'SocialContribution';
|
||||||
$chargestatic->lib = $langs->trans($reg[1]);
|
$chargestatic->lib = $langs->trans($reg[1]);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$chargestatic->lib = $links[$key]['label'];
|
$chargestatic->lib = $links[$key]['label'];
|
||||||
}
|
}
|
||||||
$chargestatic->ref = $chargestatic->lib;
|
$chargestatic->ref = $chargestatic->lib;
|
||||||
@ -211,29 +218,33 @@ if ($result) {
|
|||||||
|
|
||||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||||
$resultmid = $db->query($sqlmid);
|
$resultmid = $db->query($sqlmid);
|
||||||
if ($resultmid) {
|
if ($resultmid)
|
||||||
|
{
|
||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||||
}
|
}
|
||||||
} else if ($links[$key]['type'] == 'payment_vat') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_vat')
|
||||||
|
{
|
||||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'payment_salary') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_salary')
|
||||||
|
{
|
||||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||||
$tabtp[$obj->rowid][$cptsociale] += $obj->amount;
|
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'banktransfert')
|
||||||
|
{
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||||
}
|
}
|
||||||
/*else {
|
/*else {
|
||||||
$tabtp [$obj->rowid] [$cptsociale] += $obj->amount;
|
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||||
@ -477,14 +488,14 @@ if ($action == 'export_csv') {
|
|||||||
|
|
||||||
llxHeader('', $langs->trans("BankJournal"));
|
llxHeader('', $langs->trans("BankJournal"));
|
||||||
|
|
||||||
$nom = $langs->trans("BankJournal");
|
$namereport = $langs->trans("BankJournal");
|
||||||
$nomlink = '';
|
$namelink = '';
|
||||||
$periodlink = '';
|
$periodlink = '';
|
||||||
$exportlink = '';
|
$exportlink = '';
|
||||||
$builddate = time();
|
$builddate = time();
|
||||||
$description = $langs->trans("DescBankJournal") . '<br>';
|
$description = $langs->trans("DescBankJournal") . '<br>';
|
||||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
report_header($namereport, $namelink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||||
|
|
||||||
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
||||||
|
|
||||||
|
|||||||
@ -918,7 +918,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Grand livre
|
// Grand livre
|
||||||
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
|
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
|
||||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
||||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
||||||
|
|
||||||
// Accountancy journals
|
// Accountancy journals
|
||||||
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy')
|
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy')
|
||||||
|
|||||||
@ -122,6 +122,7 @@ CustomerInvoicePayment=Payment of invoice customer
|
|||||||
|
|
||||||
ThirdPartyAccount=Thirdparty account
|
ThirdPartyAccount=Thirdparty account
|
||||||
|
|
||||||
|
NewAccountingMvt=New movement
|
||||||
NumMvts=Number of movement
|
NumMvts=Number of movement
|
||||||
ListeMvts=List of the movement
|
ListeMvts=List of the movement
|
||||||
ErrorDebitCredit=Debit and Credit cannot have a value at the same time
|
ErrorDebitCredit=Debit and Credit cannot have a value at the same time
|
||||||
|
|||||||
@ -120,6 +120,7 @@ CustomerInvoicePayment=Pago Factura a cliente
|
|||||||
|
|
||||||
ThirdPartyAccount=Cuenta tercero
|
ThirdPartyAccount=Cuenta tercero
|
||||||
|
|
||||||
|
NewAccountingMvt=Nueva movimiento
|
||||||
NumMvts=Número de movimiento
|
NumMvts=Número de movimiento
|
||||||
ListeMvts=Apuntes del movimiento
|
ListeMvts=Apuntes del movimiento
|
||||||
ErrorDebitCredit=Débito y Crédito no pueden terner valor al mismo tiempo
|
ErrorDebitCredit=Débito y Crédito no pueden terner valor al mismo tiempo
|
||||||
|
|||||||
@ -122,6 +122,7 @@ CustomerInvoicePayment=Règlement de facture client
|
|||||||
|
|
||||||
ThirdPartyAccount=Compte tiers
|
ThirdPartyAccount=Compte tiers
|
||||||
|
|
||||||
|
NewAccountingMvt=Nouveau mouvement
|
||||||
NumMvts=Numéro de mouvement
|
NumMvts=Numéro de mouvement
|
||||||
ListeMvts=Liste du mouvement
|
ListeMvts=Liste du mouvement
|
||||||
ErrorDebitCredit=Debit et Credit ne peuvent avoir une valeur en même temps
|
ErrorDebitCredit=Debit et Credit ne peuvent avoir une valeur en même temps
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user