diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7d5679b2cff..aef7aa1869c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -830,12 +830,15 @@ if ($resql) { print ''; print '
'; + /* print $langs->trans('From').' '; print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1); print '
'; print '
'; - print $langs->trans('to').' '; + print $langs->trans('to').' ';*/ + print $langs->trans("Before").' '; print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1); + print '
'.$langs->trans("Alert"); print '
'; print ''; } @@ -1442,7 +1445,7 @@ if ($resql) { $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; - print ''; + print ''; if ($userstatic->id) print $userstatic->getLoginUrl(1); else print ' '; print "\n"; diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 04c60bbc8e4..122013674bf 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -24,20 +24,20 @@ /** - * Function to return number in text. + * Function to return a number into a text. * May use module NUMBERWORDS if found. * - * @param float $num Number to convert + * @param float $num Number to convert (must be a numeric value, like reported by price2num()) * @param Translate $langs Language * @param boolean $currency 0=number to translate | 1=currency to translate - * @param boolean $centimes 0=no centimes | 1=centimes to translate + * @param boolean $centimes 0=no cents/centimes | 1=there is cents/centimes to translate * @return string|false Text of the number */ function dol_convertToWord($num, $langs, $currency = false, $centimes = false) { global $conf; - $num = str_replace(array(',', ' '), '', trim($num)); + //$num = str_replace(array(',', ' '), '', trim($num)); This should be useless since $num MUST be a php numeric value if (!$num) { return false; } @@ -56,6 +56,7 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false) $concatWords = $langs->getLabelFromNumber($num, $type); return $concatWords; } else { + $TNum = explode('.', $num); $num = (int) $TNum[0]; $words = array(); @@ -140,7 +141,11 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false) // If we need to write cents call again this function for cents if (!empty($TNum[1])) { if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and'); - $concatWords .= ' '.dol_convertToWord($TNum[1], $langs, $currency, true); + + $decimalpart = $TNum[1]; + $decimalpart = preg_replace('/0+$/', '', $decimalpart); + + $concatWords .= ' '.dol_convertToWord($decimalpart, $langs, '', true); if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes'); } return $concatWords; diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index a4f9bc93823..2140d13400f 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -552,7 +552,6 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->MultiCell(35, 4, str_pad(price($object->amount).' '.$currency, 18, '*', STR_PAD_LEFT), 0, 'R', 1); $posy += 10; - // City $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy); $pdf->MultiCell(150, 4, $mysoc->town, 0, 'L', 1); @@ -592,9 +591,9 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - $titre = strtoupper($mysoc->town).', le '.date("d").' '.$outputlangs->transnoentitiesnoconv(date("F")).' '.date("Y"); + /*$titre = strtoupper($mysoc->town).' - '.dol_print_date(dol_now(), 'day', 'tzserver', $outputlangs); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3) - 60, $tab_top - 6); - $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); + $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);*/ $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top); @@ -754,7 +753,9 @@ class pdf_standard extends ModelePDFSuppliersPayments $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $mysoc, ((!empty($object->contact)) ? $object->contact : null), $usecontact, 'target', $object); + $usecontact = 0; + + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ((!empty($object->contact)) ? $object->contact : null), $usecontact, 'target', $object); // Show recipient $widthrecbox = 90; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 8801d400afc..28020e40811 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -27,10 +27,10 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; -require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; $langs->loadLangs(array('bills', 'banks', 'companies', 'suppliers')); diff --git a/htdocs/index.php b/htdocs/index.php index efa4de3890d..4668da1a6db 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -356,7 +356,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $dashboardlines[$board->element] = $board->load_board($user); } - // Number of commercial proposals opened (expired) + // Number of commercial proposals open (expired) if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $board = new Propal($db); @@ -365,7 +365,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); } - // Number of commercial proposals opened (expired) + // Number of commercial proposals open (expired) if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; $board = new SupplierProposal($db); @@ -407,14 +407,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { //$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active"); } - // Number of invoices customers (has paid) + // Number of invoices customers (paid) if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $board = new Facture($db); $dashboardlines[$board->element] = $board->load_board($user); } - // Number of supplier invoices (has paid) + // Number of supplier invoices (paid) if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $board = new FactureFournisseur($db); @@ -715,21 +715,35 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $textLate = ''; if ($board->nbtodolate > 0) { - $textLate .= ' '; + $textLate .= ''; $textLate .= ' '.$board->nbtodolate; $textLate .= ''; } + $openedDashBoard .= '
'; + $nbtodClass = ''; if ($board->nbtodo > 0) { $nbtodClass = 'badge badge-info'; } - $openedDashBoard .= ' '.$infoName.' : '.$board->nbtodo.''.$textLate.''."\n"; + $openedDashBoard .= ' '.$infoName.' : '.$board->nbtodo.''; + if ($textLate) { + if ($board->url_late) { + $openedDashBoard .= ''; + $openedDashBoard .= ' '; + } else { + $openedDashBoard .= ' '; + } + $openedDashBoard .= $textLate; + } + $openedDashBoard .= ''."\n"; if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) { $openedDashBoard .= ''.$langs->trans('Total').' : '.price($board->total).''; } + + $openedDashBoard .= '
'; } $openedDashBoard .= ' '."\n"; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index de8288b23ea..61f936ad827 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -945,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 25d9528581a..af7a95fb95a 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -749,11 +749,7 @@ if ($id > 0 || $ref) } -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ +// Actions buttons $parameters = array(); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index c4627bf75f5..68610aea3d2 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -66,69 +66,69 @@ if (empty($conf) || !is_object($conf)) { // Warehouse or product print ''; -if ($object->element == 'product') -{ - print ''.$langs->trans("Warehouse").''; - print ''; - $ident = (GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ? GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); - if (empty($ident) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $ident = $conf->global->MAIN_DEFAULT_WAREHOUSE; - print $formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); - print '   '; - print ''; -} -if ($object->element == 'stock') -{ - print ''.$langs->trans("Product").''; - print ''; - $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); - print '   '; - print ''; -} + if ($object->element == 'product') + { + print ''.$langs->trans("Warehouse").''; + print ''; + $ident = (GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ? GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); + if (empty($ident) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $ident = $conf->global->MAIN_DEFAULT_WAREHOUSE; + print $formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); + print '   '; + print ''; + } + if ($object->element == 'stock') + { + print ''.$langs->trans("Product").''; + print ''; + $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + print '   '; + print ''; + } print ''.$langs->trans("NumberOfUnit").''; - print ''; - print ''; - - // Purchase price - print ''; - print ''.$langs->trans("UnitPurchaseValue").''; - print ''; -if (!empty($conf->projet->enabled)) -{ - print ''.$langs->trans('Project').''; - print ''; - $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); - print ''; -} + print ''; print ''; // Serial / Eat-by date -if (!empty($conf->productbatch->enabled) && - (($object->element == 'product' && $object->hasbatch()) - || ($object->element == 'stock')) - ) -{ - print ''; - print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; - print ''; - print ''; - print ''; - print ''; - print ''.$langs->trans("EatByDate").''; - $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); - print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); - print ''; - print ''.$langs->trans("SellByDate").''; - $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); - print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); - print ''; - print ''; -} + if (!empty($conf->productbatch->enabled) && + (($object->element == 'product' && $object->hasbatch()) + || ($object->element == 'stock')) + ) + { + print ''; + print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; + print ''; + print ''; + print ''; + print ''; + print ''.$langs->trans("EatByDate").''; + $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); + print ''; + print ''.$langs->trans("SellByDate").''; + $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); + print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); + print ''; + print ''; + } + + // Purchase price and project + print ''; + print ''.$langs->trans("UnitPurchaseValue").''; + print ''; + if (!empty($conf->projet->enabled)) + { + print ''.$langs->trans('Project').''; + print ''; + $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); + print ''; + } + print ''; // Label of mouvement of id of inventory $valformovementlabel = ((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref)); diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index bf8d6220e00..c1f3be0df41 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -101,6 +101,13 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> max-width: 60%; } +a.info-box-text.info-box-text-a { + display: table-cell; +} +a.info-box-text-a i.fa.fa-exclamation-triangle { + font-size: 0.9em; +} + .info-box-icon-text{ box-sizing: border-box; display: block; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index e53f5d1f914..926e59aef51 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -108,6 +108,13 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = background: #bbb; } +a.info-box-text.info-box-text-a { + display: table-cell; +} +a.info-box-text-a i.fa.fa-exclamation-triangle { + font-size: 0.9em; +} + .info-box { display: block; position: relative;