print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); print '. '; } else { if ($object->statut < 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); print '<br>' . $text . '.<br>'; } else { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); $text2 = $langs->trans("AbsoluteDiscountUse"); print $form->textwithpicto($text, $text2); } } } else { // Remise dispo de type remise fixe (not credit note) print '<br>'; $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' (' . $addabsolutediscount . ')'); } } else { if ($absolute_creditnote > 0) { if ($object->statut == 0 && $object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT) { print ' (' . $addabsolutediscount . ')<br>'; } else { print '. '; } } else { print '. '; } } if ($absolute_creditnote > 0) { // If validated, we show link "add credit note to payment" if ($object->statut != 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
} else { print $langs->trans("CompanyHasNoRelativeDiscount"); } print '. '; $absolute_discount = $soc->getAvailableDiscounts('', 'fk_facture_source IS NULL'); $absolute_creditnote = $soc->getAvailableDiscounts('', 'fk_facture_source IS NOT NULL'); $absolute_discount = price2num($absolute_discount, 'MT'); $absolute_creditnote = price2num($absolute_creditnote, 'MT'); if ($absolute_discount) { if ($object->statut > 0) { print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->monnaie)); } else { // Remise dispo de type non avoir $filter = 'fk_facture_source IS NULL'; print '<br>'; $html->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter); } } if ($absolute_creditnote) { print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->monnaie)) . '. '; } if (!$absolute_discount && !$absolute_creditnote) { print $langs->trans("CompanyHasNoAbsoluteDiscount") . '.'; } print '</td></tr>'; // Date print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('Date'); print '</td>'; if ($action != 'editdate' && $object->brouillon) {
print '<br>'.$text.'.<br>'; } else { $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie)); $text2=$langs->trans("AbsoluteDiscountUse"); print $html->textwithpicto($text,$text2); } } } else { // Remise dispo de type non avoir $filter='fk_facture_source IS NULL'; print '<br>'; $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id',$soc->id,$absolute_discount,$filter,$resteapayer); } } if ($absolute_creditnote > 0) { // If validated, we show link "add credit note to payment" if ($fac->statut != 1 || $fac->type == 2 || $fac->type == 3) { if ($fac->statut == 0 && $fac->type != 3) { $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)); print $html->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'.'; } else
} else { print $langs->trans("CompanyHasNoRelativeDiscount"); } print '. '; $absolute_discount = $soc->getAvailableDiscounts('', 'fk_facture_source IS NULL'); $absolute_creditnote = $soc->getAvailableDiscounts('', 'fk_facture_source IS NOT NULL'); $absolute_discount = price2num($absolute_discount, 'MT'); $absolute_creditnote = price2num($absolute_creditnote, 'MT'); if ($absolute_discount) { if ($commande->statut > 0) { print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); } else { // Remise dispo de type non avoir $filter = 'fk_facture_source IS NULL'; print '<br>'; $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $commande->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter); } } if ($absolute_creditnote) { print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '. '; } if (!$absolute_discount && !$absolute_creditnote) { print $langs->trans("CompanyHasNoAbsoluteDiscount") . '.'; } print '</td></tr>'; // Date print '<tr><td>' . $langs->trans('Date') . '</td>'; print '<td colspan="2">' . dol_print_date($commande->date, 'daytext') . '</td>'; print '<td width="50%">' . $langs->trans('Source') . ' : ' . $commande->getLabelSource() . '</td>'; print '</tr>'; // Delivery date planned
print '. '; } else { if ($object->statut < 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); print '<br>' . $text . '.<br>'; } else { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); $text2 = $langs->trans("AbsoluteDiscountUse"); print $form->textwithpicto($text, $text2); } } } else { // Remise dispo de type remise fixe (not credit note) $filter = 'fk_facture_source IS NULL'; print '<br>'; $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter, $resteapayer, ' - ' . $addabsolutediscount); } } else { if ($absolute_creditnote > 0) { if ($object->statut == 0 && $object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT) { print ' - ' . $addabsolutediscount . '<br>'; } else { print '.'; } } else { print '. '; } } if ($absolute_creditnote > 0) { // If validated, we show link "add credit note to payment" if ($object->statut != 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)) . '. '; } else { if ($object->statut < 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); print '<br>' . $text . '.<br>'; } else { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); $text2 = $langs->trans("AbsoluteDiscountUse"); print $form->textwithpicto($text, $text2); } } } else { // Remise dispo de type non avoir $filter = 'fk_facture_source IS NULL'; print '<br>'; $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $object->thirdparty->id, $absolute_discount, $filter, $resteapayer); } } if ($absolute_creditnote > 0) { // If validated, we show link "add credit note to payment" if ($object->statut != 1 || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_CREDIT_NOTE) { if ($object->statut == 0 && $object->type != Facture::TYPE_DEPOSIT) { $text = $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)); print $form->textwithpicto($text, $langs->trans("CreditNoteDepositUse")); } else { print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '.'; } } else { // Remise dispo de type avoir $filter = 'fk_facture_source IS NOT NULL'; if (!$absolute_discount) {