Merge branch 'develop' into gli-2567

This commit is contained in:
vishalsingh.qlo325
2025-05-06 18:39:50 +05:30
17 changed files with 75 additions and 50 deletions

View File

@@ -296,7 +296,10 @@ class MailCore extends ObjectModel
}
/* Create mail and attach differents parts */
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;
if (Configuration::get('PS_MAIL_SUBJECT_PREFIX')) {
$subject = '[' . strip_tags($configuration['PS_SHOP_NAME']) . '] ' . $subject;
}
$message->setSubject($subject);
$message->setCharset('utf-8');

View File

@@ -1155,6 +1155,7 @@ class AdminControllerCore extends Controller
header('Cache-Control: no-store, no-cache');
header('Content-disposition: attachment; filename="'.$this->table.'_'.date('Y-m-d_His').'.csv"');
$fd = fopen('php://output', 'wb');
$headers = array();
foreach ($this->fields_list as $key => $datas) {
if ('PDF' === $datas['title']) {
@@ -1167,9 +1168,10 @@ class AdminControllerCore extends Controller
}
}
}
$content = array();
fputcsv($fd, $headers, ';', $text_delimiter);
foreach ($this->_list as $i => $row) {
$content[$i] = array();
$content = array();
$path_to_image = false;
foreach ($this->fields_list as $key => $params) {
$field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8(Tools::nl2br($row[$key])) : '';
@@ -1189,21 +1191,16 @@ class AdminControllerCore extends Controller
$field_value = call_user_func_array(array($callback_obj, $params['callback']), array($field_value, $row));
}
}
$content[$i][] = $field_value;
$content[] = $field_value;
}
fputcsv($fd, $content, ';', $text_delimiter);
}
$this->context->smarty->assign(array(
'export_precontent' => "",
'export_headers' => $headers,
'export_content' => $content,
'text_delimiter' => $text_delimiter
)
);
$this->layout = 'layout-export.tpl';
@fclose($fd);
die;
}
/**
* Object Delete
*

View File

@@ -3146,14 +3146,14 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
$totalPriceTaxExcl = $unitPriceTaxExcl * $quantity;
$totalPriceTaxIncl = $unitPriceTaxIncl * $quantity;
if (isset($service['unit_price_without_tax'])) {
$unitPriceTaxExcl = $service['unit_price_without_tax'];
if (isset($services[$product['id_product']]['unit_price_without_tax'])) {
$unitPriceTaxExcl = $services[$product['id_product']]['unit_price_without_tax'];
$unitPriceTaxIncl = $unitPriceTaxExcl * $oldTaxMultiplier;
$totalPriceTaxExcl = $unitPriceTaxExcl * $quantity;
$totalPriceTaxIncl = $unitPriceTaxIncl * $quantity;
} else if (isset($service['total_price_without_tax'])) {
$totalPriceTaxExcl = $service['total_price_without_tax'];
} else if (isset($services[$product['id_product']]['total_price_without_tax'])) {
$totalPriceTaxExcl = $services[$product['id_product']]['total_price_without_tax'];
$totalPriceTaxIncl = $totalPriceTaxExcl * $oldTaxMultiplier;
$unitPriceTaxExcl = $totalPriceTaxExcl / $quantity;