cut long lines
This commit is contained in:
parent
263bd9cbc0
commit
a16b7bcda6
@ -294,7 +294,18 @@ if ($result && $action == "dl" && ! $error)
|
|||||||
|
|
||||||
dol_mkdir($dirfortmpfile);
|
dol_mkdir($dirfortmpfile);
|
||||||
|
|
||||||
$log=$langs->transnoentitiesnoconv("Type").','.$langs->transnoentitiesnoconv("Date").','.$langs->transnoentitiesnoconv("Ref").','.$langs->transnoentitiesnoconv("TotalHT").','.$langs->transnoentitiesnoconv("TotalTTC").','.$langs->transnoentitiesnoconv("TotalVAT").','.$langs->transnoentitiesnoconv("Paid").',filename,item_id,'.$langs->transnoentitiesnoconv("ThirdParty").','.$langs->transnoentitiesnoconv("Code").','.$langs->transnoentitiesnoconv("Country").','.$langs->transnoentitiesnoconv("VATIntra")."\n";
|
$log = $langs->transnoentitiesnoconv("Type");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("Date");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("Ref");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("TotalHT");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("TotalTTC");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("TotalVAT");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("Paid");
|
||||||
|
$log .= ',filename,item_id';
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("ThirdParty");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("Code");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("Country");
|
||||||
|
$log .= ',' . $langs->transnoentitiesnoconv("VATIntra")."\n";
|
||||||
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
|
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
|
||||||
|
|
||||||
dol_delete_file($zipname);
|
dol_delete_file($zipname);
|
||||||
@ -305,8 +316,20 @@ if ($result && $action == "dl" && ! $error)
|
|||||||
{
|
{
|
||||||
foreach ($filesarray as $key => $file)
|
foreach ($filesarray as $key => $file)
|
||||||
{
|
{
|
||||||
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
|
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]);
|
||||||
$log.=$file['item'].','.dol_print_date($file['date'], 'dayrfc').','.$file['ref'].','.$file['amount_ht'].','.$file['amount_ttc'].','.$file['amount_vat'].','.$file['paid'].','.$file["name"].','.$file['fk'].','.$file['thirdparty_name'].','.$file['thirdparty_code'].','.$file['country_code'].',"'.$file['vatnum'].'"'."\n";
|
$log .= $file['item'];
|
||||||
|
$log .= ',' . dol_print_date($file['date'], 'dayrfc');
|
||||||
|
$log .= ',' . $file['ref'];
|
||||||
|
$log .= ',' . $file['amount_ht'];
|
||||||
|
$log .= ',' . $file['amount_ttc'];
|
||||||
|
$log .= ',' . $file['amount_vat'];
|
||||||
|
$log .= ',' . $file['paid'];
|
||||||
|
$log .= ',' . $file["name"];
|
||||||
|
$log .= ',' . $file['fk'];
|
||||||
|
$log .= ',' . $file['thirdparty_name'];
|
||||||
|
$log .= ',' . $file['thirdparty_code'];
|
||||||
|
$log .= ',' . $file['country_code'];
|
||||||
|
$log .= ',"' . $file['vatnum'].'"'."\n";
|
||||||
}
|
}
|
||||||
$zip->addFromString('transactions.csv', $log);
|
$zip->addFromString('transactions.csv', $log);
|
||||||
$zip->close();
|
$zip->close();
|
||||||
|
|||||||
@ -2739,8 +2739,37 @@ class Facture extends CommonInvoice
|
|||||||
* @param double $pu_ht_devise Unit price in currency
|
* @param double $pu_ht_devise Unit price in currency
|
||||||
* @return int <0 if KO, Id of line if OK
|
* @return int <0 if KO, Id of line if OK
|
||||||
*/
|
*/
|
||||||
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = 0, $fk_remise_except = '', $price_base_type = 'HT', $pu_ttc = 0, $type = self::TYPE_STANDARD, $rang = -1, $special_code = 0, $origin = '', $origin_id = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $situation_percent = 100, $fk_prev_id = 0, $fk_unit = null, $pu_ht_devise = 0)
|
public function addline(
|
||||||
{
|
$desc,
|
||||||
|
$pu_ht,
|
||||||
|
$qty,
|
||||||
|
$txtva,
|
||||||
|
$txlocaltax1 = 0,
|
||||||
|
$txlocaltax2 = 0,
|
||||||
|
$fk_product = 0,
|
||||||
|
$remise_percent = 0,
|
||||||
|
$date_start = '',
|
||||||
|
$date_end = '',
|
||||||
|
$ventil = 0,
|
||||||
|
$info_bits = 0,
|
||||||
|
$fk_remise_except = '',
|
||||||
|
$price_base_type = 'HT',
|
||||||
|
$pu_ttc = 0,
|
||||||
|
$type = self::TYPE_STANDARD,
|
||||||
|
$rang = -1,
|
||||||
|
$special_code = 0,
|
||||||
|
$origin = '',
|
||||||
|
$origin_id = 0,
|
||||||
|
$fk_parent_line = 0,
|
||||||
|
$fk_fournprice = null,
|
||||||
|
$pa_ht = 0,
|
||||||
|
$label = '',
|
||||||
|
$array_options = 0,
|
||||||
|
$situation_percent = 100,
|
||||||
|
$fk_prev_id = 0,
|
||||||
|
$fk_unit = null,
|
||||||
|
$pu_ht_devise = 0
|
||||||
|
) {
|
||||||
// Deprecation warning
|
// Deprecation warning
|
||||||
if ($label) {
|
if ($label) {
|
||||||
dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING);
|
dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user