commit
b90217d860
@ -73,12 +73,12 @@ class BankAccounts extends DolibarrApi
|
|||||||
|
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."bank_account as t";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."bank_account as t";
|
||||||
if ($category > 0) {
|
if ($category > 0) {
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."categorie_account as c";
|
$sql .= ", ".MAIN_DB_PREFIX."categorie_account as c";
|
||||||
}
|
}
|
||||||
$sql .= ' WHERE t.entity IN ('.getEntity('bank_account').')';
|
$sql .= ' WHERE t.entity IN ('.getEntity('bank_account').')';
|
||||||
// Select accounts of given category
|
// Select accounts of given category
|
||||||
if ($category > 0) {
|
if ($category > 0) {
|
||||||
$sql .= " AND c.fk_categorie = ".$db->escape($category)." AND c.fk_account = t.rowid ";
|
$sql .= " AND c.fk_categorie = ".$db->escape($category)." AND c.fk_account = t.rowid ";
|
||||||
}
|
}
|
||||||
// Add sql filters
|
// Add sql filters
|
||||||
if ($sqlfilters)
|
if ($sqlfilters)
|
||||||
|
|||||||
@ -4357,16 +4357,13 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
|
if (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
|
||||||
|
|
||||||
$displayWarranty = true;
|
$displayWarranty = true;
|
||||||
if(!in_array($object->type, $retainedWarrantyInvoiceAvailableType) && empty($object->retained_warranty)){
|
if (!in_array($object->type, $retainedWarrantyInvoiceAvailableType) && empty($object->retained_warranty)) {
|
||||||
$displayWarranty = false;
|
$displayWarranty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displayWarranty)
|
if($displayWarranty) {
|
||||||
{
|
|
||||||
|
|
||||||
// Retained Warranty
|
// Retained Warranty
|
||||||
print '<tr class="retained-warranty-lines" ><td>';
|
print '<tr class="retained-warranty-lines" ><td>';
|
||||||
print '<table id="retained-warranty-table" class="nobordernopadding" width="100%"><tr><td>';
|
print '<table id="retained-warranty-table" class="nobordernopadding" width="100%"><tr><td>';
|
||||||
|
|||||||
@ -1419,7 +1419,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $retainedWarrantyToPayOn, $useborder, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $retainedWarrantyToPayOn, $useborder, 'L', 1);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($retainedWarranty), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($retainedWarranty), $useborder, 'R', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user