Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-12-18 21:55:53 +01:00
commit 44a6644969
53 changed files with 194 additions and 144 deletions

View File

@ -572,8 +572,10 @@ class AccountancyExport
if (empty($line->subledger_account)) {
print length_accountg($line->numero_compte) . $separator;
print $line->label_compte . $separator;
} else {
print length_accounta($line->subledger_account) . $separator;
print $line->subledger_label . $separator;
}
print $line->doc_ref . $separator;
@ -581,6 +583,7 @@ class AccountancyExport
print price($line->credit) . $separator;
print price($line->montant) . $separator;
print $line->sens . $separator;
print $line->lettering_code . $separator;
print $line->code_journal;
print $end_line;
}

View File

@ -891,7 +891,7 @@ if (empty($action) || $action == 'view') {
// Test that setup is complete
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL';
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL AND clos=0';
$resql = $db->query($sql);
if ($resql)
{

View File

@ -702,13 +702,14 @@ class Adherent extends CommonObject
$lthirdparty->phone=$this->phone;
$lthirdparty->state_id=$this->state_id;
$lthirdparty->country_id=$this->country_id;
$lthirdparty->country_id=$this->country_id;
//$lthirdparty->phone_mobile=$this->phone_mobile;
$result=$lthirdparty->update($this->fk_soc,$user,0,1,1,'update'); // Use sync to 0 to avoid cyclic updates
$result=$lthirdparty->update($this->fk_soc, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates
if ($result < 0)
{
$this->error=$lthirdparty->error;
$this->errors=$lthirdparty->errors;
dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR);
$error++;
}

View File

@ -121,7 +121,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
{
// Creation of thirdparty
$company = new Societe($db);
$result=$company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha'));
$result=$company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha'), GETPOST('customercode', 'alpha'));
if ($result < 0)
{
@ -361,6 +361,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "members"));
// Get email content from template
$arraydefaultmessage=null;
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION;
@ -856,6 +857,15 @@ if ($rowid > 0)
array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'),
array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"')
);
// If customer code was forced to "required", we ask it at creation to avoid error later
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))
{
$tmpcompany = new Societe($db);
$tmpcompany->name=$companyname;
$customercode = $tmpcompany->get_codeclient($tmpcompany,0);
$formquestion[]=array('label' => $langs->trans("CustomerCode"), 'type' => 'text', 'name' => 'customercode', 'value' => $customercode, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"');
}
// @TODO Add other extrafields mandatory for thirdparty creation
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
}

View File

@ -217,11 +217,14 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave','alpha'))
{
// Define if we have to generate thumbs or not
$generatethumbs = 1;
if (GETPOST('section_dir')) $generatethumbs=0;
// When we rename a file from the file manager in ecm, we must not regenerate thumbs (not a problem, we do pass here)
// When we rename a file from the website module, we must not regenerate thumbs (module = medias in such a case)
// but when we rename from a tab "Documents", we must regenerate thumbs
if (GETPOST('modulepart') == 'medias') $generatethumbs=0;
if ($generatethumbs)
{
if ($object->id)
if ($object->id)
{
$object->addThumbs($destpath);
}

View File

@ -42,7 +42,7 @@ class box_produits extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
var $param;
var $info_box_head = array();
@ -135,13 +135,13 @@ class box_produits extends ModeleBoxes
$productstatic->entity = $objp->entity;
$this->info_box_contents[$line][] = array(
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $productstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $objp->label,
);

View File

@ -190,7 +190,7 @@ class box_services_contracts extends ModeleBoxes
}
$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $s,
'asis' => 1
);
@ -200,7 +200,7 @@ class box_services_contracts extends ModeleBoxes
'asis' => 1
);
$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1),
'asis' => 1
);

View File

@ -4954,6 +4954,7 @@ abstract class CommonObject
if ($this->array_options[$key] === '') $mandatorypb=true;
if ($mandatorypb)
{
dol_syslog($this->error);
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
return -1;
}
@ -6292,7 +6293,7 @@ abstract class CommonObject
$e = 0;
foreach($extrafields->attributes[$this->table_element]['label'] as $key=>$label)
{
//Show only the key field in params
// Show only the key field in params
if (is_array($params) && array_key_exists('onlykey',$params) && $key != $params['onlykey']) continue;
$enabled = 1;

View File

@ -29,14 +29,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
session_cache_limiter(false);
session_cache_limiter('public');
require_once '../../main.inc.php';
// Define javascript type
top_httphead('text/javascript; charset=UTF-8');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
//var_dump($conf);

View File

@ -33,14 +33,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
session_cache_limiter(false);
session_cache_limiter('public');
require_once '../../main.inc.php';
// Define javascript type
top_httphead('text/javascript; charset=UTF-8');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
?>

View File

@ -32,14 +32,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
session_cache_limiter(false);
session_cache_limiter('public');
require_once '../../main.inc.php';
// Define javascript type
top_httphead('text/javascript; charset=UTF-8');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');

View File

@ -40,7 +40,7 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H
// TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when.
/* session already started into main
session_cache_limiter(false);
session_cache_limiter('public');
header('Cache-Control: no-cache');
session_set_cookie_params(0, '/', null, false, true); // Add tag httponly on session cookie
session_start();*/

View File

@ -29,14 +29,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
session_cache_limiter(false);
session_cache_limiter('public');
require_once '../../main.inc.php';
// Define javascript type
top_httphead('text/javascript; charset=UTF-8');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
?>

View File

@ -156,6 +156,7 @@ class pdf_ban extends ModeleBankAccountDoc
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -163,6 +163,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -132,6 +132,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -278,6 +278,7 @@ class pdf_einstein extends ModelePDFCommandes
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
if (class_exists('TCPDF'))
{

View File

@ -228,6 +228,7 @@ class pdf_strato extends ModelePDFContract
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -229,6 +229,7 @@ class pdf_merou extends ModelePdfExpedition
$heightforinfotot = 0; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -291,6 +291,7 @@ class pdf_rouget extends ModelePdfExpedition
$heightforinfotot = 8; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -258,8 +258,10 @@ class pdf_standard extends ModeleExpenseReport
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 12; // Height reserved to output the footer (value include bottom margin)
$pdf->SetAutoPageBreak(1,0);
$heightforfooter = $this->marge_basse + 12; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))
{

View File

@ -326,6 +326,7 @@ class pdf_crabe extends ModelePDFFactures
$heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
if (class_exists('TCPDF'))
{

View File

@ -223,6 +223,7 @@ class pdf_soleil extends ModelePDFFicheinter
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -245,6 +245,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$heightforinfotot = 30; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -223,6 +223,7 @@ class pdf_standard extends ModelePDFProduct
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
if (class_exists('TCPDF'))
{

View File

@ -224,6 +224,7 @@ class pdf_baleine extends ModelePDFProjects
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
if (class_exists('TCPDF'))
{

View File

@ -175,6 +175,7 @@ class pdf_beluga extends ModelePDFProjects
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
if (class_exists('TCPDF'))
{

View File

@ -387,6 +387,7 @@ class pdf_azur extends ModelePDFPropales
$heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0;
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);

View File

@ -265,6 +265,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -313,6 +313,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -271,6 +271,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -302,6 +302,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))

View File

@ -1847,6 +1847,7 @@ WithDolTrackingID=Dolibarr Tracking ID found
WithoutDolTrackingID=Dolibarr Tracking ID not found
FormatZip=Zip
MainMenuCode=Menu entry code (mainmenu)
ECMAutoTree=Show automatic ECM tree
##### Resource ####
ResourceSetup=Configuration of Resource module
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).

View File

@ -29,6 +29,8 @@ MovementId=Movement ID
StockMovementForId=Movement ID %d
ListMouvementStockProject=List of stock movements associated to project
StocksArea=Warehouses area
AllWarehouses=All warehouses
IncludeAlsoDraftOrders=Include also draft orders
Location=Location
LocationSummary=Short name location
NumberOfDifferentProducts=Number of different products

View File

@ -38,7 +38,7 @@ ThirdPartyCustomers=Clientes
ThirdPartyCustomersStats=Clientes
ThirdPartyCustomersWithIdProf12=Clientes con %s ó %s
ThirdPartySuppliers=Proveedores
ThirdPartyType=Tipo de empresa
ThirdPartyType=Tipo de tercero
Individual=Particular
ToCreateContactWithSameName=Creará automáticamente un contacto/dirección en el tercero con la misma información que el tercero. En la mayoría de los casos, aunque el tercero sea una persona física, creando solo el tercero será suficiente.
ParentCompany=Sede central

View File

@ -28,10 +28,10 @@ UseDiscountAsService=Como un servicio
UseDiscountOnTotal=Sobre el total
MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Indica si un descuento global se toma en cuenta como un producto, servicio o sólo en el total a la hora de calcular los márgenes.
MARGIN_TYPE=Precio compra/coste sugerido por defecto por el cálculo de márgenes
MargeType1=Margin on Best vendor price
MargeType1=Margen en Mejor Precio Proveedor
MargeType2=Margen en Precio Medio Ponderado (PMP)
MargeType3=Margen en Precio de coste
MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* Margin on Cost price = Selling price - Cost price defined on product card or WAP if cost price not defined, or best supplier price if WAP not yet defined
MarginTypeDesc=* Margen en mejor precio de compra = Precio de venta - Mejor precio de proveedor definido en la ficha del producto<br>* Margen en Precio promedio ponderado (PMP) = Precio de venta - Precio Medio Ponderado del producto (PMP), o mejor precio de proveedor si PMP aún no está definido <br > * Margen en precio de coste = Precio de venta - precio de coste definido en la ficha del producto o PMP si el precio de coste no está definido, o mejor precio de proveedor si PMP aún no está definido
CostPrice=Precio de compra
UnitCharges=Carga unitaria
Charges=Cargas

View File

@ -101,8 +101,8 @@ DraftSuppliersOrders=Draft purchase orders
OnProcessOrders=Pedidos en proceso
RefOrder=Ref. pedido
RefCustomerOrder=Ref. pedido para el cliente
RefOrderSupplier=Ref. order for vendor
RefOrderSupplierShort=Ref. order vendor
RefOrderSupplier=Ref. pedido para el proveedor
RefOrderSupplierShort=Ref. ped. prov.
SendOrderByMail=Enviar pedido por e-mail
ActionsOnOrder=Eventos sobre el pedido
NoArticleOfTypeProduct=No hay artículos de tipo 'producto' y por lo tanto enviables en este pedido
@ -125,11 +125,11 @@ TypeContact_commande_internal_SHIPPING=Responsable envío pedido cliente
TypeContact_commande_external_BILLING=Contacto cliente facturación pedido
TypeContact_commande_external_SHIPPING=Contacto cliente entrega pedido
TypeContact_commande_external_CUSTOMER=Contacto cliente seguimiento pedido
TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order
TypeContact_order_supplier_internal_SALESREPFOLL=Comercial seguimiento pedido de compra
TypeContact_order_supplier_internal_SHIPPING=Responsable recepción pedido a proveedor
TypeContact_order_supplier_external_BILLING=Vendor invoice contact
TypeContact_order_supplier_external_SHIPPING=Vendor shipping contact
TypeContact_order_supplier_external_CUSTOMER=Vendor contact following-up order
TypeContact_order_supplier_external_BILLING=Contacto proveedor factura
TypeContact_order_supplier_external_SHIPPING=Contacto seguimiento proveedor
TypeContact_order_supplier_external_CUSTOMER=Contacto seguimiento pedido a proveedor
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON no definida
Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON no definida
Error_OrderNotChecked=No se han seleccionado pedidos a facturar

View File

@ -1,22 +1,22 @@
# Dolibarr language file - Source file is en_US - supplier_proposal
SupplierProposal=Vendor commercial proposals
supplier_proposalDESC=Manage price requests to vendors
SupplierProposal=Presupuestos de proveedor
supplier_proposalDESC=Gestiona presupuestos de proveedor
SupplierProposalNew=Nuevo presupuesto
CommRequest=Presupuesto
CommRequests=Presupuestos
SearchRequest=Buscar un presupuesto
DraftRequests=Presupuestos borrador
SupplierProposalsDraft=Draft vendor proposals
LastModifiedRequests=Últimos %s consultas de precios modificados
SupplierProposalsDraft=Presupuestos de proveedor borrador
LastModifiedRequests=Últimos %s presupuestos
RequestsOpened=Presupuestos abiertos
SupplierProposalArea=Vendor proposals area
SupplierProposalShort=Vendor proposal
SupplierProposals=Vendor proposals
SupplierProposalsShort=Vendor proposals
SupplierProposalArea=Área presupuestos de proveedor
SupplierProposalShort=Presupuesto de proveedor
SupplierProposals=Presupuestos de proveedor
SupplierProposalsShort=Presup. proveedor
NewAskPrice=Nuevo presupuesto
ShowSupplierProposal=Mostrar presupuesto
AddSupplierProposal=Crear un presupuesto
SupplierProposalRefFourn=Vendor ref
SupplierProposalRefFourn=Ref. proveedor
SupplierProposalDate=Fecha de entrega
SupplierProposalRefFournNotice=Antes de cerrar a "Aceptado", piense en consultar las referencias de proveedores.
ConfirmValidateAsk=¿Está seguro de querer validar este presupuesto bajo la referencia <b>%s</b>?
@ -47,9 +47,9 @@ CommercialAsk=Presupuesto
DefaultModelSupplierProposalCreate=Modelo por defecto
DefaultModelSupplierProposalToBill=Modelo por defecto al cerrar un presupuesto (aceptado)
DefaultModelSupplierProposalClosed=Modelo por defecto al cerrar un presupuesto (rechazado)
ListOfSupplierProposals=List of vendor proposal requests
ListSupplierProposalsAssociatedProject=List of vendor proposals associated with project
SupplierProposalsToClose=Vendor proposals to close
SupplierProposalsToProcess=Vendor proposals to process
ListOfSupplierProposals=Listado de presupuestos de proveedor
ListSupplierProposalsAssociatedProject=Listado de presupuestos de proveedor asociados al proyecto
SupplierProposalsToClose=Presupuestos de proveedor a cerrar
SupplierProposalsToProcess=Presupuestos de proveedor a procesar
LastSupplierProposals=Últimos %s presupuestos
AllPriceRequests=Todos los presupuestos

View File

@ -1,11 +1,11 @@
# Dolibarr language file - Source file is en_US - suppliers
Suppliers=Vendors
SuppliersInvoice=Vendor invoice
ShowSupplierInvoice=Show Vendor Invoice
NewSupplier=New vendor
Suppliers=Proveedores
SuppliersInvoice=Factura de proveedor
ShowSupplierInvoice=Ver factura de proveedor
NewSupplier=Nuevo proveedor
History=Histórico
ListOfSuppliers=List of vendors
ShowSupplier=Show vendor
ListOfSuppliers=Listado de proveedores
ShowSupplier=Ver proveedor
OrderDate=Fecha de pedido
BuyingPriceMin=Mejor precio de compra
BuyingPriceMinShort=Mejor precio de compra
@ -14,12 +14,12 @@ TotalSellingPriceMinShort=Total de los precios de venta de los subproductos
SomeSubProductHaveNoPrices=Algunos subproductos no tienen precio definido
AddSupplierPrice=Añadir precio de compra
ChangeSupplierPrice=Cambiar precio de compra
SupplierPrices=Vendor prices
SupplierPrices=Precios proveedor
ReferenceSupplierIsAlreadyAssociatedWithAProduct=Esta referencia de proveedor ya está asociada a la referencia: %s
NoRecordedSuppliers=No vendor recorded
SupplierPayment=Vendor payment
SuppliersArea=Vendor area
RefSupplierShort=Ref. vendor
NoRecordedSuppliers=Sin proveedores registrados
SupplierPayment=Pagos a proveedor
SuppliersArea=Área proveedores
RefSupplierShort=Ref. proveedor
Availability=Disponibilidad
ExportDataset_fournisseur_1=Facturas de proveedor y líneas de factura
ExportDataset_fournisseur_2=Facturas de proveedor y pagos
@ -31,17 +31,17 @@ ConfirmDenyingThisOrder=¿Está seguro de querer denegar el pedido a proveedor <
ConfirmCancelThisOrder=¿Está seguro de querer cancelar el pedido a proveedor <b>%s</b>?
AddSupplierOrder=Crear pedido a proveedor
AddSupplierInvoice=Crear factura de proveedor
ListOfSupplierProductForSupplier=List of products and prices for vendor <b>%s</b>
SentToSuppliers=Sent to vendors
ListOfSupplierProductForSupplier=Listado de productos y precios del proveedor <b>%s</b>
SentToSuppliers=Enviado a proveedores
ListOfSupplierOrders=Listado de pedidos a proveedor
MenuOrdersSupplierToBill=Pedidos a proveedor a facturar
NbDaysToDelivery=Tiempo de entrega en días
DescNbDaysToDelivery=El mayor retraso en las entregas de productos de este pedido
SupplierReputation=Vendor reputation
SupplierReputation=Reputación proveedor
DoNotOrderThisProductToThisSupplier=No realizar pedidos
NotTheGoodQualitySupplier=Mala calidad
ReputationForThisProduct=Reputación
BuyerName=Nombre del comprador
AllProductServicePrices=Todos los precios de producto / servicio
AllProductReferencesOfSupplier=Todos las referencias de proveedores de producto / servicio
BuyingPriceNumShort=Vendor prices
BuyingPriceNumShort=Precios proveedor

View File

@ -14,7 +14,7 @@ descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Clasificar pedido(s) de client
descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar pedido(s) de cliente origen como facturado cuando la factura a cliente sea marcada como pagada (y si el importe de la factura es la misma que la suma de los importes de los pedidos relacionados)
descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar automáticamente el pedido origen como enviado cuando el envío se valide (y si la cantidad enviada por todos los envíos sea la misma que el pedido)
# Autoclassify supplier order
descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals)
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders)
descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificar los presupuesto(s) de proveedor origen como facturado(s) cuando la factura de proveedor (y si el importe de la factura es igual a la suma de los importes de los presupuestos relacionados)
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificar pedido(s) a proveedor origen como facturado(s) cuando la factura de proveedor se valide (y si el importe de la factura es igual a la suma de los importes de los pedidos relacionados)
AutomaticCreation=Creación automática
AutomaticClassification=Clasificación automática

View File

@ -48,7 +48,9 @@ if (! $res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
session_cache_limiter(false);
session_cache_limiter('public');
// false or '' = keep cache instruction added by server
// 'public' = remove cache instruction added by server and if no cache-control added later, a default cache delay (10800) will be added by PHP.
// Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS
/*if (empty($user->id) && ! empty($_SESSION['dol_login']))
@ -62,7 +64,7 @@ session_cache_limiter(false);
header('Content-type: text/css');
// Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access.
// You can use CTRL+F5 to refresh your browser cache.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
?>

View File

@ -161,13 +161,12 @@ class ProductStockEntrepot extends CommonObject
/**
* Load object in memory from the database
*
* @param int $id Id object
* @param int $fk_product Id product
* @param int $fk_entrepot Id warehouse
*
* @return int <0 if KO, 0 if not found, >0 if OK
* @param int $id Id object
* @param int $fk_product Id product
* @param int $fk_entrepot Id warehouse
* @return int <0 if KO, 0 if not found, >0 if OK
*/
public function fetch($id, $fk_product, $fk_entrepot)
public function fetch($id, $fk_product=0, $fk_entrepot=0)
{
if(empty($id) && (empty($fk_product) || empty($fk_entrepot))) return -1;
@ -175,23 +174,22 @@ class ProductStockEntrepot extends CommonObject
$sql = 'SELECT';
$sql .= ' t.rowid,';
$sql .= " t.tms,";
$sql .= " t.fk_product,";
$sql .= " t.fk_entrepot,";
$sql .= " t.seuil_stock_alerte,";
$sql .= " t.desiredstock,";
$sql .= " t.import_key";
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
if(!empty($id)) $sql .= ' WHERE t.rowid = ' . $id;
else $sql.= ' WHERE t.fk_product = '.$fk_product.' AND t.fk_entrepot = '.$fk_entrepot;
$resql = $this->db->query($sql);
if ($resql) {
if ($resql)
{
$numrows = $this->db->num_rows($resql);
if ($numrows) {
if ($numrows)
{
$obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid;

View File

@ -137,14 +137,12 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer)
if($maj_ok) {
$pse = new ProductStockEntrepot($db);
if($pse->fetch('', $id, GETPOST('fk_entrepot')) > 0) {
if ($pse->fetch(0, $id, GETPOST('fk_entrepot','int')) > 0) {
// Update
$pse->seuil_stock_alerte = $seuil_stock_alerte;
$pse->desiredstock = $desiredstock;
if($pse->update($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseUpdated'), null, 'mesgs');
} else {
// Create
$pse->fk_entrepot = GETPOST('fk_entrepot');
$pse->fk_product = $id;
@ -162,8 +160,9 @@ if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->c
{
$pse = new ProductStockEntrepot($db);
$pse->fetch(GETPOST('fk_productstockwarehouse'));
if($pse->delete($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs');
$pse->fetch(GETPOST('fk_productstockwarehouse','int'));
if ($pse->delete($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs');
$action = '';
}
@ -804,6 +803,7 @@ if (! $variants) {
*/
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>';

View File

@ -296,22 +296,20 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre
$sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price,';
$sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,';
$sql.= ' p.tms as datem, p.duration, p.tobuy';
$sql.= ' ,p.desiredstock,p.seuil_stock_alerte';
if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
$sql.= ', pse.desiredstock' ;
$sql.= ', pse.seuil_stock_alerte' ;
$sql.= ' p.tms as datem, p.duration, p.tobuy,';
$sql.= ' p.desiredstock, p.seuil_stock_alerte,';
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
$sql.= ' pse.desiredstock as desiredstockpse, pse.seuil_stock_alerte as seuil_stock_alertepse,';
}
$sql.= ' ,'.$sqldesiredtock.' as desiredstock, '.$sqlalertstock.' as alertstock,';
$sql.= ' '.$sqldesiredtock.' as desiredstockcombined, '.$sqlalertstock.' as seuil_stock_alertecombined,';
$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique';
$sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
$sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s';
$sql.= ' ON (p.rowid = s.fk_product AND s.fk_entrepot IN (SELECT ent.rowid FROM '.MAIN_DB_PREFIX.'entrepot AS ent WHERE ent.entity IN('.getEntity('stock').')))';
if($fk_supplier > 0) {
if ($fk_supplier > 0) {
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price pfp ON (pfp.fk_product = p.rowid AND pfp.fk_soc = '.$fk_supplier.')';
}
if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')';
}
$sql.= ' WHERE p.entity IN (' . getEntity('product') . ')';
@ -333,7 +331,7 @@ $sql.= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms';
$sql.= ', p.duration, p.tobuy';
$sql.= ', p.desiredstock';
$sql.= ', p.seuil_stock_alerte';
if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
$sql.= ', pse.desiredstock' ;
$sql.= ', pse.seuil_stock_alerte' ;
}
@ -372,7 +370,7 @@ if ($usevirtualstock)
$sqlReceptionFourn.= " AND fd.fk_product = p.rowid";
$sqlReceptionFourn.= " AND cf.fk_statut IN (3,4))";
$sql.= ' HAVING ((('.$db->ifsql($sqldesiredtock." IS NULL", "0", $sqldesiredtock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
$sql.= ' HAVING (('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
$sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.')))';
$sql.= ' OR ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
$sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.'))))';
@ -404,7 +402,6 @@ if (empty($resql))
dol_print_error($db);
exit;
}
//print $sql;
$num = $db->num_rows($resql);
$i = 0;
@ -513,9 +510,12 @@ $param .= '&fk_supplier=' . $fk_supplier;
$param .= '&fk_entrepot=' . $fk_entrepot;
$stocklabel = $langs->trans('Stock');
if ($usevirtualstock == 1) $stocklabel = 'VirtualStock';
if ($usevirtualstock == 0) $stocklabel = 'PhysicalStock';
if ($usevirtualstock == 1) $stocklabel = $langs->trans('VirtualStock');
if ($usevirtualstock == 0) $stocklabel = $langs->trans('PhysicalStock');
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0)
{
$stocklabel.=' ('.$langs->trans("AllWarehouses").')';
}
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire">'.
'<input type="hidden" name="token" value="' .$_SESSION['newtoken'] . '">'.
'<input type="hidden" name="fk_supplier" value="' . $fk_supplier . '">'.
@ -536,7 +536,7 @@ if (!empty($conf->service->enabled) && $type == 1) print '<td class="liste_titre
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">&nbsp;</td>';
print '<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . '&nbsp;<input type="checkbox" id="salert" name="salert" ' . (!empty($alertchecked)?$alertchecked:'') . '></td>';
print '<td class="liste_titre" align="right">' . $langs->trans('Draft') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
print '<td class="liste_titre" align="right">' . $langs->trans('IncludeAlsoDraftOrders') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
@ -608,20 +608,23 @@ while ($i < ($limit ? min($num, $limit) : $num))
//print $prod->stats_reception['qty'];
$ordered = $prod->stats_commande_fournisseur['qty'] - $prod->stats_reception['qty'];
$desiredstock=($objp->desiredstockpse ? $objp->desiredstockpse : $objp->desiredstock);
$alertstock=($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : $objp->seuil_stock_alerte);
$warning='';
if ($objp->alertstock && ($stock < $objp->alertstock))
if ($alertstock && ($stock < $alertstock))
{
$warning = img_warning($langs->trans('StockTooLow')) . ' ';
}
//depending on conf, use either physical stock or
//virtual stock to compute the stock to buy value
$stocktobuy = max(max($objp->desiredstock, $objp->alertstock) - $stock - $ordered, 0);
$stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0);
$disabled = '';
if ($ordered > 0)
{
$stockforcompare = $usevirtualstock ? $stock : $stock + $ordered;
if ($stockforcompare >= $objp->desiredstock)
if ($stockforcompare >= $desiredstock)
{
$picto = img_picto('', './img/yes', '', 1);
$disabled = 'disabled';
@ -661,12 +664,12 @@ while ($i < ($limit ? min($num, $limit) : $num))
}
// Desired stock
print '<td align="right">' . $objp->desiredstock . '</td>';
print '<td align="right">' . $desiredstock . '</td>';
// Limit stock for alerr
print '<td align="right">' . $objp->alertstock . '</td>';
// Limit stock for alert
print '<td align="right">' . $alertstock . '</td>';
// Current stock
// Current stock (all warehouses)
print '<td align="right">'. $warning . $stock. '</td>';
// Already ordered

View File

@ -61,7 +61,7 @@ if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) {
} else {
print '<div style="margin: 0 auto; width:60%">';
print '<p style="text-align: center">' . ($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")) . '</p>';
print '<div class="corps">';
print '<div class="ticketform">';
print '<div class="index_create"><a href="create_ticket.php" class="button orange bigrounded"><strong>&nbsp;' . dol_escape_htmltag($langs->trans("CreateTicket")) . '</strong></a></div>';
print '<div class="index_display"><a href="list.php" class="button blue bigrounded"><strong>&nbsp;' . dol_escape_htmltag($langs->trans("ShowListTicketWithTrackId")) . '</strong></a></div>';
print '<div class="index_display"><a href="view.php" class="button blue bigrounded"><strong>&nbsp;' . dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")) . '</strong></a></div>';

View File

@ -3304,12 +3304,13 @@ class Societe extends CommonObject
/**
* Create a third party into database from a member object
*
* @param Adherent $member Object member
* @param string $socname Name of third party to force
* @param string $socalias Alias name of third party to force
* @return int <0 if KO, id of created account if OK
* @param Adherent $member Object member
* @param string $socname Name of third party to force
* @param string $socalias Alias name of third party to force
* @param string $customercode Customer code
* @return int <0 if KO, id of created account if OK
*/
function create_from_member(Adherent $member, $socname='', $socalias='')
function create_from_member(Adherent $member, $socname='', $socalias='', $customercode='')
{
// phpcs:enable
global $user,$langs;
@ -3337,7 +3338,7 @@ class Societe extends CommonObject
$this->facebook=$member->facebook;
$this->client = 1; // A member is a customer by default
$this->code_client = -1;
$this->code_client = ($customercode?$customercode:-1);
$this->code_fournisseur = -1;
$this->db->begin();

View File

@ -59,19 +59,24 @@ $fontsizesmaller='0.75em';
if (defined('THEME_ONLY_CONSTANT')) return;
session_cache_limiter(false);
session_cache_limiter('public');
require_once '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSION['dol_login'],'',1);
// and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile.
if (empty($user->id) && ! empty($_SESSION['dol_login']))
{
$user->fetch('',$_SESSION['dol_login'],'',1);
$user->getrights();
}
// Define css type
top_httphead('text/css');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
@ -1074,10 +1079,13 @@ select.selectarrowonleft option {
/* padding: .4em .1em; */
/* border-bottom: 1px solid #BBB; */
/* max-width: inherit; why this ? */
}
input[type=text], input[type=password] {
}
input[type=text], input[type=password] {
max-width: 180px;
}
.vmenu .searchform input {
max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */
}
.hideonsmartphone { display: none; }
.hideonsmartphoneimp { display: none !important; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 344 B

View File

@ -60,19 +60,24 @@ $fontsizesmaller='11';
if (defined('THEME_ONLY_CONSTANT')) return;
session_cache_limiter(false);
session_cache_limiter('public');
require_once '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSION['dol_login'],'',1);
// and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile.
if (empty($user->id) && ! empty($_SESSION['dol_login']))
{
$user->fetch('',$_SESSION['dol_login'],'',1);
$user->getrights();
}
// Define css type
top_httphead('text/css');
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
@ -1990,7 +1995,7 @@ div.login_block {
vertical-align: middle;
background: rgb(<?php echo $colorbackvmenu1; ?>);
width: 228px;
height: 43px;
height: 45px;
<?php if (GETPOST('optioncss','aZ09') == 'print') { ?>
display: none;
<?php } ?>

View File

@ -56,14 +56,8 @@ if (! empty($conf->global->TICKET_SHOW_MODULE_LOGO)) {
?>
}
body {
font-size: 0.88em;
background: none;
min-height: 600px;
/*padding-bottom:150px;*/
}
div.corps {
div.ticketform {
font-family: arial;
position: static;
padding: 2em 1em;
@ -78,13 +72,13 @@ div.corps {
}
.index_create, .index_display {
div.ticketform .index_create, .index_display {
float: left;
width: 33%;
text-align: center;
}
.orange {
div.ticketform .orange {
color: #fef4e9;
border: solid 1px #da7c0c;
background: #f78d1d;
@ -92,22 +86,21 @@ div.corps {
background: -moz-linear-gradient(top, #faa51a, #f47a20);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
}
.orange:active {
div.ticketform .orange:active {
color: #fcd3a5;
background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));
background: -moz-linear-gradient(top, #f47a20, #faa51a);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a');
}
.orange:hover {
div.ticketform .orange:hover {
background: #f47c20;
background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));
background: -moz-linear-gradient(top, #f88e11, #f06015);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015');
}
.blue {
div.ticketform .blue {
color: #d9eef7;
border: solid 1px #0076a3;
background: #0095cd;
@ -115,22 +108,21 @@ div.corps {
background: -moz-linear-gradient(top, #00adee, #0078a5);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');
}
.blue:active {
div.ticketform .blue:active {
color: #80bed6;
background: -webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00adee));
background: -moz-linear-gradient(top, #0078a5, #00adee);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5', endColorstr='#00adee');
}
.blue:hover {
div.ticketform .blue:hover {
background: #007ead;
background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
background: -moz-linear-gradient(top, #0095cc, #00678e);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc', endColorstr='#00678e');
}
#form_create_ticket,
#form_view_ticket {
#form_create_ticket, #form_view_ticket
{
margin-left: 10px;
margin-right: 10px;
padding-left:1em;

View File

@ -610,7 +610,7 @@ if (empty($reshook)) {
$trigger_name='USER_SENTBYMAIL';
$paramname='id'; // Name of param key to open the card
$mode='emailfromuser';
$trackid='use'.$object->id;
$trackid='use'.$id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
// Actions to build doc
@ -1247,9 +1247,9 @@ else
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
{
$object->getrights();
if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
}
// Connexion ldap
// pour recuperer passDoNotExpire et userChangePassNextLogon
if (! empty($conf->ldap->enabled) && ! empty($object->ldap_sid))

View File

@ -2540,7 +2540,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
print '<tr><td>';
$htmlhelp=$langs->trans("WEBSITE_IMAGEDesc");
print $form->textwithpicto($langs->trans('WEBSITE_IMAGE'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
print $form->textwithpicto($langs->trans('WEBSITE_IMAGE'), $htmlhelp, 1, 'help', '', 0, 2, 'imagetooltip');
print '</td><td>';
print '<input type="text" class="flat quatrevingtpercent" name="WEBSITE_IMAGE" value="'.dol_escape_htmltag($pageimage).'">';
print '</td></tr>';
@ -2606,7 +2606,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
print '<tr><td class="titlefieldcreate">';
$htmlhelp=$langs->trans("WEBSITE_ALIASALTDesc");
print $form->textwithpicto($langs->trans('WEBSITE_ALIASALT'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
print $form->textwithpicto($langs->trans('WEBSITE_ALIASALT'), $htmlhelp, 1, 'help', '', 0, 2, 'aliastooltip');
print '</td><td>';
print '<input type="text" class="flat minwidth300" name="WEBSITE_ALIASALT" value="'.dol_escape_htmltag($pagealiasalt).'">';
print '</td></tr>';
@ -2636,8 +2636,8 @@ if ($action == 'editmeta' || $action == 'createcontainer')
}
print '<tr><td class="tdhtmlheader tdtop">';
$htmlhelp=$langs->trans("EditTheWebSiteForACommonHeader").'<br><br>';
$htmlhelp=$langs->trans("Example").' :<br>';
$htmlhelp =$langs->trans("EditTheWebSiteForACommonHeader").'<br><br>';
$htmlhelp.=$langs->trans("Example").' :<br>';
$htmlhelp.=dol_htmlentitiesbr($htmlheadercontentdefault);
print $form->textwithpicto($langs->trans('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
print '</td><td>';