Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/product/stock/tpl/stockcorrection.tpl.php
This commit is contained in:
commit
9d79e984dd
@ -830,12 +830,15 @@ if ($resql)
|
||||
{
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
/*
|
||||
print $langs->trans('From').' ';
|
||||
print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
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 '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert");
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
@ -1442,7 +1445,7 @@ if ($resql)
|
||||
{
|
||||
$userstatic->id = $obj->fk_user_author;
|
||||
$userstatic->login = $obj->login;
|
||||
print '<td align="center">';
|
||||
print '<td class="center tdoverflowmax100">';
|
||||
if ($userstatic->id) print $userstatic->getLoginUrl(1);
|
||||
else print ' ';
|
||||
print "</td>\n";
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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'));
|
||||
|
||||
|
||||
@ -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 .= ' <span title="'.dol_htmlentities($textLateTitle).'" class="classfortooltip badge badge-warning">';
|
||||
$textLate .= '<span title="'.dol_htmlentities($textLateTitle).'" class="classfortooltip badge badge-warning">';
|
||||
$textLate .= '<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
|
||||
$textLate .= '</span>';
|
||||
}
|
||||
|
||||
$openedDashBoard .= '<div class="info-box-line">';
|
||||
|
||||
$nbtodClass = '';
|
||||
if ($board->nbtodo > 0) {
|
||||
$nbtodClass = 'badge badge-info';
|
||||
}
|
||||
|
||||
$openedDashBoard .= ' <a href="'.$board->url.'" class="info-box-text">'.$infoName.' : <span class="'.$nbtodClass.' classfortooltip" title="'.$board->label.'" >'.$board->nbtodo.'</span>'.$textLate.'</a>'."\n";
|
||||
$openedDashBoard .= ' <a href="'.$board->url.'" class="info-box-text info-box-text-a">'.$infoName.' : <span class="'.$nbtodClass.' classfortooltip" title="'.$board->label.'" >'.$board->nbtodo.'</span>';
|
||||
if ($textLate) {
|
||||
if ($board->url_late) {
|
||||
$openedDashBoard .= '</a>';
|
||||
$openedDashBoard .= ' <a href="'.$board->url_late.'" class="info-box-text info-box-text-a paddingleft">';
|
||||
} else {
|
||||
$openedDashBoard .= ' ';
|
||||
}
|
||||
$openedDashBoard .= $textLate;
|
||||
}
|
||||
$openedDashBoard .= '</a>'."\n";
|
||||
|
||||
if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
|
||||
$openedDashBoard .= '<a href="'.$board->url.'" class="info-box-text">'.$langs->trans('Total').' : '.price($board->total).'</a>';
|
||||
}
|
||||
|
||||
$openedDashBoard .= '</div>';
|
||||
}
|
||||
|
||||
$openedDashBoard .= ' </div><!-- /.info-box-content -->'."\n";
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -749,11 +749,7 @@ if ($id > 0 || $ref)
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
// Actions buttons
|
||||
|
||||
$parameters = array();
|
||||
|
||||
|
||||
@ -66,69 +66,69 @@ if (empty($conf) || !is_object($conf)) {
|
||||
|
||||
// Warehouse or product
|
||||
print '<tr>';
|
||||
if ($object->element == 'product')
|
||||
{
|
||||
print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td>';
|
||||
$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 ' <select name="mouvement" id="mouvement">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stock')
|
||||
{
|
||||
print '<td class="fieldrequired">'.$langs->trans("Product").'</td>';
|
||||
print '<td>';
|
||||
$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 ' <select name="mouvement" id="mouvement">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'product')
|
||||
{
|
||||
print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td>';
|
||||
$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 ' <select class="button buttongen" name="mouvement" id="mouvement">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stock')
|
||||
{
|
||||
print '<td class="fieldrequired">'.$langs->trans("Product").'</td>';
|
||||
print '<td>';
|
||||
$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 ' <select class="button buttongen" name="mouvement" id="mouvement">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td>';
|
||||
print '<td><input name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Purchase price
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("UnitPurchaseValue").'</td>';
|
||||
print '<td colspan="'.(!empty($conf->projet->enabled) ? '1' : '3').'"><input name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>';
|
||||
if (!empty($conf->projet->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans('Project').'</td>';
|
||||
print '<td>';
|
||||
$formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td><input name="nbpiece" id="nbpiece" class="maxwidth75" value="'.GETPOST("nbpiece").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Serial / Eat-by date
|
||||
if (!empty($conf->productbatch->enabled) &&
|
||||
(($object->element == 'product' && $object->hasbatch())
|
||||
|| ($object->element == 'stock'))
|
||||
)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td'.($object->element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
|
||||
print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("EatByDate").'</td><td>';
|
||||
$eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
|
||||
print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("SellByDate").'</td><td>';
|
||||
$sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
|
||||
print $form->selectDate($sellbyselected, 'sellby', '', '', 1, "");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if (!empty($conf->productbatch->enabled) &&
|
||||
(($object->element == 'product' && $object->hasbatch())
|
||||
|| ($object->element == 'stock'))
|
||||
)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td'.($object->element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
|
||||
print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("EatByDate").'</td><td>';
|
||||
$eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
|
||||
print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("SellByDate").'</td><td>';
|
||||
$sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
|
||||
print $form->selectDate($sellbyselected, 'sellby', '', '', 1, "");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Purchase price and project
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("UnitPurchaseValue").'</td>';
|
||||
print '<td colspan="'.(!empty($conf->projet->enabled) ? '1' : '3').'"><input name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>';
|
||||
if (!empty($conf->projet->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans('Project').'</td>';
|
||||
print '<td>';
|
||||
$formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300');
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Label of mouvement of id of inventory
|
||||
$valformovementlabel = ((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref));
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user