Fix code
This commit is contained in:
parent
ae5da8d55c
commit
cce0b2f31b
@ -27,6 +27,7 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
@ -181,7 +182,8 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->cre
|
|||||||
|
|
||||||
if (!$dateech)
|
if (!$dateech)
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldReqrequire_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
|
uired", $langs->transnoentities("Date")), null, 'errors');
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
} elseif (!$dateperiod)
|
} elseif (!$dateperiod)
|
||||||
{
|
{
|
||||||
@ -610,14 +612,22 @@ if ($id > 0)
|
|||||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$paymentsocialcontributiontmp = new PaymentSocialContribution($db);
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$paymentsocialcontributiontmp->id = $objp->rowid;
|
||||||
|
$paymentsocialcontributiontmp->ref = $objp->rowid;
|
||||||
|
$paymentsocialcontributiontmp->datep = $db->jdate($objp->dp);
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
print $paymentsocialcontributiontmp->getNomUrl(1);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||||
$labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
|
$labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
|
||||||
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
|
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
|
||||||
|
|||||||
@ -694,7 +694,7 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
}
|
}
|
||||||
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow;
|
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow;
|
||||||
}
|
}
|
||||||
if ($this->date) $label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->date, 'day');
|
if ($this->datep) $label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->datep, 'day');
|
||||||
|
|
||||||
if (!empty($this->id)) {
|
if (!empty($this->id)) {
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$link = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
|
|||||||
@ -1783,6 +1783,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
// Add if object was dispatched "into accountancy"
|
// Add if object was dispatched "into accountancy"
|
||||||
if (!empty($conf->accounting->enabled) && in_array($object->element, array('bank', 'facture', 'invoice', 'invoice_supplier', 'expensereport', 'payment_various')))
|
if (!empty($conf->accounting->enabled) && in_array($object->element, array('bank', 'facture', 'invoice', 'invoice_supplier', 'expensereport', 'payment_various')))
|
||||||
{
|
{
|
||||||
|
// Note: For 'chargesociales', 'salaries'... this is the payments that are dispatched (so element = 'bank')
|
||||||
if (method_exists($object, 'getVentilExportCompta'))
|
if (method_exists($object, 'getVentilExportCompta'))
|
||||||
{
|
{
|
||||||
$accounted = $object->getVentilExportCompta();
|
$accounted = $object->getVentilExportCompta();
|
||||||
|
|||||||
@ -2461,7 +2461,7 @@ class ExpenseReport extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if an expensereport was dispatched into bookkeeping
|
* Return if object was dispatched into bookkeeping
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, 0=no, 1=yes
|
* @return int <0 if KO, 0=no, 1=yes
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user