Social contribution in adaptive mode (Payment are under the information)

This commit is contained in:
aspangaro 2016-11-29 06:43:16 +01:00
commit 953feefb6a
15 changed files with 317 additions and 250 deletions

View File

@ -65,14 +65,6 @@ $formventilation = new FormVentilation($db);
$formother = new FormOther($db); $formother = new FormOther($db);
$form = new Form($db); $form = new Form($db);
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
$search_date_start = '';
$search_date_end = '';
}
if (empty($search_date_start)) { if (empty($search_date_start)) {
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y')); $search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y')); $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
@ -106,6 +98,19 @@ if (! empty($search_accountancy_code_end)) {
* Action * Action
*/ */
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
$search_date_start = '';
$search_date_end = '';
}
/*
* View
*/
if ($action == 'export_csv') { if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = 'bookkepping'; $journal = 'bookkepping';
@ -132,14 +137,12 @@ if ($action == 'export_csv') {
} }
else { else {
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end); $title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
llxHeader('', $title_page); llxHeader('', $title_page);
/* // List
* List
*/
$nbtotalofrecords = 0; $nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter); $nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
@ -153,12 +156,12 @@ else {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy');
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<div class="tabsAction">' . "\n";
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>'; $button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" />';
print '</div>'; print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy', 0, $button);
$moreforfilter = ''; $moreforfilter = '';
@ -169,8 +172,7 @@ else {
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1); $moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
if (! empty($moreforfilter)) if (! empty($moreforfilter)) {
{
print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter; print $moreforfilter;
$parameters = array(); $parameters = array();
@ -230,7 +232,6 @@ else {
} }
print '<tr' . $bc[$var] . '>'; print '<tr' . $bc[$var] . '>';
// Permet d'afficher le compte comptable // Permet d'afficher le compte comptable
if ($root_account_description != $displayed_account) { if ($root_account_description != $displayed_account) {
@ -253,7 +254,6 @@ else {
// $object->get_compte_racine($line->numero_compte); // $object->get_compte_racine($line->numero_compte);
print '<td>' . length_accountg($line->numero_compte) . '</td>'; print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $description . '</td>'; print '<td>' . $description . '</td>';
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>'; print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
@ -266,7 +266,6 @@ else {
// Comptabilise le sous-total // Comptabilise le sous-total
$sous_total_debit += $line->debit; $sous_total_debit += $line->debit;
$sous_total_credit += $line->credit; $sous_total_credit += $line->credit;
} }
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>'; print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
@ -277,7 +276,6 @@ else {
print "<td>&nbsp;</td>\n"; print "<td>&nbsp;</td>\n";
print '</tr>'; print '</tr>';
print "</table>"; print "</table>";
print '</form>'; print '</form>';

View File

@ -288,7 +288,7 @@ if ($action == 'export_csv') {
} }
$title_page = $langs->trans("Bookkeeping"); $title_page = $langs->trans("Bookkeeping");
if ($search_date_start || $search_date_end) $title_page .= ' ' . dol_print_date($search_date_start, 'day') . ' - ' . dol_print_date($search_date_end, 'day');
llxHeader('', $title_page); llxHeader('', $title_page);
// List // List
@ -356,20 +356,21 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); $button = '<a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
else $button.= $langs->trans("ExportList");
$button.= '</a>';
$groupby = ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby, '', $limit);
print '<div class="tabsAction">' . "\n"; print '<div class="tabsAction">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
print '<div class="inline-block divButAction"><a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
if (count($filter)) print $langs->trans("ExportFilteredList");
else print $langs->trans("ExportList");
print '</a></div>';
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>'; print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
print '</div>'; print '</div>';
print ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a><br><br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);

View File

@ -156,7 +156,7 @@ if ($action == 'delmouvconfirm') {
* View * View
*/ */
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end); $title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting");
llxHeader('', $title_page); llxHeader('', $title_page);
@ -207,7 +207,9 @@ if ($action == 'delbookkeepingyear') {
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,'','',$limit); $viewflat = ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat,'',$limit);
// Reverse sort order // Reverse sort order
if ( preg_match('/^asc/i', $sortorder) ) if ( preg_match('/^asc/i', $sortorder) )
@ -219,8 +221,6 @@ print '<div class="tabsAction">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
print '</div>'; print '</div>';
print ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a><br><br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans("AccountAccounting") . '</td>'; print '<td>' . $langs->trans("AccountAccounting") . '</td>';
@ -331,14 +331,15 @@ foreach ( $object->lines as $line ) {
} }
// Affiche un Sous-Total du dernier compte comptable affiché // Affiche un Sous-Total du dernier compte comptable affiché
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>'; print '<tr class="liste_total">';
print '<td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
print "<td>&nbsp;</td>\n"; print "<td>&nbsp;</td>\n";
print '</tr>'; print '</tr>';
// Affiche le Total // Affiche le Total
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>'; print '<td align="right" colspan="5">'.$langs->trans("Total").':</td>';
print '<td align="right">'; print '<td align="right">';
print price($total_debit); print price($total_debit);
print '</td>'; print '</td>';

View File

@ -75,9 +75,12 @@ $form = new Form($db);
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>'; $textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
$textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>'; $textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
print load_fiche_titre($langs->trans('ReportInOut') . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy'); print load_fiche_titre($langs->trans('ReportInOut'), $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, 'title_accountancy');
print '<table class="border" width="100%">'; $moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
$months = array( $langs->trans("JanuaryMin"), $months = array( $langs->trans("JanuaryMin"),
$langs->trans("FebruaryMin"), $langs->trans("FebruaryMin"),
@ -93,7 +96,8 @@ $months = array( $langs->trans("JanuaryMin"),
$langs->trans("DecemberMin"), $langs->trans("DecemberMin"),
); );
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Account").'</th>'; print '<tr class="liste_titre">';
print '<th class="liste_titre">'.$langs->trans("Account").'</th>';
print '<th class="liste_titre">'.$langs->trans("Description").'</th>'; print '<th class="liste_titre">'.$langs->trans("Description").'</th>';
print '<th class="liste_titre" align="center">N-1</th>'; print '<th class="liste_titre" align="center">N-1</th>';
print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>'; print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>';
@ -257,6 +261,7 @@ if (!empty($cats))
} }
print "</table>"; print "</table>";
print '</div>';
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -73,6 +73,14 @@ if ($action == 'reopen' && $user->rights->tax->charges->creer) {
} }
} }
if ($action == 'setlib' && $user->rights->tax->charges->creer)
{
$object->fetch($id);
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY');
if ($result < 0)
setEventMessages($object->error, $object->errors, 'errors');
}
// payment mode // payment mode
if ($action == 'setmode' && $user->rights->tax->charges->creer) { if ($action == 'setmode' && $user->rights->tax->charges->creer) {
$object->fetch($id); $object->fetch($id);
@ -366,6 +374,8 @@ if ($id > 0)
{ {
$head=tax_prepare_head($object); $head=tax_prepare_head($object);
$totalpaye = $object->getSommePaiement();
// Clone confirmation // Clone confirmation
if ($action === 'clone') if ($action === 'clone')
{ {
@ -398,9 +408,17 @@ if ($id > 0)
dol_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill'); dol_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill');
$morehtmlref='<div class="refidno">';
// Ref customer
$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
$morehtmlref.='</div>';
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/sociales/index.php">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/compta/sociales/index.php">' . $langs->trans("BackToList") . '</a>';
// dol_banner_tab($object, 'id', $linkback, 1, 'id', 'id'); $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="fichehalfleft">'; print '<div class="fichehalfleft">';
@ -408,25 +426,28 @@ if ($id > 0)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
/*
// Ref // Ref
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'; print '<tr><td>'.$langs->trans("Ref").'</td><td>';
print $form->showrefnav($object,'id',$linkback); print $form->showrefnav($object,'id',$linkback);
print "</td></tr>"; print "</td></tr>";
*/
// Label // Label
if ($action == 'edit') /*if ($action == 'edit')
{ {
print '<tr><td class="titlefieldcreate">'.$langs->trans("Label").'</td><td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>';
print '<input type="text" name="label" size="40" value="'.$object->lib.'">'; print '<input type="text" name="label" size="40" value="'.$object->lib.'">';
print '</td></tr>'; print '</td></tr>';
} }
else else
{ {
print '<tr><td class="titlefield">'.$langs->trans("Label").'</td><td>'.$object->lib.'</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$object->lib.'</td></tr>';
} }*/
// Type // Type
print "<tr><td>".$langs->trans("Type")."</td><td>".$object->type_libelle."</td>"; print "<tr><td>".$langs->trans("Type")."</td><td>".$object->type_libelle."</td>";
print "</tr>";
// Period end date // Period end date
print "<tr><td>".$langs->trans("PeriodEndDate")."</td>"; print "<tr><td>".$langs->trans("PeriodEndDate")."</td>";
@ -528,7 +549,7 @@ if ($id > 0)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $total = 0; $i = 0; $total = 0;
print '<table class="noborder" width="100%">'; print '<table class="noborder paymenttable">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("RefPayment").'</td>'; print '<td>'.$langs->trans("RefPayment").'</td>';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
@ -576,6 +597,7 @@ if ($id > 0)
print '</div>'; print '</div>';
print '<div class="clearboth"></div>'; print '<div class="clearboth"></div>';
dol_fiche_end(); dol_fiche_end();
if ($action == 'edit') if ($action == 'edit')

View File

@ -34,7 +34,7 @@ class ChargeSociales extends CommonObject
public $element='chargesociales'; public $element='chargesociales';
public $table='chargesociales'; public $table='chargesociales';
public $table_element='chargesociales'; public $table_element='chargesociales';
var $picto = 'bill'; public $picto = 'bill';
/** /**
* {@inheritdoc} * {@inheritdoc}
@ -372,7 +372,7 @@ class ChargeSociales extends CommonObject
/** /**
* Retourne le libelle du statut d'une charge (impaye, payee) * Retourne le libelle du statut d'une charge (impaye, payee)
* *
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @return string Label * @return string Label
*/ */
@ -385,7 +385,7 @@ class ChargeSociales extends CommonObject
* Renvoi le libelle d'un statut donne * Renvoi le libelle d'un statut donne
* *
* @param int $statut Id statut * @param int $statut Id statut
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @return string Label * @return string Label
*/ */
@ -429,6 +429,12 @@ class ChargeSociales extends CommonObject
if ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); if ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3');
if ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); if ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6');
} }
if ($mode == 6)
{
if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1');
if ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3');
if ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6');
}
return "Error, mode/status not found"; return "Error, mode/status not found";
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr> /* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -262,7 +262,11 @@ if ($modecompta == 'CREANCES-DETTES')
print '<input type="hidden" name="'.$key.'" value="'.$value.'">'; print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
} }
print '<table class="noborder" width="100%">'; $moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Category filter // Category filter
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'; print '<td>';
@ -418,6 +422,8 @@ if ($modecompta == 'CREANCES-DETTES')
$db->free($result); $db->free($result);
} }
print "</table>"; print "</table>";
print '</div>';
print '</form>'; print '</form>';
} else { } else {
// $modecompta != 'CREANCES-DETTES' // $modecompta != 'CREANCES-DETTES'

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr> * Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
* *
@ -260,8 +260,11 @@ if ($modecompta != 'CREANCES-DETTES') {
} }
} }
$i = 0; $morefilter='';
print "<table class=\"noborder\" width=\"100%\">";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre( print_liste_field_titre(
$langs->trans("User"), $langs->trans("User"),
@ -346,6 +349,8 @@ if (count($amount)) {
$arrayforsort=$amount; $arrayforsort=$amount;
} }
$i = 0;
foreach($arrayforsort as $key => $value) { foreach($arrayforsort as $key => $value) {
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
@ -432,6 +437,8 @@ if (count($amount)) {
} }
print "</table>"; print "</table>";
print '</div>';
print '</form>';
llxFooter(); llxFooter();

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr> * Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
@ -22,7 +22,7 @@
/** /**
* \file htdocs/compta/stats/casoc.php * \file htdocs/compta/stats/casoc.php
* \brief Page reporting CA par societe * \brief Page reporting Turnover (CA) by thirdparty
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -151,6 +151,7 @@ foreach($allparams as $key => $value) {
$paramslink .= '&' . $key . '=' . $value; $paramslink .= '&' . $key . '=' . $value;
} }
/* /*
* View * View
*/ */
@ -338,7 +339,12 @@ foreach($headerparams as $key => $value)
{ {
print '<input type="hidden" name="'.$key.'" value="'.$value.'">'; print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
} }
print "<table class=\"noborder\" width=\"100%\">";
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Category filter // Category filter
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'; print '<td>';
@ -614,6 +620,8 @@ if (count($amount)) {
} }
print "</table>"; print "</table>";
print "</div>";
print '</form>'; print '</form>';
llxFooter(); llxFooter();

View File

@ -178,12 +178,11 @@ if ($modecompta != 'CREANCES-DETTES')
} }
} }
$moreforfilter='';
/* print '<div class="div-table-responsive">';
* Show result array print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
*/
print '<table width="100%" class="noborder">';
print '<tr class="liste_titre"><td>&nbsp;</td>'; print '<tr class="liste_titre"><td>&nbsp;</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
@ -433,6 +432,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
} }
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
print '</div>';
/* /*

View File

@ -1055,6 +1055,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye); if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
$morehtmlstatus.=$tmptxt; $morehtmlstatus.=$tmptxt;
} }
elseif ($object->element == 'chargesociales')
{
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
$morehtmlstatus.=$tmptxt;
}
elseif ($object->element == 'facturerec') elseif ($object->element == 'facturerec')
{ {
$morehtmlstatus.='<!-- No status for recurring invoice -->'; $morehtmlstatus.='<!-- No status for recurring invoice -->';

View File

@ -64,6 +64,10 @@ ALTER TABLE llx_website ADD COLUMN virtualhost varchar(255) after fk_default_hom
ALTER TABLE llx_chargesociales ADD COLUMN fk_account integer after fk_type; ALTER TABLE llx_chargesociales ADD COLUMN fk_account integer after fk_type;
ALTER TABLE llx_chargesociales ADD COLUMN fk_mode_reglement integer after fk_account; ALTER TABLE llx_chargesociales ADD COLUMN fk_mode_reglement integer after fk_account;
ALTER TABLE llx_chargesociales ADD COLUMN fk_user_author integer;
ALTER TABLE llx_chargesociales ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_chargesociales ADD COLUMN fk_user_valid integer;
ALTER TABLE llx_ecm_files ADD COLUMN gen_or_uploaded varchar(12) after cover; ALTER TABLE llx_ecm_files ADD COLUMN gen_or_uploaded varchar(12) after cover;

View File

@ -26,6 +26,9 @@ create table llx_chargesociales
tms timestamp, tms timestamp,
date_creation datetime, -- date de creation date_creation datetime, -- date de creation
date_valid datetime, -- date de validation date_valid datetime, -- date de validation
fk_user_author integer, -- user making creation
fk_user_modif integer, -- user making last change
fk_user_valid integer, -- user validating
fk_type integer NOT NULL, fk_type integer NOT NULL,
fk_account integer, -- bank account fk_account integer, -- bank account
fk_mode_reglement integer, -- mode de reglement fk_mode_reglement integer, -- mode de reglement

View File

@ -140,7 +140,7 @@ 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 specific journal. At least one criteria is required. 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 record of the general ledger
FinanceJournal=Finance journal FinanceJournal=Finance journal
ExpenseReportsJournal=Expense reports journal ExpenseReportsJournal=Expense reports journal
DescFinanceJournal=Finance journal including all the types of payments by bank account DescFinanceJournal=Finance journal including all the types of payments by bank account

View File

@ -20,8 +20,8 @@ OnlyOpenedProject=Only open projects are visible (projects in draft or closed st
ClosedProjectsAreHidden=Closed projects are not visible. ClosedProjectsAreHidden=Closed projects are not visible.
TasksPublicDesc=This view presents all projects and tasks you are allowed to read. TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything). TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything).
AllTaskVisibleButEditIfYouAreAssigned=All tasks for such project are visible, but you can enter time only for task you are assigned on. Assign task to you if you want to enter time on it. AllTaskVisibleButEditIfYouAreAssigned=All tasks for such project are visible, but you can enter time only for task assigned to you. Assign task to yourself if you need to enter time on it.
OnlyYourTaskAreVisible=Only tasks you are assigned on are visible. Assign task to you if you want to enter time on it. OnlyYourTaskAreVisible=Only tasks assigned to you are visible. Assign task to yourself if it is not visible and you need to enter time on it.
ImportDatasetTasks=Tasks of projects ImportDatasetTasks=Tasks of projects
NewProject=New project NewProject=New project
AddProject=Create project AddProject=Create project