mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge remote-tracking branch 'origin/3.4' into develop
Conflicts: htdocs/cache.manifest htdocs/install/mysql/migration/3.3.0-3.4.0.sql
This commit is contained in:
commit
b61ca887d5
|
|
@ -659,7 +659,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Remove extrafields
|
||||
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
|
||||
{
|
||||
|
|
@ -855,6 +855,45 @@ class FactureFournisseur extends CommonInvoice
|
|||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldref = '';
|
||||
|
||||
// Rename directory if dir was a temporary ref
|
||||
if (preg_match('/^[\(]?PROV/i', $this->ref))
|
||||
{
|
||||
// On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref)
|
||||
// afin de ne pas perdre les fichiers attaches
|
||||
$facref = dol_sanitizeFileName($this->ref);
|
||||
$snumfa = dol_sanitizeFileName($num);
|
||||
|
||||
$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$facref;
|
||||
$dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$snumfa;
|
||||
if (file_exists($dirsource))
|
||||
{
|
||||
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
|
||||
|
||||
if (@rename($dirsource, $dirdest))
|
||||
{
|
||||
$this->oldref = $facref;
|
||||
|
||||
dol_syslog("Rename ok");
|
||||
// Suppression ancien fichier PDF dans nouveau rep
|
||||
dol_delete_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$snumfa.'/'.$facref.'*.*');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set new ref and define current statut
|
||||
if (! $error)
|
||||
{
|
||||
$this->ref = $num;
|
||||
$this->statut=1;
|
||||
//$this->date_validation=$now; this is stored into log table
|
||||
}
|
||||
|
||||
// Triggers call
|
||||
if (! $error)
|
||||
{
|
||||
// Appel des triggers
|
||||
|
|
|
|||
|
|
@ -114,8 +114,18 @@ elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fourni
|
|||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$qualified_for_stock_change=0;
|
||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||
{
|
||||
$qualified_for_stock_change=$object->hasProductsOrServices(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
$qualified_for_stock_change=$object->hasProductsOrServices(1);
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $object->hasProductsOrServices(1))
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change)
|
||||
{
|
||||
$langs->load("stocks");
|
||||
if (! $idwarehouse || $idwarehouse == -1)
|
||||
|
|
|
|||
|
|
@ -378,4 +378,6 @@ ALTER TABLE llx_facture_fourn_extrafields ADD INDEX idx_facture_fourn_extrafield
|
|||
|
||||
ALTER TABLE llx_user_clicktodial ADD COLUMN url varchar(255) AFTER fk_user;
|
||||
|
||||
ALTER TABLE llx_fichinterdet ADD COLUMN fk_parent_line integer NULL AFTER fk_fichinter;
|
||||
|
||||
ALTER TABLE llx_societe_address CHANGE COLUMN tel phone varchar(20);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ create table llx_fichinterdet
|
|||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_fichinter integer,
|
||||
fk_parent_line integer NULL,
|
||||
date datetime, -- date de la ligne d'intervention
|
||||
description text, -- description de la ligne d'intervention
|
||||
duree integer, -- duree de la ligne d'intervention
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ CronHourStart= Start Hour and date of task
|
|||
CronEvery= And execute task each
|
||||
CronObject= Instance/Object to create
|
||||
CronArgs=Parameters
|
||||
CronSaveSucess=Save succefully
|
||||
CronSaveSucess=Save succesfully
|
||||
CronNote=Comment
|
||||
CronFieldMandatory=Fields %s is mandatory
|
||||
CronErrEndDateStartDt=End date cannot be before start date
|
||||
|
|
@ -109,4 +109,4 @@ CronType=Task type
|
|||
CronType_method=Call method of a Dolibarr Class
|
||||
CronType_command=Shell command
|
||||
CronMenu=Cron
|
||||
CronCannotLoadClass=Cannot load class %s or object %s
|
||||
CronCannotLoadClass=Cannot load class %s or object %s
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user