diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index ec6ab640125..ad2cd408471 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -241,8 +241,8 @@ print ''; clearstatcache(); print '
'; -print ''; -print ''; +print '
'.$langs->trans("Language").'
'; +print ''; print ''; // Default language diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index f4d50cb6f8d..76cae0443b3 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -363,7 +363,7 @@ if ($mode == 'overwrite') if ($mode == 'searchkey') { - $langcode = GETPOST('langcode') ?GETPOST('langcode') : $langs->defaultlang; + $langcode = GETPOSTISSET('langcode') ? GETPOST('langcode') : $langs->defaultlang; $newlang = new Translate('', $conf); $newlang->setDefaultLang($langcode); @@ -384,8 +384,7 @@ if ($mode == 'searchkey') if (empty($langcode) || $langcode == '-1') $nbempty++; if (empty($transkey)) $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'); } else { // Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 1c2b195690a..de5b64c28fe 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -358,26 +358,23 @@ if (empty($reshook)) if ($object->retained_warranty_date_limit < $object->date) $object->retained_warranty_date_limit = $object->date; $result = $object->update($user); 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); $result = $object->setRetainedWarranty(GETPOST('retained_warranty', 'float')); if ($result < 0) dol_print_error($db, $object->error); - } elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) - { + } elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->setRetainedWarrantyDateLimit(GETPOST('retained_warranty_date_limit', 'float')); if ($result < 0) dol_print_error($db, $object->error); - } // Multicurrency Code + } // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); - } elseif ($action == 'setinvoicedate' && $usercancreate) - { + } elseif ($action == 'setinvoicedate' && $usercancreate) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; $date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); @@ -395,8 +392,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } elseif ($action == 'setdate_pointoftax' && $usercancreate) - { + } elseif ($action == 'setdate_pointoftax' && $usercancreate) { $object->fetch($id); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); $object->date_pointoftax = $date_pointoftax; @@ -3649,8 +3645,7 @@ if ($action == 'create') } print ''; -} elseif ($id > 0 || !empty($ref)) -{ +} elseif ($id > 0 || !empty($ref)) { /* * 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); } if ($action == 'paid' && $resteapayer > 0) { + $close = array(); // Code $i = 0; $close[$i]['code'] = 'discount_vat'; // escompte @@ -3922,7 +3918,7 @@ if ($action == 'create') $i++; // arrayreasons[code]=reason foreach ($close as $key => $val) { - $arrayreasons[$close [$key]['code']] = $close[$key]['reason']; + $arrayreasons[$close[$key]['code']] = $close[$key]['reason']; } // Cree un tableau formulaire @@ -4073,24 +4069,26 @@ if ($action == 'create') // Type print ''; // Date invoice @@ -4155,7 +4151,7 @@ if ($action == 'create') if ($action == 'editinvoicedate') { $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); } else { - print dol_print_date($object->date, 'day'); + print ''.dol_print_date($object->date, 'day').''; } print ''; @@ -4174,7 +4170,7 @@ if ($action == 'create') if ($action == 'editdate_pointoftax') { $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date_pointoftax, 'date_pointoftax'); } else { - print dol_print_date($object->date_pointoftax, 'day'); + print ''.dol_print_date($object->date_pointoftax, 'day').''; } print ''; } @@ -4214,7 +4210,7 @@ if ($action == 'create') if ($action == 'editpaymentterm') { $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date_lim_reglement, 'paymentterm'); } else { - print dol_print_date($object->date_lim_reglement, 'day'); + print ''.dol_print_date($object->date_lim_reglement, 'day').''; if ($object->hasDelay()) { print img_warning($langs->trans('Late')); } @@ -4789,10 +4785,13 @@ if ($action == 'create') if ($object->type != Facture::TYPE_CREDIT_NOTE) { // Total already paid print ''; + } else { + print $langs->trans('AlreadyPaid'); + } + print ''; $resteapayeraffiche = $resteapayer; $cssforamountpaymentcomplete = 'amountpaymentcomplete'; @@ -4813,12 +4812,14 @@ if ($action == 'create') $obj = $db->fetch_object($resql); $invoice->fetch($obj->fk_facture_source); print ''; + print ''; + print ''; print ''; print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -4844,7 +4847,9 @@ if ($action == 'create') // Paye partiellement ou Abandon 'badcustomer' if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') { print ''; // $resteapayeraffiche=0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -4852,7 +4857,9 @@ if ($action == 'create') // Paye partiellement ou Abandon 'product_returned' if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') { print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -4863,20 +4870,27 @@ if ($action == 'create') $text = $langs->trans("HelpAbandonOther"); if ($object->close_note) $text .= '

'.$langs->trans("Reason").':'.$object->close_note; - print $form->textwithpicto($langs->trans("Abandoned").':', $text, - 1); + print ''; + print $form->textwithpicto($langs->trans("Abandoned"), $text, - 1); + print ''; print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; } // Billed - print ''; + print ''; // Remainder to pay print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 29203a48f26..0f138833ae6 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -74,7 +74,7 @@ class Facture extends CommonInvoice 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'; @@ -1424,11 +1424,11 @@ class Facture extends CommonInvoice $label = ''; if ($user->rights->facture->lire) { - $label = img_picto('', $this->picto).' '.$langs->trans("Invoice").''; - if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("ReplacementInvoice").''; - if ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; - if ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; - if ($this->type == self::TYPE_SITUATION) $label = ''.$langs->transnoentitiesnoconv("InvoiceSituation").''; + $label = img_picto('', $picto).' '.$langs->trans("Invoice").''; + if ($this->type == self::TYPE_REPLACEMENT) $label = img_picto('', $picto).' '.$langs->transnoentitiesnoconv("ReplacementInvoice").''; + if ($this->type == self::TYPE_CREDIT_NOTE) $label = img_picto('', $picto).' '.$langs->transnoentitiesnoconv("CreditNote").''; + if ($this->type == self::TYPE_DEPOSIT) $label = img_picto('', $picto).' '.$langs->transnoentitiesnoconv("Deposit").''; + if ($this->type == self::TYPE_SITUATION) $label = img_picto('', $picto).' '.$langs->transnoentitiesnoconv("InvoiceSituation").''; if (isset($this->statut) && isset($this->alreadypaid)) { $label .= ' '.$this->getLibStatut(5, $this->alreadypaid); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d56ba9bdf62..42f09756fad 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -266,8 +266,8 @@ class Form 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('/^restricthtml/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value); - elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret .= dol_print_date($value, 'day'); - elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret .= dol_print_date($value, 'dayhour'); + elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret .= ''.dol_print_date($value, 'day').''; + elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret .= ''.dol_print_date($value, 'dayhour').''; elseif (preg_match('/^select;/', $typeofdata)) { $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); @@ -636,11 +636,11 @@ class Form * 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 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 string $name Name for massaction - * @param string $cssclass CSS class used to check for select - * @return string|void Select list + * @param string $name Name for massaction + * @param string $cssclass CSS class used to check for select + * @return string|void Select list */ public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect') { @@ -780,8 +780,6 @@ class Form $i = 0; if ($num) { - $foundselected = false; - while ($i < $num) { $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'])) { - $foundselected = true; $out .= ''; if ($showempty == 2) $out .= ''; - $num = $this->db->num_rows($resql); $i = 0; if ($num) { @@ -1561,8 +1557,9 @@ class Form $i++; } } else { - $out .= ''; } diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 34749325822..b0b979dcf46 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -98,7 +98,7 @@ class FormAdmin if ($showcode == 1) $valuetoshow = $key.' - '.$value; if ($showcode == 2) { if ($mainlangonly) $valuetoshow = $value.' ('.preg_replace('/[_-].*$/', '', $key).')'; - else $valuetoshow = $value.' ('.$key.')'; + else $valuetoshow = $value.' ('.$key.')'; } $keytouse = $key; @@ -111,11 +111,11 @@ class FormAdmin continue; } - if ($selected == $keytouse) - { - $out .= ''; + $valuetoshow .= ' '.picto_from_langcode($key, 'class="saturatemedium"'); + if ($selected == $keytouse) { + $out .= ''; } else { - $out .= ''; + $out .= ''; } } $out .= ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 51cf1f2487c..f7e1081acf3 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3186,7 +3186,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); if (empty($srconly) && in_array($pictowithouttext, array( '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', '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', diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 98be97ac5bb..05f29acb109 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -140,7 +140,8 @@ if ($permission)
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 = ''; 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['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['link']['label'], $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder, 'center maxwidthsearch '); +print_liste_field_titre('', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder, 'center maxwidthsearch '); print ""; foreach ($list as $entry) diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php index e3e921c20c5..1e26f2a5d4c 100644 --- a/htdocs/core/tpl/object_discounts.tpl.php +++ b/htdocs/core/tpl/object_discounts.tpl.php @@ -44,7 +44,7 @@ if ($fixedDiscount > 0) print $langs->trans($translationKey, $fixedDiscount).'.'; } else { $translationKey = (!empty($discount_type)) ? 'HasNoRelativeDiscountFromSupplier' : 'CompanyHasNoRelativeDiscount'; - print $langs->trans($translationKey).'.'; + print ''.$langs->trans($translationKey).'.'; } if ($isNewObject) print ' ('.$addrelativediscount.')'; @@ -95,7 +95,7 @@ if ($absolute_creditnote > 0) { if ($absolute_discount <= 0 && $absolute_creditnote <= 0) { $translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount'; - print '
'.$langs->trans($translationKey).'.'; + print '
'.$langs->trans($translationKey).'.'; if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) { print ' ('.$addabsolutediscount.')'; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 76a43475616..e2b939dd14a 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2480,7 +2480,9 @@ if ($action == 'create') // Type print '
'; @@ -2902,10 +2904,12 @@ if ($action == 'create') { // Total already paid print ''; + print ''; + print ''; //$resteapayer = $object->total_ttc - $totalpaye; $resteapayeraffiche = $resteapayer; @@ -2953,7 +2957,9 @@ if ($action == 'create') // Paye partiellement 'escompte' if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -2961,7 +2967,9 @@ if ($action == 'create') // Paye partiellement ou Abandon 'badsupplier' if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'badsupplier') { print ''; // $resteapayeraffiche=0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -2969,7 +2977,9 @@ if ($action == 'create') // Paye partiellement ou Abandon 'product_returned' if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'product_returned') { print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -2980,21 +2990,29 @@ if ($action == 'create') $text = $langs->trans("HelpAbandonOther"); if ($object->close_note) $text .= '

'.$langs->trans("Reason").':'.$object->close_note; - print $form->textwithpicto($langs->trans("Abandoned").':', $text, - 1); + print ''; + print $form->textwithpicto($langs->trans("Abandoned"), $text, - 1); + print ''; print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; } // Billed - print ''; + print ''; // Remainder to pay print ''; + print ''; + print ''; print ''; print ''; } else // Credit note @@ -3011,10 +3029,12 @@ if ($action == 'create') // Remainder to pay back print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 11278499121..c32e4d01ddd 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -85,6 +85,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Read help +DedicatedPageAvailable=This is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Record saved RecordDeleted=Record deleted RecordGenerated=Record generated diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 1d62d1c07f8..27a5d607fb8 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Page PreviewOfSiteNotYetAvailable=Preview of your website %s not yet available. You must first 'Import a full website template' or just 'Add a page/container'. 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. diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7f31bad876d..782685daeba 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1699,8 +1699,12 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if ($helpbaseurl && $helppage) { $text = ''; - $title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage'); - if ($mode == 'wiki') $title .= ' - '.$langs->trans("PageWiki").' "'.dol_escape_htmltag(strtr($helppage, '_', ' ')).'"'.""; + $title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').'...'; + if ($mode == 'wiki') { + $title .= '
'.$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"'); + if ($helppresent) $title.= ' ('.$langs->trans("DedicatedPageAvailable").')'; + else $title.= ' ('.$langs->trans("HomePage").')'; + } $text .= '); }
'.img_picto('', 'language').' '.$langs->trans("Language").'
'.$langs->trans('Type').''; + print ''; print $object->getLibType(); + print ''; if ($object->module_source) { - print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')'; + print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')'; } if ($object->type == Facture::TYPE_REPLACEMENT) { $facreplaced = new Facture($db); $facreplaced->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; + print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; } if ($object->type == Facture::TYPE_CREDIT_NOTE && !empty($object->fk_facture_source)) { $facusing = new Facture($db); $facusing->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; + print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; } $facidavoir = $object->getListIdAvoirFromInvoice(); if (count($facidavoir) > 0) { - print ' ('.$langs->transnoentities("InvoiceHasAvoir"); + print ' ('.$langs->transnoentities("InvoiceHasAvoir"); $i = 0; foreach ($facidavoir as $id) { if ($i == 0) @@ -4105,14 +4103,14 @@ if ($action == 'create') if ($objectidnext > 0) { $facthatreplace = new Facture($db); $facthatreplace->fetch($objectidnext); - print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; + print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; } if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, $object->id); if ($result > 0) { - print '. '; + print ' '; print $langs->transnoentities("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')); print '
'; } @@ -4123,7 +4121,7 @@ if ($action == 'create') $tmptemplate = new FactureRec($db); $result = $tmptemplate->fetch($object->fk_fac_rec_source); if ($result > 0) { - print '. '; + print ' '; print $langs->transnoentities("GeneratedFromTemplate", ''.dol_escape_htmltag($tmptemplate->ref).''); print ''; } @@ -4133,13 +4131,11 @@ if ($action == 'create') // Relative and absolute discounts print ''."\n"; print '
'.$langs->trans('Discounts'); - print ''; $thirdparty = $soc; $discount_type = 0; $backtopage = urlencode($_SERVER["PHP_SELF"].'?facid='.$object->id); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; - print '
'; - if ($object->type != Facture::TYPE_DEPOSIT) + print ''; + if ($object->type != Facture::TYPE_DEPOSIT) { print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else print $langs->trans('AlreadyPaid'); - print ' :'.price($totalpaye).' 
'.price($totalpaye).' 
'; + print ''; if ($invoice->type == Facture::TYPE_CREDIT_NOTE) print $langs->trans("CreditNote").' '; if ($invoice->type == Facture::TYPE_DEPOSIT) print $langs->trans("Deposit").' '; print $invoice->getNomUrl(0); - print ' :'.price($obj->amount_ttc).''; print 'rowid.'">'.img_delete().''; @@ -4836,7 +4837,9 @@ if ($action == 'create') // Paye partiellement 'escompte' if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { print '
'; - print $form->textwithpicto($langs->trans("Discount").':', $langs->trans("HelpEscompte"), - 1); + print ''; + print $form->textwithpicto($langs->trans("Discount"), $langs->trans("HelpEscompte"), - 1); + print ''; print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).' 
'; - print $form->textwithpicto($langs->trans("Abandoned").':', $langs->trans("HelpAbandonBadCustomer"), - 1); + print ''; + print $form->textwithpicto($langs->trans("Abandoned"), $langs->trans("HelpAbandonBadCustomer"), - 1); + print ''; print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).' 
'; - print $form->textwithpicto($langs->trans("ProductReturned").':', $langs->trans("HelpAbandonProductReturned"), - 1); + print ''; + print $form->textwithpicto($langs->trans("ProductReturned"), $langs->trans("HelpAbandonProductReturned"), - 1); + print ''; print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).' 
'.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')).' 
'.$langs->trans("Billed").' :'.price($object->total_ttc).' 
'; + print ''; + print $langs->trans("Billed"); + print ''.price($object->total_ttc).' 
'; + print ''; print $langs->trans('RemainderToPay'); if ($resteapayeraffiche < 0) print ' ('.$langs->trans('ExcessReceived').')'; - print ' :'.price($resteapayeraffiche).' 
'.$langs->trans('Type').''; + print ''; print $object->getLibType(); + print ''; if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) { $facreplaced = new FactureFournisseur($db); @@ -2519,7 +2521,7 @@ if ($action == 'create') $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, 0, $object->id); if ($result > 0) { - print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'
'; + print ' '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'
'; } } print '
'; + print ''; if ($object->type != FactureFournisseur::TYPE_DEPOSIT) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); else print $langs->trans('AlreadyPaid'); - print ' : 0) ? ' class="amountalreadypaid"' : '').'>'.price($totalpaye).' 
0) ? ' class="amountalreadypaid"' : '').'>'.price($totalpaye).' 
'; - print $form->textwithpicto($langs->trans("Discount").':', $langs->trans("HelpEscompte"), - 1); + print ''; + print $form->textwithpicto($langs->trans("Discount"), $langs->trans("HelpEscompte"), - 1); + print ''; print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; - print $form->textwithpicto($langs->trans("Abandoned").':', $langs->trans("HelpAbandonBadCustomer"), - 1); + print ''; + print $form->textwithpicto($langs->trans("Abandoned"), $langs->trans("HelpAbandonBadCustomer"), - 1); + print ''; print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; - print $form->textwithpicto($langs->trans("ProductReturned").':', $langs->trans("HelpAbandonProductReturned"), - 1); + print ''; + print $form->textwithpicto($langs->trans("ProductReturned"), $langs->trans("HelpAbandonProductReturned"), - 1); + print ''; print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'.$langs->trans("Billed").' :'.price($object->total_ttc).' 
'; + print ''; + print $langs->trans("Billed"); + print ''; + print ''.price($object->total_ttc).' 
'; + print ''; if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); else print $langs->trans('ExcessPaid'); - print ' :'.price($resteapayeraffiche).' 
'; + print ''; if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); else print $langs->trans('ExcessPaid'); - print ' :'.price($sign * $resteapayeraffiche).'