Debug v16
This commit is contained in:
parent
9f59eaa752
commit
bc79f041dc
@ -353,7 +353,7 @@ if ($socid > 0) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("AmountHT").'</td>';
|
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td><input type="text" size="5" name="amount_ht" value="'.price2num(GETPOST("amount_ht")).'">';
|
print '<td><input type="text" size="5" name="amount_ht" value="'.price2num(GETPOST("amount_ht")).'" autofocus>';
|
||||||
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("VAT").'</td>';
|
print '<tr><td>'.$langs->trans("VAT").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@ -4325,7 +4325,7 @@ if ($action == 'create') {
|
|||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="titlefield fieldname_type">'.$langs->trans('Type').'</td><td class="valuefield fieldname_type">';
|
print '<tr><td class="titlefield fieldname_type">'.$langs->trans('Type').'</td><td class="valuefield fieldname_type">';
|
||||||
@ -4338,17 +4338,17 @@ if ($action == 'create') {
|
|||||||
if ($object->type == Facture::TYPE_REPLACEMENT) {
|
if ($object->type == Facture::TYPE_REPLACEMENT) {
|
||||||
$facreplaced = new Facture($db);
|
$facreplaced = new Facture($db);
|
||||||
$facreplaced->fetch($object->fk_facture_source);
|
$facreplaced->fetch($object->fk_facture_source);
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')</span>';
|
print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).'</span>';
|
||||||
}
|
}
|
||||||
if ($object->type == Facture::TYPE_CREDIT_NOTE && !empty($object->fk_facture_source)) {
|
if ($object->type == Facture::TYPE_CREDIT_NOTE && !empty($object->fk_facture_source)) {
|
||||||
$facusing = new Facture($db);
|
$facusing = new Facture($db);
|
||||||
$facusing->fetch($object->fk_facture_source);
|
$facusing->fetch($object->fk_facture_source);
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')</span>';
|
print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$facidavoir = $object->getListIdAvoirFromInvoice();
|
$facidavoir = $object->getListIdAvoirFromInvoice();
|
||||||
if (count($facidavoir) > 0) {
|
if (count($facidavoir) > 0) {
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->transnoentities("InvoiceHasAvoir");
|
print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir");
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($facidavoir as $id) {
|
foreach ($facidavoir as $id) {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
@ -4360,12 +4360,12 @@ if ($action == 'create') {
|
|||||||
$facavoir->fetch($id);
|
$facavoir->fetch($id);
|
||||||
print $facavoir->getNomUrl(1);
|
print $facavoir->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print ')</span>';
|
print '</span>';
|
||||||
}
|
}
|
||||||
if ($objectidnext > 0) {
|
if ($objectidnext > 0) {
|
||||||
$facthatreplace = new Facture($db);
|
$facthatreplace = new Facture($db);
|
||||||
$facthatreplace->fetch($objectidnext);
|
$facthatreplace->fetch($objectidnext);
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">('.str_replace('{s1}', $facthatreplace->getNomUrl(1), $langs->transnoentities("ReplacedByInvoice", '{s1}')).')</span>';
|
print ' <span class="opacitymediumbycolor paddingleft">'.str_replace('{s1}', $facthatreplace->getNomUrl(1), $langs->transnoentities("ReplacedByInvoice", '{s1}')).'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
|
if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
|
||||||
@ -4425,7 +4425,7 @@ if ($action == 'create') {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) {
|
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) {
|
||||||
// Date invoice
|
// Date invoice point of tax
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||||
print $langs->trans('DatePointOfTax');
|
print $langs->trans('DatePointOfTax');
|
||||||
|
|||||||
@ -177,7 +177,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
print '<br>';
|
//print '<br>';
|
||||||
|
|
||||||
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
||||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
|
$dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
|
||||||
|
|||||||
@ -352,9 +352,9 @@ if ($object->id > 0) {
|
|||||||
if (!empty($conf->projet->enabled)) {
|
if (!empty($conf->projet->enabled)) {
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||||
if ($user->rights->facture->creer) {
|
if ($usercancreate) {
|
||||||
if ($action != 'classify') {
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token='.newToken().'&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : ';
|
||||||
$morehtmlref .= ' : ';
|
$morehtmlref .= ' : ';
|
||||||
}
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
@ -395,12 +395,12 @@ if ($object->id > 0) {
|
|||||||
print '<table class="border centpercent tableforfield">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td colspan="3">';
|
print '<tr><td class="titlefield fieldname_type">'.$langs->trans('Type').'</td><td colspan="3">';
|
||||||
print '<span class="badgeneutral">';
|
print '<span class="badgeneutral">';
|
||||||
print $object->getLibType();
|
print $object->getLibType();
|
||||||
print '</span>';
|
print '</span>';
|
||||||
if ($object->module_source) {
|
if ($object->module_source) {
|
||||||
print ' <span class="opacitymediumbycolor">('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>';
|
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>';
|
||||||
}
|
}
|
||||||
if ($object->type == $object::TYPE_REPLACEMENT) {
|
if ($object->type == $object::TYPE_REPLACEMENT) {
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
@ -409,16 +409,16 @@ if ($object->id > 0) {
|
|||||||
$facreplaced = new Facture($db);
|
$facreplaced = new Facture($db);
|
||||||
}
|
}
|
||||||
$facreplaced->fetch($object->fk_facture_source);
|
$facreplaced->fetch($object->fk_facture_source);
|
||||||
print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')';
|
print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).'</span>';
|
||||||
}
|
}
|
||||||
if ($object->type == $object::TYPE_CREDIT_NOTE) {
|
if ($object->type == $object::TYPE_CREDIT_NOTE && !empty($object->fk_facture_source)) {
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
$facusing = new FactureFournisseur($db);
|
$facusing = new FactureFournisseur($db);
|
||||||
} else {
|
} else {
|
||||||
$facusing = new Facture($db);
|
$facusing = new Facture($db);
|
||||||
}
|
}
|
||||||
$facusing->fetch($object->fk_facture_source);
|
$facusing->fetch($object->fk_facture_source);
|
||||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$facidavoir = $object->getListIdAvoirFromInvoice();
|
$facidavoir = $object->getListIdAvoirFromInvoice();
|
||||||
@ -433,20 +433,22 @@ if ($object->id > 0) {
|
|||||||
$facavoir->fetch($facid);
|
$facavoir->fetch($facid);
|
||||||
$invoicecredits[] = $facavoir->getNomUrl(1);
|
$invoicecredits[] = $facavoir->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print ' ('.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits) . ')';
|
print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir");
|
||||||
|
print ' '. (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits);
|
||||||
|
print '</span>';
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if ($facidnext > 0)
|
if ($objectidnext > 0) {
|
||||||
{
|
|
||||||
$facthatreplace=new Facture($db);
|
$facthatreplace=new Facture($db);
|
||||||
$facthatreplace->fetch($facidnext);
|
$facthatreplace->fetch($objectidnext);
|
||||||
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
|
print ' <span class="opacitymediumbycolor paddingleft">'.str_replace('{s1}', $facthatreplace->getNomUrl(1), $langs->transnoentities("ReplacedByInvoice", '{s1}')).'</span>';
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Discounts
|
// Relative and absolute discounts
|
||||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
print '<!-- Discounts -->'."\n";
|
||||||
|
print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="3">';
|
||||||
|
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
//$societe = new Fournisseur($db);
|
//$societe = new Fournisseur($db);
|
||||||
|
|||||||
@ -2912,15 +2912,15 @@ if ($action == 'create') {
|
|||||||
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) {
|
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) {
|
||||||
$facreplaced = new FactureFournisseur($db);
|
$facreplaced = new FactureFournisseur($db);
|
||||||
$facreplaced->fetch($object->fk_facture_source);
|
$facreplaced->fetch($object->fk_facture_source);
|
||||||
print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')';
|
print ' '.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1));
|
||||||
}
|
}
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||||
$facusing = new FactureFournisseur($db);
|
$facusing = new FactureFournisseur($db);
|
||||||
if ($object->fk_facture_source > 0) {
|
if ($object->fk_facture_source > 0) {
|
||||||
$facusing->fetch($object->fk_facture_source);
|
$facusing->fetch($object->fk_facture_source);
|
||||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
print ' '.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1));
|
||||||
} else {
|
} else {
|
||||||
print ' ('.$langs->transnoentities("CorrectedInvoiceNotFound").')';
|
print ' '.$langs->transnoentities("CorrectedInvoiceNotFound");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,9 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
/*
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="fichehalfleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent tableforfield">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
@ -189,12 +191,12 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) {
|
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) {
|
||||||
$facreplaced = new FactureFournisseur($db);
|
$facreplaced = new FactureFournisseur($db);
|
||||||
$facreplaced->fetch($object->fk_facture_source);
|
$facreplaced->fetch($object->fk_facture_source);
|
||||||
print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')';
|
print ' '.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1));
|
||||||
}
|
}
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||||
$facusing = new FactureFournisseur($db);
|
$facusing = new FactureFournisseur($db);
|
||||||
$facusing->fetch($object->fk_facture_source);
|
$facusing->fetch($object->fk_facture_source);
|
||||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
print ' '.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
$facidavoir = $object->getListIdAvoirFromInvoice();
|
$facidavoir = $object->getListIdAvoirFromInvoice();
|
||||||
@ -205,12 +207,12 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$facavoir->fetch($facid);
|
$facavoir->fetch($facid);
|
||||||
$invoicecredits[] = $facavoir->getNomUrl(1);
|
$invoicecredits[] = $facavoir->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print ' ('.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits) . ')';
|
print ' '.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits);
|
||||||
}
|
}
|
||||||
//if ($facidnext > 0) {
|
//if ($facidnext > 0) {
|
||||||
// $facthatreplace = new FactureFournisseur($db);
|
// $facthatreplace = new FactureFournisseur($db);
|
||||||
// $facthatreplace->fetch($facidnext);
|
// $facthatreplace->fetch($facidnext);
|
||||||
// print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')';
|
// print ' '.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1));
|
||||||
//}
|
//}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -219,6 +221,13 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print $form->editfieldval("Label", 'label', $object->label, $object, 0);
|
print $form->editfieldval("Label", 'label', $object->label, $object, 0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div><div class="fichehalfright">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($object->total_ht, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($object->total_ht, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
||||||
@ -238,10 +247,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($object->total_ttc, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($object->total_ttc, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
*/
|
||||||
|
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
print '<br>';
|
//print '<div class="clearboth"></div>';
|
||||||
|
//print '<br>';
|
||||||
|
|
||||||
// Contacts lines
|
// Contacts lines
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user