$object->fetch($id); } $upload_dir = $conf->tax->dir_output . '/' . dol_sanitizeFileName($object->ref); $modulepart = 'tax'; /* * Actions */ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php'; /* * View */ $form = new Form($db); $help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; llxHeader("", $langs->trans("SocialContribution"), $help_url); if ($object->id) { $alreadypayed = $object->getSommePaiement(); $head = tax_prepare_head($object, $user); dol_fiche_head($head, 'documents', $langs->trans("SocialContribution"), 0, 'bill'); // Construit liste des fichiers $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\\.meta|_preview\\.png)$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $totalsize = 0; foreach ($filearray as $key => $file) { $totalsize += $file['size']; } print '<table class="border" width="100%">'; // Ref print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td>'; print $form->showrefnav($object, 'id'); print "</td></tr>"; // Label if ($action == 'edit') {
$facturestatic->ref = $obj->ref; $facturestatic->id = $obj->objid; $facturestatic->type = $obj->type; $ref = $facturestatic->getNomUrl(1, ''); $societestatic->id = $obj->socid; $societestatic->name = $obj->name; $refcomp = $societestatic->getNomUrl(1, '', 24); $paiement = $facturestatic->getSommePaiement(); // Payment already done } if ($obj->family == 'social_contribution') { $socialcontribstatic->ref = $obj->ref; $socialcontribstatic->id = $obj->objid; $socialcontribstatic->lib = $obj->type; $ref = $socialcontribstatic->getNomUrl(1, 24); $paiement = -1 * $socialcontribstatic->getSommePaiement(); // Payment already done } $total_ttc = $obj->total_ttc; if ($paiement) { $total_ttc = $obj->total_ttc - $paiement; } $solde += $total_ttc; // We discard lines with a remainder to pay to 0 if (price2num($total_ttc) != 0) { $var = !$var; // Show line print "<tr " . $bc[$var] . ">"; print '<td>'; if ($obj->dlr) { print dol_print_date($db->jdate($obj->dlr), "day");
$ref = $facturestatic->getNomUrl(1,''); $societestatic->id = $obj->socid; $societestatic->nom = $obj->nom; $refcomp=$societestatic->getNomUrl(1,'',24); $paiement = $facturestatic->getSommePaiement(); // Payment already done } if ($obj->family == 'social_contribution') { $socialcontribstatic->ref=$obj->ref; $socialcontribstatic->id=$obj->objid; $socialcontribstatic->lib=$obj->type; $ref = $socialcontribstatic->getNomUrl(1,24); $paiement = -1*$socialcontribstatic->getSommePaiement(); // Payment already done } $total_ttc = $obj->total_ttc; if ($paiement) $total_ttc = $obj->total_ttc - $paiement; $solde += $total_ttc; // We discard with a remain to pay to 0 if (price2num($total_ttc) != 0) { $var=!$var; // Show line print "<tr ".$bc[$var].">"; print '<td>'; if ($obj->dlr) print dol_print_date($db->jdate($obj->dlr),"day");