Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts: htdocs/accountancy/journal/bankjournal.php
This commit is contained in:
commit
e5513cff91
@ -1141,7 +1141,26 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
|
// Situations totals migth be wrong on huge amounts
|
||||||
|
if ($object->situation_cycle_ref && $object->situation_counter > 1) {
|
||||||
|
|
||||||
|
$sum_pdf_tva = 0;
|
||||||
|
foreach($this->tva as $tvakey => $tvaval){
|
||||||
|
$sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sum_pdf_tva!=$object->total_tva) { // apply coef to recover the VAT object amount (the good one)
|
||||||
|
$coef_fix_tva = $object->total_tva / $sum_pdf_tva;
|
||||||
|
|
||||||
|
foreach($this->tva as $tvakey => $tvaval) {
|
||||||
|
$this->tva[$tvakey]=$tvaval * $coef_fix_tva;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
foreach($this->tva as $tvakey => $tvaval)
|
foreach($this->tva as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
@ -511,7 +511,8 @@ if (empty($reshook))
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Set if we used free entry or predefined product
|
// Set if we used free entry or predefined product
|
||||||
$predef='';
|
$predef='';
|
||||||
|
$ref_fourn = GETPOST('fourn_ref');
|
||||||
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
||||||
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||||
$date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
$date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||||
@ -599,7 +600,7 @@ if (empty($reshook))
|
|||||||
$price_base_type = $productsupplier->fourn_price_base_type;
|
$price_base_type = $productsupplier->fourn_price_base_type;
|
||||||
$type = $productsupplier->type;
|
$type = $productsupplier->type;
|
||||||
$label = $productsupplier->label;
|
$label = $productsupplier->label;
|
||||||
$desc = $productsupplier->description;
|
$desc = $productsupplier->description;
|
||||||
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
||||||
|
|
||||||
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice'));
|
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice'));
|
||||||
|
|||||||
@ -2797,6 +2797,7 @@ class SupplierProposalLine extends CommonObjectLine
|
|||||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
||||||
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
||||||
if (empty($this->fk_unit)) $this->fk_unit=0;
|
if (empty($this->fk_unit)) $this->fk_unit=0;
|
||||||
|
if (empty($this->subprice)) $this->subprice=0;
|
||||||
|
|
||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
@ -2981,6 +2982,7 @@ class SupplierProposalLine extends CommonObjectLine
|
|||||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
||||||
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
||||||
if (empty($this->fk_unit)) $this->fk_unit=0;
|
if (empty($this->fk_unit)) $this->fk_unit=0;
|
||||||
|
if (empty($this->subprice)) $this->subprice=0;
|
||||||
|
|
||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ function migrate_product_photospath($product)
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$dir = $conf->product->multidir_output[$product->entity];
|
$dir = $conf->product->multidir_output[$product->entity];
|
||||||
$origin = $dir .'/'. get_exdir($product->id,2) . $product->id ."/photos";
|
$origin = $dir .'/'. get_exdir($product->id,2,0,0,$product,'product') . $product->id ."/photos";
|
||||||
$destin = $dir.'/'.dol_sanitizeFileName($product->ref);
|
$destin = $dir.'/'.dol_sanitizeFileName($product->ref);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user