Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
35ac8923dd
@ -857,7 +857,7 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
// Using TLV format
|
// Using TLV format
|
||||||
$s = pack('C1', 1).pack('C1', strlen($this->thirdparty->name)).$this->thirdparty->name;
|
$s = pack('C1', 1).pack('C1', strlen($this->thirdparty->name)).$this->thirdparty->name;
|
||||||
$s .= pack('C1', 2).pack('C1', strlen($this->thirdparty->tva_intra)).$this->thirdparty->tva_intra;
|
$s .= pack('C1', 2).pack('C1', strlen($this->thirdparty->tva_intra)).$this->thirdparty->tva_intra;
|
||||||
$s .= pack('C1', 3).pack('C1', strlen($datestring)).$date;
|
$s .= pack('C1', 3).pack('C1', strlen($datestring)).$this->date;
|
||||||
$s .= pack('C1', 4).pack('C1', strlen($pricewithtaxstring)).$pricewithtaxstring;
|
$s .= pack('C1', 4).pack('C1', strlen($pricewithtaxstring)).$pricewithtaxstring;
|
||||||
$s .= pack('C1', 5).pack('C1', strlen($pricetaxstring)).$pricetaxstring;
|
$s .= pack('C1', 5).pack('C1', strlen($pricetaxstring)).$pricetaxstring;
|
||||||
$s .= ''; // Hash of xml invoice
|
$s .= ''; // Hash of xml invoice
|
||||||
|
|||||||
@ -575,6 +575,9 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
// Add line
|
// Add line
|
||||||
|
|||||||
@ -259,7 +259,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$arephoto = false;
|
$arephoto = false;
|
||||||
foreach ($pdir as $midir) {
|
foreach ($pdir as $midir) {
|
||||||
if (!$arephoto) {
|
if (!$arephoto) {
|
||||||
if ($conf->product->entity != $objphoto->entity) {
|
if ($conf->entity != $objphoto->entity) {
|
||||||
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
||||||
} else {
|
} else {
|
||||||
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
||||||
@ -800,6 +800,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
// Add line
|
// Add line
|
||||||
|
|||||||
@ -751,6 +751,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
|
$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
|
|||||||
@ -265,7 +265,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$arephoto = false;
|
$arephoto = false;
|
||||||
foreach ($pdir as $midir) {
|
foreach ($pdir as $midir) {
|
||||||
if (!$arephoto) {
|
if (!$arephoto) {
|
||||||
if ($conf->product->entity != $objphoto->entity) {
|
if ($conf->entity != $objphoto->entity) {
|
||||||
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
||||||
} else {
|
} else {
|
||||||
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
||||||
@ -889,6 +889,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
|
$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
$nexY = max($nexY, $posYAfterImage);
|
$nexY = max($nexY, $posYAfterImage);
|
||||||
|
|||||||
@ -266,9 +266,10 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
|
|
||||||
$arephoto = false;
|
$arephoto = false;
|
||||||
|
$realpath = '';
|
||||||
foreach ($pdir as $midir) {
|
foreach ($pdir as $midir) {
|
||||||
if (!$arephoto) {
|
if (!$arephoto) {
|
||||||
if ($conf->product->entity != $objphoto->entity) {
|
if ($conf->entity != $objphoto->entity) {
|
||||||
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
||||||
} else {
|
} else {
|
||||||
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
||||||
@ -685,6 +686,9 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
|
|||||||
@ -255,7 +255,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$arephoto = false;
|
$arephoto = false;
|
||||||
foreach ($pdir as $midir) {
|
foreach ($pdir as $midir) {
|
||||||
if (!$arephoto) {
|
if (!$arephoto) {
|
||||||
if ($conf->product->entity != $objphoto->entity) {
|
if ($conf->entity != $objphoto->entity) {
|
||||||
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
||||||
} else {
|
} else {
|
||||||
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
||||||
@ -810,6 +810,9 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
|
|||||||
@ -746,6 +746,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
|
|||||||
@ -625,6 +625,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
|
|||||||
@ -619,6 +619,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
|
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||||
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||||
|
}
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user