2
0
forked from Wavyzz/dolibarr

Look and feel v13

This commit is contained in:
Laurent Destailleur
2020-11-29 15:16:53 +01:00
parent e595f42a59
commit 6c65ebef0d
16 changed files with 147 additions and 85 deletions

View File

@@ -241,8 +241,8 @@ print '<input type="hidden" name="action" value="update">';
clearstatcache(); clearstatcache();
print '<br>'; print '<br>';
print '<table summary="edit" class="noborder centpercent editmode">'; print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
print '<tr class="liste_titre"><th>'.$langs->trans("Language").'</th><th></th>'; print '<tr class="liste_titre"><th>'.img_picto('', 'language').' '.$langs->trans("Language").'</th><th></th>';
print '</tr>'; print '</tr>';
// Default language // Default language

View File

@@ -363,7 +363,7 @@ if ($mode == 'overwrite')
if ($mode == 'searchkey') if ($mode == 'searchkey')
{ {
$langcode = GETPOST('langcode') ?GETPOST('langcode') : $langs->defaultlang; $langcode = GETPOSTISSET('langcode') ? GETPOST('langcode') : $langs->defaultlang;
$newlang = new Translate('', $conf); $newlang = new Translate('', $conf);
$newlang->setDefaultLang($langcode); $newlang->setDefaultLang($langcode);
@@ -384,8 +384,7 @@ if ($mode == 'searchkey')
if (empty($langcode) || $langcode == '-1') $nbempty++; if (empty($langcode) || $langcode == '-1') $nbempty++;
if (empty($transkey)) $nbempty++; if (empty($transkey)) $nbempty++;
if (empty($transvalue)) $nbempty++; if (empty($transvalue)) $nbempty++;
if ($action == 'search' && ($nbempty > 999)) // 999 to disable this if ($action == 'search' && ($nbempty > 999)) { // 999 to disable this
{
setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings'); setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings');
} else { } else {
// Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root) // Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root)

View File

@@ -358,26 +358,23 @@ if (empty($reshook))
if ($object->retained_warranty_date_limit < $object->date) $object->retained_warranty_date_limit = $object->date; if ($object->retained_warranty_date_limit < $object->date) $object->retained_warranty_date_limit = $object->date;
$result = $object->update($user); $result = $object->update($user);
if ($result < 0) dol_print_error($db, $object->error); if ($result < 0) dol_print_error($db, $object->error);
} elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) } elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) {
{
$object->fetch($id); $object->fetch($id);
$result = $object->setRetainedWarranty(GETPOST('retained_warranty', 'float')); $result = $object->setRetainedWarranty(GETPOST('retained_warranty', 'float'));
if ($result < 0) if ($result < 0)
dol_print_error($db, $object->error); dol_print_error($db, $object->error);
} elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) } elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) {
{
$object->fetch($id); $object->fetch($id);
$result = $object->setRetainedWarrantyDateLimit(GETPOST('retained_warranty_date_limit', 'float')); $result = $object->setRetainedWarrantyDateLimit(GETPOST('retained_warranty_date_limit', 'float'));
if ($result < 0) if ($result < 0)
dol_print_error($db, $object->error); dol_print_error($db, $object->error);
} // Multicurrency Code } // Multicurrency Code
elseif ($action == 'setmulticurrencycode' && $usercancreate) { elseif ($action == 'setmulticurrencycode' && $usercancreate) {
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
} // Multicurrency rate } // Multicurrency rate
elseif ($action == 'setmulticurrencyrate' && $usercancreate) { elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int'));
} elseif ($action == 'setinvoicedate' && $usercancreate) } elseif ($action == 'setinvoicedate' && $usercancreate) {
{
$object->fetch($id); $object->fetch($id);
$old_date_lim_reglement = $object->date_lim_reglement; $old_date_lim_reglement = $object->date_lim_reglement;
$date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); $date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']);
@@ -395,8 +392,7 @@ if (empty($reshook))
if ($result < 0) { if ($result < 0) {
dol_print_error($db, $object->error); dol_print_error($db, $object->error);
} }
} elseif ($action == 'setdate_pointoftax' && $usercancreate) } elseif ($action == 'setdate_pointoftax' && $usercancreate) {
{
$object->fetch($id); $object->fetch($id);
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
$object->date_pointoftax = $date_pointoftax; $object->date_pointoftax = $date_pointoftax;
@@ -3649,8 +3645,7 @@ if ($action == 'create')
} }
print '</form>'; print '</form>';
} elseif ($id > 0 || !empty($ref)) } elseif ($id > 0 || !empty($ref)) {
{
/* /*
* Show object in view mode * Show object in view mode
*/ */
@@ -3896,6 +3891,7 @@ if ($action == 'create')
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1);
} }
if ($action == 'paid' && $resteapayer > 0) { if ($action == 'paid' && $resteapayer > 0) {
$close = array();
// Code // Code
$i = 0; $i = 0;
$close[$i]['code'] = 'discount_vat'; // escompte $close[$i]['code'] = 'discount_vat'; // escompte
@@ -3922,7 +3918,7 @@ if ($action == 'create')
$i++; $i++;
// arrayreasons[code]=reason // arrayreasons[code]=reason
foreach ($close as $key => $val) { foreach ($close as $key => $val) {
$arrayreasons[$close [$key]['code']] = $close[$key]['reason']; $arrayreasons[$close[$key]['code']] = $close[$key]['reason'];
} }
// Cree un tableau formulaire // Cree un tableau formulaire
@@ -4073,24 +4069,26 @@ if ($action == 'create')
// 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">';
print '<span class="badgeneutral">';
print $object->getLibType(); print $object->getLibType();
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 == 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">('.$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">('.$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">('.$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)
@@ -4105,14 +4103,14 @@ if ($action == 'create')
if ($objectidnext > 0) { if ($objectidnext > 0) {
$facthatreplace = new Facture($db); $facthatreplace = new Facture($db);
$facthatreplace->fetch($objectidnext); $facthatreplace->fetch($objectidnext);
print ' <span class="opacitymediumbycolor">('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')</span>'; print ' <span class="opacitymediumbycolor paddingleft">('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')</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) {
$discount = new DiscountAbsolute($db); $discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, $object->id); $result = $discount->fetch(0, $object->id);
if ($result > 0) { if ($result > 0) {
print '. <span class="opacitymediumbycolor">'; print ' <span class="opacitymediumbycolor paddingleft">';
print $langs->transnoentities("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')); print $langs->transnoentities("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount'));
print '</span><br>'; print '</span><br>';
} }
@@ -4123,7 +4121,7 @@ if ($action == 'create')
$tmptemplate = new FactureRec($db); $tmptemplate = new FactureRec($db);
$result = $tmptemplate->fetch($object->fk_fac_rec_source); $result = $tmptemplate->fetch($object->fk_fac_rec_source);
if ($result > 0) { if ($result > 0) {
print '. <span class="opacitymediumbycolor">'; print ' <span class="opacitymediumbycolor paddingleft">';
print $langs->transnoentities("GeneratedFromTemplate", '<a href="'.DOL_MAIN_URL_ROOT.'/compta/facture/card-rec.php?facid='.$tmptemplate->id.'">'.dol_escape_htmltag($tmptemplate->ref).'</a>'); print $langs->transnoentities("GeneratedFromTemplate", '<a href="'.DOL_MAIN_URL_ROOT.'/compta/facture/card-rec.php?facid='.$tmptemplate->id.'">'.dol_escape_htmltag($tmptemplate->ref).'</a>');
print '</span>'; print '</span>';
} }
@@ -4133,13 +4131,11 @@ if ($action == 'create')
// Relative and absolute discounts // Relative and absolute discounts
print '<!-- Discounts -->'."\n"; print '<!-- Discounts -->'."\n";
print '<tr><td>'.$langs->trans('Discounts'); print '<tr><td>'.$langs->trans('Discounts');
print '</td><td>'; print '</td><td>';
$thirdparty = $soc; $thirdparty = $soc;
$discount_type = 0; $discount_type = 0;
$backtopage = urlencode($_SERVER["PHP_SELF"].'?facid='.$object->id); $backtopage = urlencode($_SERVER["PHP_SELF"].'?facid='.$object->id);
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
print '</td></tr>'; print '</td></tr>';
// Date invoice // Date invoice
@@ -4155,7 +4151,7 @@ if ($action == 'create')
if ($action == 'editinvoicedate') { if ($action == 'editinvoicedate') {
$form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate');
} else { } else {
print dol_print_date($object->date, 'day'); print '<span class="valuedate">'.dol_print_date($object->date, 'day').'</span>';
} }
print '</td>'; print '</td>';
@@ -4174,7 +4170,7 @@ if ($action == 'create')
if ($action == 'editdate_pointoftax') { if ($action == 'editdate_pointoftax') {
$form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date_pointoftax, 'date_pointoftax'); $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date_pointoftax, 'date_pointoftax');
} else { } else {
print dol_print_date($object->date_pointoftax, 'day'); print '<span class="valuedate">'.dol_print_date($object->date_pointoftax, 'day').'</span>';
} }
print '</td></tr>'; print '</td></tr>';
} }
@@ -4214,7 +4210,7 @@ if ($action == 'create')
if ($action == 'editpaymentterm') { if ($action == 'editpaymentterm') {
$form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date_lim_reglement, 'paymentterm'); $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date_lim_reglement, 'paymentterm');
} else { } else {
print dol_print_date($object->date_lim_reglement, 'day'); print '<span class="valuedate">'.dol_print_date($object->date_lim_reglement, 'day').'</span>';
if ($object->hasDelay()) { if ($object->hasDelay()) {
print img_warning($langs->trans('Late')); print img_warning($langs->trans('Late'));
} }
@@ -4789,10 +4785,13 @@ if ($action == 'create')
if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($object->type != Facture::TYPE_CREDIT_NOTE) {
// Total already paid // Total already paid
print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<tr><td colspan="'.$nbcols.'" class="right">';
if ($object->type != Facture::TYPE_DEPOSIT) print '<span class="opacitymedium">';
if ($object->type != Facture::TYPE_DEPOSIT) {
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
else print $langs->trans('AlreadyPaid'); } else {
print ' :</td><td class="right'.(($totalpaye > 0) ? ' amountalreadypaid' : '').'">'.price($totalpaye).'</td><td>&nbsp;</td></tr>'; print $langs->trans('AlreadyPaid');
}
print '</span></td><td class="right'.(($totalpaye > 0) ? ' amountalreadypaid' : '').'">'.price($totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = $resteapayer; $resteapayeraffiche = $resteapayer;
$cssforamountpaymentcomplete = 'amountpaymentcomplete'; $cssforamountpaymentcomplete = 'amountpaymentcomplete';
@@ -4813,12 +4812,14 @@ if ($action == 'create')
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$invoice->fetch($obj->fk_facture_source); $invoice->fetch($obj->fk_facture_source);
print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
if ($invoice->type == Facture::TYPE_CREDIT_NOTE) if ($invoice->type == Facture::TYPE_CREDIT_NOTE)
print $langs->trans("CreditNote").' '; print $langs->trans("CreditNote").' ';
if ($invoice->type == Facture::TYPE_DEPOSIT) if ($invoice->type == Facture::TYPE_DEPOSIT)
print $langs->trans("Deposit").' '; print $langs->trans("Deposit").' ';
print $invoice->getNomUrl(0); print $invoice->getNomUrl(0);
print ' :</td>'; print '</span>';
print '</td>';
print '<td class="right">'.price($obj->amount_ttc).'</td>'; print '<td class="right">'.price($obj->amount_ttc).'</td>';
print '<td class="right">'; print '<td class="right">';
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>';
@@ -4836,7 +4837,9 @@ if ($action == 'create')
// Paye partiellement 'escompte' // Paye partiellement 'escompte'
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
print '<tr><td colspan="'.$nbcols.'" class="nowrap right">'; print '<tr><td colspan="'.$nbcols.'" class="nowrap right">';
print $form->textwithpicto($langs->trans("Discount").':', $langs->trans("HelpEscompte"), - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("Discount"), $langs->trans("HelpEscompte"), - 1);
print '</span>';
print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
@@ -4844,7 +4847,9 @@ if ($action == 'create')
// Paye partiellement ou Abandon 'badcustomer' // Paye partiellement ou Abandon 'badcustomer'
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') { if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') {
print '<tr><td colspan="'.$nbcols.'" class="nowrap right">'; print '<tr><td colspan="'.$nbcols.'" class="nowrap right">';
print $form->textwithpicto($langs->trans("Abandoned").':', $langs->trans("HelpAbandonBadCustomer"), - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("Abandoned"), $langs->trans("HelpAbandonBadCustomer"), - 1);
print '</span>';
print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>';
// $resteapayeraffiche=0; // $resteapayeraffiche=0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
@@ -4852,7 +4857,9 @@ if ($action == 'create')
// Paye partiellement ou Abandon 'product_returned' // Paye partiellement ou Abandon 'product_returned'
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') { if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
print '<tr><td colspan="'.$nbcols.'" class="nowrap right">'; print '<tr><td colspan="'.$nbcols.'" class="nowrap right">';
print $form->textwithpicto($langs->trans("ProductReturned").':', $langs->trans("HelpAbandonProductReturned"), - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("ProductReturned"), $langs->trans("HelpAbandonProductReturned"), - 1);
print '</span>';
print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
@@ -4863,20 +4870,27 @@ if ($action == 'create')
$text = $langs->trans("HelpAbandonOther"); $text = $langs->trans("HelpAbandonOther");
if ($object->close_note) if ($object->close_note)
$text .= '<br><br><b>'.$langs->trans("Reason").'</b>:'.$object->close_note; $text .= '<br><br><b>'.$langs->trans("Reason").'</b>:'.$object->close_note;
print $form->textwithpicto($langs->trans("Abandoned").':', $text, - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("Abandoned"), $text, - 1);
print '</span>';
print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
} }
// Billed // Billed
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($object->total_ttc).'</td><td>&nbsp;</td></tr>'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
print $langs->trans("Billed");
print '</td><td class="right">'.price($object->total_ttc).'</td><td>&nbsp;</td></tr>';
// Remainder to pay // Remainder to pay
print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
print $langs->trans('RemainderToPay'); print $langs->trans('RemainderToPay');
if ($resteapayeraffiche < 0) if ($resteapayeraffiche < 0)
print ' ('.$langs->trans('ExcessReceived').')'; print ' ('.$langs->trans('ExcessReceived').')';
print ' :</td>'; print '</span>';
print '</td>';
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td>'; print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td>';
print '<td class="nowrap">&nbsp;</td></tr>'; print '<td class="nowrap">&nbsp;</td></tr>';

View File

@@ -74,7 +74,7 @@ class Facture extends CommonInvoice
public $fk_element = 'fk_facture'; public $fk_element = 'fk_facture';
/** /**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png * @var string String with name of icon for myobject.
*/ */
public $picto = 'bill'; public $picto = 'bill';
@@ -1424,11 +1424,11 @@ class Facture extends CommonInvoice
$label = ''; $label = '';
if ($user->rights->facture->lire) { if ($user->rights->facture->lire) {
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Invoice").'</u>'; $label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->trans("Invoice").'</u>';
if ($this->type == self::TYPE_REPLACEMENT) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("ReplacementInvoice").'</u>'; if ($this->type == self::TYPE_REPLACEMENT) $label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("ReplacementInvoice").'</u>';
if ($this->type == self::TYPE_CREDIT_NOTE) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("CreditNote").'</u>'; if ($this->type == self::TYPE_CREDIT_NOTE) $label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("CreditNote").'</u>';
if ($this->type == self::TYPE_DEPOSIT) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("Deposit").'</u>'; if ($this->type == self::TYPE_DEPOSIT) $label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("Deposit").'</u>';
if ($this->type == self::TYPE_SITUATION) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("InvoiceSituation").'</u>'; if ($this->type == self::TYPE_SITUATION) $label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("InvoiceSituation").'</u>';
if (isset($this->statut) && isset($this->alreadypaid)) { if (isset($this->statut) && isset($this->alreadypaid)) {
$label .= ' '.$this->getLibStatut(5, $this->alreadypaid); $label .= ' '.$this->getLibStatut(5, $this->alreadypaid);
} }

View File

@@ -266,8 +266,8 @@ class Form
elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) $ret .= dol_htmlentitiesbr($value); elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) $ret .= dol_htmlentitiesbr($value);
elseif (preg_match('/^safehtmlstring/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value); elseif (preg_match('/^safehtmlstring/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value);
elseif (preg_match('/^restricthtml/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value); elseif (preg_match('/^restricthtml/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value);
elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret .= dol_print_date($value, 'day'); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret .= '<span class="valuedate">'.dol_print_date($value, 'day').'</span>';
elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret .= dol_print_date($value, 'dayhour'); elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret .= '<span class="valuedate">'.dol_print_date($value, 'dayhour').'</span>';
elseif (preg_match('/^select;/', $typeofdata)) elseif (preg_match('/^select;/', $typeofdata))
{ {
$arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata));
@@ -636,11 +636,11 @@ class Form
* Generate select HTML to choose massaction * Generate select HTML to choose massaction
* *
* @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default.
* @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
* @param int $alwaysvisible 1=select button always visible * @param int $alwaysvisible 1=select button always visible
* @param string $name Name for massaction * @param string $name Name for massaction
* @param string $cssclass CSS class used to check for select * @param string $cssclass CSS class used to check for select
* @return string|void Select list * @return string|void Select list
*/ */
public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect') public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect')
{ {
@@ -780,8 +780,6 @@ class Form
$i = 0; $i = 0;
if ($num) if ($num)
{ {
$foundselected = false;
while ($i < $num) while ($i < $num)
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
@@ -828,7 +826,6 @@ class Form
} }
if ($selected && $selected != '-1' && ($selected == $row['rowid'] || $selected == $row['code_iso'] || $selected == $row['code_iso3'] || $selected == $row['label'])) if ($selected && $selected != '-1' && ($selected == $row['rowid'] || $selected == $row['code_iso'] || $selected == $row['code_iso3'] || $selected == $row['label']))
{ {
$foundselected = true;
$out .= '<option value="'.($usecodeaskey ? ($usecodeaskey == 'code2' ? $row['code_iso'] : $row['code_iso3']) : $row['rowid']).'" selected>'; $out .= '<option value="'.($usecodeaskey ? ($usecodeaskey == 'code2' ? $row['code_iso'] : $row['code_iso3']) : $row['rowid']).'" selected>';
} else { } else {
$out .= '<option value="'.($usecodeaskey ? ($usecodeaskey == 'code2' ? $row['code_iso'] : $row['code_iso3']) : $row['rowid']).'">'; $out .= '<option value="'.($usecodeaskey ? ($usecodeaskey == 'code2' ? $row['code_iso'] : $row['code_iso3']) : $row['rowid']).'">';
@@ -1413,7 +1410,7 @@ class Form
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @param string $htmlid Html id to use instead of htmlname * @param string $htmlid Html id to use instead of htmlname
* @return int <0 if KO, Nb of contact in list if OK * @return int <0 if KO, Nb of contact in list if OK
* @deprected You can use selectcontacts directly (warning order of param was changed) * @deprecated You can use selectcontacts directly (warning order of param was changed)
*/ */
public function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '') public function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '')
{ {
@@ -1485,11 +1482,10 @@ class Form
$out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
} }
if ($htmlname != 'none' && !$options_only) $out .= '<select class="flat'.($moreclass ? ' '.$moreclass : '').'" id="'.$htmlid.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.(!empty($moreparam) ? $moreparam : '').'>'; if ($htmlname != 'none' && !$options_only) $out .= '<select class="flat'.($moreclass ? ' '.$moreclass : '').'"'.($num?'':' disabled').' id="'.$htmlid.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.(!empty($moreparam) ? $moreparam : '').'>';
if (($showempty == 1 || ($showempty == 3 && $num > 1)) && !$multiple) $out .= '<option value="0"'.(in_array(0, $selected) ? ' selected' : '').'>&nbsp;</option>'; if (($showempty == 1 || ($showempty == 3 && $num > 1)) && !$multiple) $out .= '<option value="0"'.(in_array(0, $selected) ? ' selected' : '').'>&nbsp;</option>';
if ($showempty == 2) $out .= '<option value="0"'.(in_array(0, $selected) ? ' selected' : '').'>-- '.$langs->trans("Internal").' --</option>'; if ($showempty == 2) $out .= '<option value="0"'.(in_array(0, $selected) ? ' selected' : '').'>-- '.$langs->trans("Internal").' --</option>';
$num = $this->db->num_rows($resql);
$i = 0; $i = 0;
if ($num) if ($num)
{ {
@@ -1561,8 +1557,9 @@ class Form
$i++; $i++;
} }
} else { } else {
$out .= '<option value="-1"'.(($showempty == 2 || $multiple) ? '' : ' selected').' disabled>'; $labeltoshow = ($socid != -1) ? ($langs->trans($socid ? "NoContactDefinedForThirdParty" : "NoContactDefined")) : $langs->trans('SelectAThirdPartyFirst');
$out .= ($socid != -1) ? ($langs->trans($socid ? "NoContactDefinedForThirdParty" : "NoContactDefined")) : $langs->trans('SelectAThirdPartyFirst'); $out .= '<option class="disabled" value="-1"'.(($showempty == 2 || $multiple) ? '' : ' selected').' disabled="disabled">';
$out .= $labeltoshow;
$out .= '</option>'; $out .= '</option>';
} }

View File

@@ -98,7 +98,7 @@ class FormAdmin
if ($showcode == 1) $valuetoshow = $key.' - '.$value; if ($showcode == 1) $valuetoshow = $key.' - '.$value;
if ($showcode == 2) { if ($showcode == 2) {
if ($mainlangonly) $valuetoshow = $value.' ('.preg_replace('/[_-].*$/', '', $key).')'; if ($mainlangonly) $valuetoshow = $value.' ('.preg_replace('/[_-].*$/', '', $key).')';
else $valuetoshow = $value.' ('.$key.')'; else $valuetoshow = $value.' <span class="opacitymedium">('.$key.')</span>';
} }
$keytouse = $key; $keytouse = $key;
@@ -111,11 +111,11 @@ class FormAdmin
continue; continue;
} }
if ($selected == $keytouse) $valuetoshow .= ' '.picto_from_langcode($key, 'class="saturatemedium"');
{ if ($selected == $keytouse) {
$out .= '<option value="'.$keytouse.'" selected>'.$valuetoshow.'</option>'; $out .= '<option value="'.$keytouse.'" selected data-html="'.dol_escape_htmltag($valuetoshow).'">'.$valuetoshow.'</option>';
} else { } else {
$out .= '<option value="'.$keytouse.'">'.$valuetoshow.'</option>'; $out .= '<option value="'.$keytouse.'" data-html="'.dol_escape_htmltag($valuetoshow).'">'.$valuetoshow.'</option>';
} }
} }
$out .= '</select>'; $out .= '</select>';

View File

@@ -3186,7 +3186,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); $pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
if (empty($srconly) && in_array($pictowithouttext, array( if (empty($srconly) && in_array($pictowithouttext, array(
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', 'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cubes', 'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cubes',
'delete', 'dolly', 'dollyrevert', 'donation', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt', 'delete', 'dolly', 'dollyrevert', 'donation', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',

View File

@@ -140,7 +140,8 @@ if ($permission)
</div> </div>
<div class="tagtd maxwidthonsmartphone noborderbottom"> <div class="tagtd maxwidthonsmartphone noborderbottom">
<?php <?php
$nbofcontacts = $form->select_contacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); print $form->selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp');
$nbofcontacts = $form->num;
$newcardbutton = ''; $newcardbutton = '';
if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer) if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer)
@@ -281,7 +282,7 @@ print_liste_field_titre($arrayfields['thirdparty']['label'], $_SERVER["PHP_SELF"
print_liste_field_titre($arrayfields['contact']['label'], $_SERVER["PHP_SELF"], "contact_name", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['contact']['label'], $_SERVER["PHP_SELF"], "contact_name", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], "statut", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], "statut", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre($arrayfields['link']['label'], $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder, 'center maxwidthsearch '); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>"; print "</tr>";
foreach ($list as $entry) foreach ($list as $entry)

View File

@@ -44,7 +44,7 @@ if ($fixedDiscount > 0)
print $langs->trans($translationKey, $fixedDiscount).'.'; print $langs->trans($translationKey, $fixedDiscount).'.';
} else { } else {
$translationKey = (!empty($discount_type)) ? 'HasNoRelativeDiscountFromSupplier' : 'CompanyHasNoRelativeDiscount'; $translationKey = (!empty($discount_type)) ? 'HasNoRelativeDiscountFromSupplier' : 'CompanyHasNoRelativeDiscount';
print $langs->trans($translationKey).'.'; print '<span class="opacitymedium">'.$langs->trans($translationKey).'.</span>';
} }
if ($isNewObject) print ' ('.$addrelativediscount.')'; if ($isNewObject) print ' ('.$addrelativediscount.')';
@@ -95,7 +95,7 @@ if ($absolute_creditnote > 0) {
if ($absolute_discount <= 0 && $absolute_creditnote <= 0) { if ($absolute_discount <= 0 && $absolute_creditnote <= 0) {
$translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount'; $translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount';
print '<br>'.$langs->trans($translationKey).'.'; print '<br><span class="opacitymedium">'.$langs->trans($translationKey).'.</span>';
if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) { if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
print ' ('.$addabsolutediscount.')'; print ' ('.$addabsolutediscount.')';

View File

@@ -2480,7 +2480,9 @@ if ($action == 'create')
// Type // Type
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>'; print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>';
print '<span class="badgeneutral">';
print $object->getLibType(); print $object->getLibType();
print '</span>';
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) if ($object->type == FactureFournisseur::TYPE_REPLACEMENT)
{ {
$facreplaced = new FactureFournisseur($db); $facreplaced = new FactureFournisseur($db);
@@ -2519,7 +2521,7 @@ if ($action == 'create')
$discount = new DiscountAbsolute($db); $discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, 0, $object->id); $result = $discount->fetch(0, 0, $object->id);
if ($result > 0) { if ($result > 0) {
print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'<br>'; print ' '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'<br>';
} }
} }
print '</td></tr>'; print '</td></tr>';
@@ -2902,10 +2904,12 @@ if ($action == 'create')
{ {
// Total already paid // Total already paid
print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
if ($object->type != FactureFournisseur::TYPE_DEPOSIT) if ($object->type != FactureFournisseur::TYPE_DEPOSIT)
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
else print $langs->trans('AlreadyPaid'); else print $langs->trans('AlreadyPaid');
print ' :</td><td class="right"'.(($totalpaye > 0) ? ' class="amountalreadypaid"' : '').'>'.price($totalpaye).'</td><td>&nbsp;</td></tr>'; print '</span>';
print '</td><td class="right"'.(($totalpaye > 0) ? ' class="amountalreadypaid"' : '').'>'.price($totalpaye).'</td><td>&nbsp;</td></tr>';
//$resteapayer = $object->total_ttc - $totalpaye; //$resteapayer = $object->total_ttc - $totalpaye;
$resteapayeraffiche = $resteapayer; $resteapayeraffiche = $resteapayer;
@@ -2953,7 +2957,9 @@ if ($action == 'create')
// Paye partiellement 'escompte' // Paye partiellement 'escompte'
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
print '<tr><td colspan="'.$nbcols.'" class="right nowrap">'; print '<tr><td colspan="'.$nbcols.'" class="right nowrap">';
print $form->textwithpicto($langs->trans("Discount").':', $langs->trans("HelpEscompte"), - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("Discount"), $langs->trans("HelpEscompte"), - 1);
print '</span>';
print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
@@ -2961,7 +2967,9 @@ if ($action == 'create')
// Paye partiellement ou Abandon 'badsupplier' // Paye partiellement ou Abandon 'badsupplier'
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'badsupplier') { if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'badsupplier') {
print '<tr><td colspan="'.$nbcols.'" class="right nowrap">'; print '<tr><td colspan="'.$nbcols.'" class="right nowrap">';
print $form->textwithpicto($langs->trans("Abandoned").':', $langs->trans("HelpAbandonBadCustomer"), - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("Abandoned"), $langs->trans("HelpAbandonBadCustomer"), - 1);
print '</span>';
print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
// $resteapayeraffiche=0; // $resteapayeraffiche=0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
@@ -2969,7 +2977,9 @@ if ($action == 'create')
// Paye partiellement ou Abandon 'product_returned' // Paye partiellement ou Abandon 'product_returned'
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'product_returned') { if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
print '<tr><td colspan="'.$nbcols.'" class="right nowrap">'; print '<tr><td colspan="'.$nbcols.'" class="right nowrap">';
print $form->textwithpicto($langs->trans("ProductReturned").':', $langs->trans("HelpAbandonProductReturned"), - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("ProductReturned"), $langs->trans("HelpAbandonProductReturned"), - 1);
print '</span>';
print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
@@ -2980,21 +2990,29 @@ if ($action == 'create')
$text = $langs->trans("HelpAbandonOther"); $text = $langs->trans("HelpAbandonOther");
if ($object->close_note) if ($object->close_note)
$text .= '<br><br><b>'.$langs->trans("Reason").'</b>:'.$object->close_note; $text .= '<br><br><b>'.$langs->trans("Reason").'</b>:'.$object->close_note;
print $form->textwithpicto($langs->trans("Abandoned").':', $text, - 1); print '<span class="opacitymedium">';
print $form->textwithpicto($langs->trans("Abandoned"), $text, - 1);
print '</span>';
print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td class="right">'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = 0; $resteapayeraffiche = 0;
$cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcomplete = 'amountpaymentneutral';
} }
// Billed // Billed
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($object->total_ttc).'</td><td>&nbsp;</td></tr>'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
print $langs->trans("Billed");
print '</span>';
print '</td><td class="right">'.price($object->total_ttc).'</td><td>&nbsp;</td></tr>';
// Remainder to pay // Remainder to pay
print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
if ($resteapayeraffiche >= 0) if ($resteapayeraffiche >= 0)
print $langs->trans('RemainderToPay'); print $langs->trans('RemainderToPay');
else print $langs->trans('ExcessPaid'); else print $langs->trans('ExcessPaid');
print ' :</td>'; print '</span>';
print '</td>';
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td>'; print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td>';
print '<td class="nowrap">&nbsp;</td></tr>'; print '<td class="nowrap">&nbsp;</td></tr>';
} else // Credit note } else // Credit note
@@ -3011,10 +3029,12 @@ if ($action == 'create')
// Remainder to pay back // Remainder to pay back
print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<tr><td colspan="'.$nbcols.'" class="right">';
print '<span class="opacitymedium">';
if ($resteapayeraffiche <= 0) if ($resteapayeraffiche <= 0)
print $langs->trans('RemainderToPayBack'); print $langs->trans('RemainderToPayBack');
else print $langs->trans('ExcessPaid'); else print $langs->trans('ExcessPaid');
print ' :</td>'; print '</td>';
print '</span>';
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($sign * $resteapayeraffiche).'</td>'; print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($sign * $resteapayeraffiche).'</td>';
print '<td class="nowrap">&nbsp;</td></tr>'; print '<td class="nowrap">&nbsp;</td></tr>';

View File

@@ -85,6 +85,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C
NbOfEntries=No. of entries NbOfEntries=No. of entries
GoToWikiHelpPage=Read online help (Internet access needed) GoToWikiHelpPage=Read online help (Internet access needed)
GoToHelpPage=Read help GoToHelpPage=Read help
DedicatedPageAvailable=This is a dedicated help page related to your current screen
HomePage=Home Page
RecordSaved=Record saved RecordSaved=Record saved
RecordDeleted=Record deleted RecordDeleted=Record deleted
RecordGenerated=Record generated RecordGenerated=Record generated

View File

@@ -30,7 +30,6 @@ EditInLine=Edit inline
AddWebsite=Add website AddWebsite=Add website
Webpage=Web page/container Webpage=Web page/container
AddPage=Add page/container AddPage=Add page/container
HomePage=Home Page
PageContainer=Page PageContainer=Page
PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first '<strong>Import a full website template</strong>' or just '<strong>Add a page/container</strong>'. PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first '<strong>Import a full website template</strong>' or just '<strong>Add a page/container</strong>'.
RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this. RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this.

View File

@@ -1699,8 +1699,12 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
if ($helpbaseurl && $helppage) if ($helpbaseurl && $helppage)
{ {
$text = ''; $text = '';
$title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage'); $title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').'...';
if ($mode == 'wiki') $title .= ' - '.$langs->trans("PageWiki").' &quot;'.dol_escape_htmltag(strtr($helppage, '_', ' ')).'&quot;'.""; if ($mode == 'wiki') {
$title .= '<br>'.$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"');
if ($helppresent) $title.= ' <span class="opacitymedium">('.$langs->trans("DedicatedPageAvailable").')</span>';
else $title.= ' <span class="opacitymedium">('.$langs->trans("HomePage").')</span>';
}
$text .= '<a class="help" target="_blank" rel="noopener" href="'; $text .= '<a class="help" target="_blank" rel="noopener" href="';
if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage)));
else $text .= sprintf($helpbaseurl, $helppage); else $text .= sprintf($helpbaseurl, $helppage);

View File

@@ -59,6 +59,13 @@ a.badge:focus, a.badge:hover {
color: #fff; color: #fff;
} }
span.badgeneutral {
padding: 2px 7px 2px 7px;
background-color: #e4e4e4;
color: #666;
border-radius: 10px;
}
/* PRIMARY */ /* PRIMARY */
.badge-primary{ .badge-primary{

View File

@@ -367,6 +367,10 @@ input.pageplusone {
padding-top: 4px; padding-top: 4px;
} }
.saturatemedium {
filter: saturate(0.8);
}
.optionblue { .optionblue {
color: var(--colortextlink); color: var(--colortextlink);
} }
@@ -1032,27 +1036,34 @@ select.flat.selectlimit {
.tablelistofcalendars { .tablelistofcalendars {
margin-top: 25px !important; margin-top: 25px !important;
} }
/* Styles for amount on card */
table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaintopay {
padding-top: 0px;
padding-bottom: 0px;
}
.amountalreadypaid { .amountalreadypaid {
} }
.amountpaymentcomplete { .amountpaymentcomplete {
color: var(--amountpaymentcomplete); color: var(--amountpaymentcomplete);
font-weight: bold; font-weight: bold;
font-size: 1.2em; font-size: 1.7em;
} }
.amountremaintopay { .amountremaintopay {
color: var(--amountremaintopaycolor); color: var(--amountremaintopaycolor);
font-weight: bold; font-weight: bold;
font-size: 1.2em; font-size: 1.7em;
} }
.amountremaintopayback { .amountremaintopayback {
color: var(--amountremaintopaybackcolor); color: var(--amountremaintopaybackcolor);
font-weight: bold; font-weight: bold;
font-size: 1.2em; font-size: 1.7em;
} }
.amountpaymentneutral { .amountpaymentneutral {
font-weight: bold; font-weight: bold;
font-size: 1.2em; font-size: 1.7em;
} }
.onlinepaymentbody .amountpaymentcomplete { .onlinepaymentbody .amountpaymentcomplete {
background-color: var(--amountpaymentcomplete); background-color: var(--amountpaymentcomplete);
color: #fff; color: #fff;
@@ -5329,6 +5340,10 @@ div.dataTables_length select {
/* Select2 */ /* Select2 */
/* ============================================================================== */ /* ============================================================================== */
span.select2-selection--single.flat[aria-disabled="true"] span.select2-selection__rendered {
opacity: 0.5;
}
span#select2-taskid-container[title^='--'] { span#select2-taskid-container[title^='--'] {
opacity: 0.3; opacity: 0.3;
} }

View File

@@ -499,6 +499,10 @@ input.pageplusone {
padding-top: 4px; padding-top: 4px;
} }
.saturatemedium {
filter: saturate(0.8);
}
.optionblue { .optionblue {
color: rgb(<?php echo $colortextlink; ?>); color: rgb(<?php echo $colortextlink; ?>);
} }