mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
196e90cfe8
|
|
@ -363,6 +363,7 @@ if (empty($reshook)) {
|
|||
|
||||
$nbOrders = is_array($orders) ? count($orders) : 1;
|
||||
|
||||
$currentIndex = 0;
|
||||
foreach ($orders as $id_order) {
|
||||
$cmd = new Commande($db);
|
||||
if ($cmd->fetch($id_order) <= 0) {
|
||||
|
|
@ -373,6 +374,7 @@ if (empty($reshook)) {
|
|||
$objecttmp = new Facture($db);
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) {
|
||||
// If option "one bill per third" is set, and an invoice for this thirdparty was already created, we reuse it.
|
||||
$currentIndex++;
|
||||
$objecttmp = $TFactThird[$cmd->socid];
|
||||
} else {
|
||||
// If we want one invoice per order or if there is no first invoice yet for this thirdparty.
|
||||
|
|
@ -389,6 +391,10 @@ if (empty($reshook)) {
|
|||
$objecttmp->ref_client = $cmd->ref_client;
|
||||
}
|
||||
|
||||
if (empty($objecttmp->note_public)) {
|
||||
$objecttmp->note_public = $langs->transnoentities("Orders");
|
||||
}
|
||||
|
||||
$datefacture = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
|
||||
if (empty($datefacture)) {
|
||||
$datefacture = dol_now();
|
||||
|
|
@ -553,6 +559,11 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($currentIndex <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 10)) {
|
||||
$objecttmp->note_public = dol_concatdesc($objecttmp->note_public, $langs->transnoentities($cmd->ref).(empty($cmd->ref_client) ? '' : ' ('.$cmd->ref_client.')'));
|
||||
$objecttmp->update($user);
|
||||
}
|
||||
|
||||
//$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module.
|
||||
|
||||
if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) {
|
||||
|
|
|
|||
|
|
@ -2796,9 +2796,9 @@ class Contrat extends CommonObject
|
|||
if ($expirationdate && $expirationdate < $enddatetoscan) {
|
||||
dol_syslog("Define the newdate of end of services from expirationdate=".$expirationdate);
|
||||
$newdate = $expirationdate;
|
||||
$protecti = 0; //$protecti is to avoid infinite loop
|
||||
$protecti = 0; // $protecti is to avoid infinite loop
|
||||
while ($newdate < $enddatetoscan && $protecti < 1000) {
|
||||
$newdate = dol_time_plus_duree($newdate, $duration_value, $duration_unit);
|
||||
$newdate = dol_time_plus_duree($newdate, (int) $duration_value, $duration_unit);
|
||||
$protecti++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = '
|
|||
* @param string $table Table containing field with counter
|
||||
* @param string $field Field containing already used values of counter
|
||||
* @param string $where To add a filter on selection (for example to filter on invoice types)
|
||||
* @param Societe|string $objsoc The company that own the object we need a counter for
|
||||
* @param Societe|'' $objsoc The company that own the object we need a counter for
|
||||
* @param string $date Date to use for the {y},{m},{d} tags.
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @param bool $bentityon Activate the entity filter. Default is true (for modules not compatible with multicompany)
|
||||
|
|
|
|||
|
|
@ -2500,13 +2500,7 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
|
|||
} elseif ($objecttype == 'commande' || $objecttype == 'supplier_order') {
|
||||
$outputlangs->load('orders');
|
||||
|
||||
if (count($objects) > 1 && count($objects) <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 10)) {
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefOrder").' :');
|
||||
foreach ($objects as $elementobject) {
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).(empty($elementobject->ref_client) ? '' : ' ('.$elementobject->ref_client.')').(empty($elementobject->ref_supplier) ? '' : ' ('.$elementobject->ref_supplier.')').' ');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("OrderDate").' : '.dol_print_date($elementobject->date, 'day', '', $outputlangs));
|
||||
}
|
||||
} elseif (count($objects) == 1) {
|
||||
if (count($objects) == 1) {
|
||||
$elementobject = array_shift($objects);
|
||||
$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder");
|
||||
$linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref).(!empty($elementobject->ref_client) ? ' ('.$elementobject->ref_client.')' : '').(!empty($elementobject->ref_supplier) ? ' ('.$elementobject->ref_supplier.')' : '');
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -98,7 +98,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
|
|||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $conf, $db, $langs, $mysoc;
|
||||
global $db, $langs;
|
||||
|
||||
$object = new Asset($db);
|
||||
$object->initAsSpecimen();
|
||||
|
|
@ -133,7 +133,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
|
|||
|
||||
$date = $object->date;
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'asset', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'asset', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class mod_bom_advanced extends ModeleNumRefBoms
|
|||
|
||||
$date = ($object->date_bom ? $object->date_bom : $object->date);
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'bom_bom', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'bom_bom', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,16 +93,22 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
|
|||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
global $db, $langs;
|
||||
|
||||
$old_code_client = $mysoc->code_client;
|
||||
$mysoc->code_client = 'CCCCCCCCCC';
|
||||
$numExample = $this->getNextValue($mysoc, '');
|
||||
$mysoc->code_client = $old_code_client;
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
|
||||
$remise = new RemiseCheque($db);
|
||||
$remise->initAsSpecimen();
|
||||
$thirdparty = new Societe($db);
|
||||
$thirdparty->initAsSpecimen();
|
||||
|
||||
$numExample = $this->getNextValue($thirdparty, $remise);
|
||||
|
||||
if (!$numExample) {
|
||||
$numExample = $langs->trans('NotConfigured');
|
||||
}
|
||||
|
||||
return $numExample;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,12 +88,18 @@ class mod_contract_magre extends ModelNumRefContracts
|
|||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs, $mysoc;
|
||||
global $db, $langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
|
||||
$contract = new Contrat($db);
|
||||
$contract->initAsSpecimen();
|
||||
$thirdparty = new Societe($db);
|
||||
$thirdparty->initAsSpecimen();
|
||||
|
||||
$numExample = $this->getNextValue($thirdparty, $contract);
|
||||
|
||||
$old_code_client = $mysoc->code_client;
|
||||
$mysoc->code_client = 'CCCCCCCCCC';
|
||||
$numExample = $this->getNextValue($mysoc, '');
|
||||
$mysoc->code_client = $old_code_client;
|
||||
|
||||
if (!$numExample) {
|
||||
$numExample = $langs->trans('NotConfigured');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -88,11 +88,15 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
|||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
global $db, $langs, $user;
|
||||
require_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php';
|
||||
|
||||
$holiday = new Holiday($db);
|
||||
$holiday->initAsSpecimen();
|
||||
|
||||
$old_login = $user->login;
|
||||
$user->login = 'UUUUUUU';
|
||||
$numExample = $this->getNextValue($user, '');
|
||||
$numExample = $this->getNextValue($user, $holiday);
|
||||
$user->login = $old_login;
|
||||
|
||||
if (!$numExample) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -114,15 +114,14 @@ class mod_sn_advanced extends ModeleNumRefBatch
|
|||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
global $db, $langs;
|
||||
|
||||
$old_code_client = $mysoc->code_client;
|
||||
$old_code_type = $mysoc->typent_code;
|
||||
$mysoc->code_client = 'CCCCCCCCCC';
|
||||
$mysoc->typent_code = 'TTTTTTTTTT';
|
||||
$numExample = $this->getNextValue($mysoc, '');
|
||||
$mysoc->code_client = $old_code_client;
|
||||
$mysoc->typent_code = $old_code_type;
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
|
||||
$thirdparty = new Societe($db);
|
||||
$thirdparty->initAsSpecimen();
|
||||
|
||||
$numExample = $this->getNextValue($thirdparty, '');
|
||||
|
||||
if (!$numExample) {
|
||||
$numExample = $langs->trans('NotConfigured');
|
||||
|
|
|
|||
|
|
@ -75,7 +75,14 @@ class mod_sn_free extends ModeleNumRefBatch
|
|||
*/
|
||||
public function getExample()
|
||||
{
|
||||
return $this->getNextValue(null, null);
|
||||
global $db;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
|
||||
$thirdparty = new Societe($db);
|
||||
$thirdparty->initAsSpecimen();
|
||||
|
||||
return $this->getNextValue($thirdparty, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -838,7 +838,7 @@ class pdf_standard extends ModelePDFStock
|
|||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param TCPDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Entrepot $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
|
|
|
|||
|
|
@ -117,12 +117,12 @@ class EcmFiles extends CommonObject
|
|||
public $extraparams;
|
||||
|
||||
/**
|
||||
* @var int|string date create
|
||||
* @var int|'' date create
|
||||
*/
|
||||
public $date_c = '';
|
||||
|
||||
/**
|
||||
* @var int|string date modify
|
||||
* @var int|'' date modify
|
||||
*/
|
||||
public $date_m = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -2665,7 +2665,7 @@ class EmailCollector extends CommonObject
|
|||
// Search country by name or code
|
||||
if (!empty($contactstatic->country)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
$result = getCountry('', 3, $this->db, '', 1, $contactstatic->country);
|
||||
$result = getCountry('', 3, $this->db, null, 1, $contactstatic->country);
|
||||
if ($result == 'NotDefined') {
|
||||
$errorforactions++;
|
||||
$this->error = "Error country not found by this name '" . $contactstatic->country . "'";
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Yasser Carreón <yacasia@gmail.com>
|
||||
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Lenin Rivas <lenin@leninrivas.com>
|
||||
* Copyright (C) 2022 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -2082,7 +2082,7 @@ if ($action == 'create') {
|
|||
if ($volumeUnit < 50) {
|
||||
print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
|
||||
} else {
|
||||
print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit);
|
||||
print $calculatedVolume.' '.measuringUnitString(0, "volume", (string) $volumeUnit);
|
||||
}
|
||||
}
|
||||
if ($totalVolume > 0) {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
|
|
@ -383,7 +384,7 @@ if (empty($reshook)) {
|
|||
$db->begin();
|
||||
|
||||
$default_ref_supplier = dol_print_date(dol_now(), '%Y%m%d%H%M%S');
|
||||
|
||||
$currentIndex = 0;
|
||||
foreach ($orders as $id_order) {
|
||||
$cmd = new CommandeFournisseur($db);
|
||||
if ($cmd->fetch($id_order) <= 0) {
|
||||
|
|
@ -392,6 +393,7 @@ if (empty($reshook)) {
|
|||
|
||||
$objecttmp = new FactureFournisseur($db);
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) {
|
||||
$currentIndex++;
|
||||
$objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created supplier invoice.
|
||||
} else {
|
||||
// Search if the VAT reverse-charge is activated by default in supplier card to resume the information
|
||||
|
|
@ -428,6 +430,10 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($objecttmp->id > 0) {
|
||||
if (empty($objecttmp->note_public)) {
|
||||
$objecttmp->note_public = $langs->transnoentities("Orders");
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element (";
|
||||
$sql .= "fk_source";
|
||||
$sql .= ", sourcetype";
|
||||
|
|
@ -548,6 +554,11 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($currentIndex <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 10)) {
|
||||
$objecttmp->note_public = dol_concatdesc($objecttmp->note_public, $langs->transnoentities($cmd->ref).(empty($cmd->ref_supplier) ? '' : ' ('.$cmd->ref_supplier.')'));
|
||||
$objecttmp->update($user);
|
||||
}
|
||||
|
||||
$cmd->classifyBilled($user); // TODO Move this in workflow like done for sales orders
|
||||
|
||||
if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -141,7 +141,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
|
|||
|
||||
$date = $object->date;
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'knowledgemanagement_knowledgerecord', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'knowledgemanagement_knowledgerecord', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ Manufacturing=Manufacturing
|
|||
Disassemble=Disassemble
|
||||
ProducedBy=Produced by
|
||||
QtyTot=Qty Total
|
||||
|
||||
MOIsClosed=Manufacturing Order is closed
|
||||
QtyCantBeSplit= Quantity cannot be split
|
||||
NoRemainQtyToDispatch=No quantity remaining to divide
|
||||
THMOperatorEstimatedHelp=Estimated cost of operator per hour. Will be used to estimate cost of a BOM using this workstation.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -140,7 +140,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject
|
|||
|
||||
$date = $object->date;
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'mymodule_myobject', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'mymodule_myobject', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -817,17 +817,22 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
// Lines to consume
|
||||
|
||||
print '<!-- Lines to consume -->'."\n";
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addconsumeline&token='.newToken();
|
||||
$permissiontoaddaconsumeline = $object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED;
|
||||
$permissiontoaddaconsumeline = ($object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED) ? 1 : -2;
|
||||
$parameters = array('morecss' => 'reposition');
|
||||
$helpText = '';
|
||||
if ($permissiontoaddaconsumeline == -2) {
|
||||
$helpText = $langs->trans('MOIsClosed');
|
||||
}
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($action != 'consumeorproduce' && $action != 'consumeandproduceall') {
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddNewConsumeLines'), '', 'fa fa-plus-circle size15x', $url, '', $permissiontoaddaconsumeline, $parameters);
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddNewConsumeLines'), $helpText, 'fa fa-plus-circle size15x', $url, '', $permissiontoaddaconsumeline, $parameters);
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans('Consumption'), $newcardbutton, '', 0, '', '', '');
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -142,7 +142,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership
|
|||
|
||||
$date = $object->date;
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'partnership', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'partnership', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2011-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016-2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2022 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2011-2023 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016-2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2022 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1955,7 +1955,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$head = product_prepare_head($object);
|
||||
$titre = $langs->trans("CardProduct".$object->type);
|
||||
$picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
|
||||
print dol_get_fiche_head($head, 'card', $titre, 0, $picto);
|
||||
print dol_get_fiche_head($head, 'card', $titre, 0, $picto, 0, '', '', 0, '', 1);
|
||||
|
||||
// Call Hook tabContentEditProduct
|
||||
$parameters = array();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Yasser Carreón <yacasia@gmail.com>
|
||||
* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1613,7 +1614,7 @@ if ($action == 'create') {
|
|||
if ($volumeUnit < 50) {
|
||||
print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
|
||||
} else {
|
||||
print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit);
|
||||
print $calculatedVolume.' '.measuringUnitString(0, "volume", (string) $volumeUnit);
|
||||
}
|
||||
}
|
||||
if ($totalVolume > 0) {
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida
|
|||
|
||||
$date = $object->date ?? '';
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'recruitment_recruitmentcandidature', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'recruitment_recruitmentcandidature', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
|
|||
|
||||
$date = $object->date ?? '';
|
||||
|
||||
$numFinal = get_next_value($db, $mask, 'recruitment_recruitmentjobposition', 'ref', '', null, $date);
|
||||
$numFinal = get_next_value($db, $mask, 'recruitment_recruitmentjobposition', 'ref', '', '', $date);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
/**
|
||||
* Prepare array of tabs for RecruitmentCandidature
|
||||
*
|
||||
* @param RecruitmentJobPosition $object RecruitmentCandidature
|
||||
* @param RecruitmentCandidature $object RecruitmentCandidature
|
||||
* @return array Array of tabs
|
||||
*/
|
||||
function recruitmentCandidaturePrepareHead($object)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2024 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -300,7 +300,7 @@ $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-l
|
|||
|
||||
if ($caneditperms) {
|
||||
$newcardbutton .= dolGetButtonTitleSeparator();
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewGroup'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/user/group/card.php?action=create&leftmenu=', '', $caneditperms);
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewGroup'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/user/group/card.php?action=create&leftmenu=', '', $caneditperms ? 1 : 0);
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
|
|
|||
|
|
@ -65,11 +65,13 @@ parameters:
|
|||
- '#expects bool#'
|
||||
- '#expects bool, int given.#'
|
||||
- '#expects bool, string given.#'
|
||||
- '#expects int#'
|
||||
- '#expects int\|#'
|
||||
- '#expects int\|#'
|
||||
- '#expects int<-2, 2>, bool given.#'
|
||||
- '#expects int<0, 1>, false given.#'
|
||||
- '#expects int, string given.#'
|
||||
- '#expects int, float given.#'
|
||||
- '#expects int<0, 1>#'
|
||||
- '#expects int, string#'
|
||||
- '#expects int, float#'
|
||||
- '#expects int, null#'
|
||||
- '#expects int, bool given.#'
|
||||
- '#expects int, false given.#'
|
||||
- '#expects int, true given.#'
|
||||
|
|
@ -78,15 +80,18 @@ parameters:
|
|||
- '#expects float\|string#'
|
||||
- '#expects float\|null#'
|
||||
- '#expects float, string given.#'
|
||||
- '#expects string#'
|
||||
- '#expects string, int given.#'
|
||||
- '#expects string\|null,#'
|
||||
- '#expects string, int#'
|
||||
- '#expects string, \(float\|int\) given.#'
|
||||
- '#expects string, array given.#'
|
||||
- '#expects string, float given.#'
|
||||
- '#expects string, array#'
|
||||
- '#expects string, float#'
|
||||
- '#expects string, bool given.#'
|
||||
- '#expects string, true given.#'
|
||||
- '#expects string, false given.#'
|
||||
- '#expects string, null given.#'
|
||||
- '#expects string, int<0, 10> given.#'
|
||||
- '#expects string, DateTime given.#'
|
||||
- '#expects string, bool\|mysqli_result\|resource given.#'
|
||||
- '#expects array#'
|
||||
- '#expects array, string given.#'
|
||||
- '#expects array, null given.#'
|
||||
|
|
@ -97,9 +102,7 @@ parameters:
|
|||
- '#expects object#'
|
||||
- '#expects Adherent#'
|
||||
- '#expects BOM#'
|
||||
- '#expects Contrat#'
|
||||
- '#expects FTP\\Connection#'
|
||||
- '#expects Holiday#'
|
||||
- '#expects LDAP\\Connection#'
|
||||
- '#expects MultiCurrency#'
|
||||
- '#expects Productlot#'
|
||||
|
|
@ -107,17 +110,13 @@ parameters:
|
|||
- '#expects FactureFournisseur#'
|
||||
- '#expects Paiement#'
|
||||
- '#expects PgSql\\Result#'
|
||||
- '#expects RecruitmentJobPosition#'
|
||||
- '#expects RemiseCheque#'
|
||||
- '#expects Societe#'
|
||||
- '#expects ''''\|Societe#'
|
||||
- '#expects SupplierProposal#'
|
||||
- '#expects Translate#'
|
||||
- '#expects User#'
|
||||
- '#expects CommonObjectLine#'
|
||||
- '#dol_eval expects#'
|
||||
- '#check_authentication expects#'
|
||||
- '#colorHexToHsl expects#'
|
||||
- '#dolGetButtonTitle expects#'
|
||||
internalErrorsCountLimit: 50
|
||||
cache:
|
||||
nodesByFileCountMax: 512
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user