mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
fdc1a04db3
|
|
@ -132,13 +132,15 @@ class modReceiptPrinter extends DolibarrModules
|
|||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $langs;
|
||||
// Clean before activation
|
||||
$this->remove($options);
|
||||
$sql = array(
|
||||
"CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."printer_receipt (rowid integer AUTO_INCREMENT PRIMARY KEY, name varchar(128), fk_type integer, fk_profile integer, parameter varchar(128), entity integer) ENGINE=innodb;",
|
||||
"CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."printer_receipt_template (rowid integer AUTO_INCREMENT PRIMARY KEY, name varchar(128), template text, entity integer) ENGINE=innodb;",
|
||||
);
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."printer_receipt_template WHERE name = '".$langs->trans('Example')."';",
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."printer_receipt_template (name,template,entity) VALUES ('".$langs->trans('Example')."', '<dol_align_center>\r\n<dol_print_text><dol_value_mysoc_name>\r\n<dol_print_text><dol_value_mysoc_address>\r\n<dol_print_text><dol_value_mysoc_zip><dol_value_mysoc_town>\r\n<dol_line_feed>\r\n<dol_print_text>Facture <dol_value_object_ref>\r\n<dol_line_feed>\r\n<dol_align_left>\r\n<dol_print_object_lines>\r\n<dol_line_feed>\r\n<dol_print_object_tax>\r\n<dol_line_feed>\r\n<dol_print_object_total>\r\n<dol_line_feed>\r\n<dol_cut_paper_full>', 1);",
|
||||
);
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -826,6 +826,14 @@ foreach ($listofreferent as $key => $value)
|
|||
elseif (in_array($tablename, array('expensereport_det', 'don', 'projet_task', 'stock_mouvement', 'payment_salary'))) print $langs->trans("User");
|
||||
else print $langs->trans("ThirdParty");
|
||||
print '</td>';
|
||||
// Duration of intervention
|
||||
if($tablename == 'fichinter')
|
||||
{
|
||||
print '<td>';
|
||||
print $langs->trans("TotalDuration");
|
||||
$total_duration = 0;
|
||||
print '</td>';
|
||||
}
|
||||
// Amount HT
|
||||
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("AmountHT").'</td>';
|
||||
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("Amount").'</td>';
|
||||
|
|
@ -1024,6 +1032,15 @@ foreach ($listofreferent as $key => $value)
|
|||
}
|
||||
print '</td>';
|
||||
|
||||
// Add duration and store it in counter for fichinter
|
||||
if($tablename == 'fichinter')
|
||||
{
|
||||
print '<td>';
|
||||
print convertSecondToTime($element->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
$total_duration += $element->duration;
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Amount without tax
|
||||
$warning = '';
|
||||
if (empty($value['disableamount']))
|
||||
|
|
@ -1201,6 +1218,8 @@ foreach ($listofreferent as $key => $value)
|
|||
}
|
||||
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
|
||||
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
|
||||
// If fichinter add the total_duration
|
||||
if($tablename == 'fichinter') print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
|
||||
print '<td class="right">';
|
||||
if (empty($value['disableamount']))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user