diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 387df40122c..515736580f8 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -182,9 +182,9 @@ if (! empty($search_mvt_num)) { * Action */ if ($action == 'delbookkeeping') { - + $import_key = GETPOST('importkey', 'alpha'); - + if (! empty($import_key)) { $result = $object->deleteByImportkey($import_key); if ($result < 0) { @@ -194,9 +194,9 @@ if ($action == 'delbookkeeping') { exit(); } } elseif ($action == 'delbookkeepingyearconfirm') { - + $delyear = GETPOST('delyear', 'int'); - + if (! empty($delyear)) { $result = $object->deleteByYear($delyear); if ($result < 0) { @@ -206,34 +206,30 @@ if ($action == 'delbookkeeping') { exit(); } } elseif ($action == 'delmouvconfirm') { - + $mvt_num = GETPOST('mvt_num', 'int'); - + if (! empty($mvt_num)) { $result = $object->deleteMvtNum($mvt_num); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - // if (!empty($options)) { - // Header("Location: list.php?".urldecode($options)); - // } else { Header("Location: list.php"); - // } exit(); } } elseif ($action == 'export_csv') { $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; $journal = 'bookkepping'; - + include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; - + $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - + foreach ( $object->lines as $line ) { - + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { $sep = ";"; // Model Cegid Expert Export @@ -246,16 +242,9 @@ if ($action == 'delbookkeeping') { print price($line->montant) . $sep; print dol_trunc($line->label_compte, 32) . $sep; print $line->doc_ref . $sep; - - /*print $line->piece_num . $sep; - print length_accounta($line->code_tiers) . $sep; - print . $sep; - print price($line->debit) . $sep; - print price($line->credit) . $sep;*/ - print "\n"; } elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) { - + // Std export $date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE); print $date . $sep; @@ -264,15 +253,10 @@ if ($action == 'delbookkeeping') { print length_accounta($line->code_tiers) . $sep; print price($line->debit) . $sep; print price($line->credit) . $sep; - - /*print $line->piece_num . $sep; - print $line->label_compte . $sep; - print price($line->montant) . $sep; - print $line->sens . $sep;*/ print $line->code_journal . $sep; print "\n"; } elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 3) { - + // Coala export $date = dol_print_date($line->doc_date, '%d/%m/%Y'); print $date . $sep; @@ -285,23 +269,48 @@ if ($action == 'delbookkeeping') { print 'E' . $sep; print length_accountg($line->code_tiers) . $sep; print "\n"; + } elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 4) { + + // Bob50 + print $line->piece_num . $sep; + $date = dol_print_date($line->doc_date, '%d/%m/%Y'); + print $date . $sep; + + if (empty($line->code_tiers)) { + print 'G' . $sep; + print length_accounta($line->numero_compte) . $sep; + } else { + if (substr($line->numero_compte,0,3)=='411') { + print 'C' . $sep; + } + if (substr($line->numero_compte,0,3)=='401') { + print 'F' . $sep; + } + print length_accountg($line->code_tiers) . $sep; + + } + + print price($line->debit) . $sep; + print price($line->credit) . $sep; + print dol_trunc($line->label_compte, 32) . $sep; + print "\n"; } } -} +} /* * View */ else { - + $title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end); - + llxHeader('', $title_page); - + /* * List */ - + $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); @@ -309,78 +318,48 @@ else { setEventMessages($object->error, $object->errors, 'errors'); } } - + $result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - + if ($action == 'delmouv') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { - + $form_question = array (); $delyear = GETPOST('delyear'); - + if (empty($delyear)) { $delyear = dol_print_date(dol_now(), '%Y'); } $year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array'); - + $form_question['delyear'] = array ( 'name' => 'delyear', 'type' => 'select', 'label' => $langs->trans('DelYear'), 'values' => $year_array, - 'default' => $delyear + 'default' => $delyear ); - + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); print $formconfirm; } - + print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords); - - /*print '
'; - print ''; - print ''; - - print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey')); - - print '
'; - - print '
';*/ - + print '
'; print '
' . "\n"; print '
'; print ''; - // print '' . $langs->trans("Export") . ''; print '
'; - + print '
'; - - /*print '
'; - print $langs->trans('DateStart') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); - print $langs->trans('DateEnd') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); - print '
'; - print '
'; - print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; - print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, ''); - print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': '; - print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, ''); - print '
'; - print '
'; - print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; - print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1); - print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; - print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1); - print '
';*/ - + print ''; print ''; print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder); @@ -391,12 +370,10 @@ else { print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "bk_label_compte", "", $options, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder); - // print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder); - // print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder); print "\n"; - + print ''; print ''; print ''; @@ -404,61 +381,52 @@ else { print $langs->trans('From') . ': '; print $form->select_date($search_date_start, 'date_start', 0, 0, 1); print '
'; - print $langs->trans('to') . ': '; + print $langs->trans('To') . ': '; print $form->select_date($search_date_end, 'date_end', 0, 0, 1); - // print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1); print ''; print ''; print ''; - // print ''; print ''; - // print ''; - + print ''; print ''; print ''; - // print ''; - // print ''; print ''; print ''; - + print ''; - + $var = True; - + $total_debit = 0; $total_credit = 0; - + foreach ( $object->lines as $line ) { $var = ! $var; - + $total_debit += $line->debit; $total_credit += $line->credit; - + print ""; - + print ''; print ''; print ''; @@ -467,8 +435,6 @@ else { print ''; print ''; print ''; - // print ''; - // print ''; print ''; print ''; print "\n"; } - + print ''; print ''; print ''; print ''; print ''; - + print "
'; - // print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; print $langs->trans('From'); print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, ''); - // print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': '; print '
'; - print $langs->trans('to'); + print $langs->trans('To'); print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, ''); print '
'; - // print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; print $langs->trans('From'); print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1); - // print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; print '
'; - print $langs->trans('to'); + print $langs->trans('To'); print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1); print '
'; print ''; print '    '; print ''; print ' '; print ''; print '
' . $line->piece_num . '' . dol_print_date($line->doc_date, 'day') . '' . $line->doc_ref . '' . $line->label_compte . '' . price($line->debit) . '' . price($line->credit) . '' . price($line->montant) . '' . $line->sens . '' . $line->code_journal . ''; print '' . img_edit() . ' '; @@ -476,7 +442,7 @@ else { print '
'; @@ -487,10 +453,10 @@ else { print '
"; print '
'; - + llxFooter(); } diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index dfd52ec0f00..10640c1887a 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2013-2016 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -74,7 +74,6 @@ if (empty($search_date_start)) { $search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y')); $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y')); } - if ($sortorder == "") $sortorder = "ASC"; if ($sortfield == "") @@ -184,13 +183,13 @@ print ''; print '
'; print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; print $formventilation->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, ''); -print $langs->trans('to') . ' ' . $langs->trans('AccountAccounting') . ': '; +print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': '; print $formventilation->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, ''); print '
'; print '
'; print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; print $formventilation->select_auxaccount($search_code_tiers_start, 'search_code_tiers_start', 1); -print $langs->trans('to') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; +print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': '; print $formventilation->select_auxaccount($search_code_tiers_end, 'searchcode_tiers_end', 1); print '
'; print ""; @@ -257,9 +256,10 @@ print ''; -print ''; print "\n"; @@ -268,7 +268,7 @@ $var = True; foreach ( $object->lines as $line ) { $var = ! $var; - + print ""; print '' . "\n"; print '' . "\n"; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 4529fe08278..f275c6b9828 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -122,7 +122,7 @@ $paymentsalstatic = new PaymentSalary($db); // Get code of finance journal $bank_code_journal = new Account($db); $result = $bank_code_journal->fetch($id_bank_account); -$journal = $bank_code_journal->ref; +$journal = $bank_code_journal->accountancy_journal; dol_syslog("accountancy/journal/bankjournal.php", LOG_DEBUG); $result = $db->query($sql); @@ -414,8 +414,7 @@ if ($action == 'export_csv') { $companystatic = new Client($db); // Model Cegid Expert Export - if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) - { + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { $sep = ";"; foreach ( $tabpay as $key => $val ) { @@ -436,7 +435,7 @@ if ($action == 'export_csv') { print ($mt < 0 ? 'C' : 'D') . $sep; print ($mt <= 0 ? price(- $mt) : $mt) . $sep; print $val["type_payment"] . $sep; - print $val["ref"] . $sep; + print utf8_decode($val["ref"]) . $sep; print "\n"; } @@ -455,7 +454,7 @@ if ($action == 'export_csv') { print ($mt < 0 ? 'D' : 'C') . $sep; print ($mt <= 0 ? price(- $mt) : $mt) . $sep; print $val["type_payment"] . $sep; - print $val["ref"] . $sep; + print utf8_decode($val["ref"]) . $sep; print "\n"; } } @@ -468,7 +467,7 @@ if ($action == 'export_csv') { print ($mt < 0 ? 'D' : 'C') . $sep; print ($mt <= 0 ? price(- $mt) : $mt) . $sep; print $val["type_payment"] . $sep; - print $val["ref"] . $sep; + print utf8_decode($val["ref"]) . $sep; print "\n"; } } @@ -486,7 +485,12 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["type_payment"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . $langs->trans("Bank") . '"' . $sep; + if ($companystatic->name == '') { + print '"' . $langs->trans('Bank') . " - " . utf8_decode($val["ref"]) . '"' . $sep; + } else { + print '"' . $langs->trans("Bank") . ' - ' . utf8_decode($companystatic->name) . '"' . $sep; + } + // print '"' . $langs->trans("Bank") . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; print "\n"; @@ -499,7 +503,12 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["type_payment"] . '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; - print '"' . $companystatic->name . '"' . $sep; + // print '"' . $companystatic->name . '"' . $sep; + if ($companystatic->name == '') { + print '"' . $langs->trans('ThirdParty') . " - " . utf8_decode($val["ref"]) . '"' . $sep; + } else { + print '"' . $langs->trans('ThirdParty') . " - " . utf8_decode($companystatic->name) . '"' . $sep; + } print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'; print "\n"; @@ -510,7 +519,12 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . '"' . $sep; - print '"' . $langs->trans("Bank") . '"' . $sep; + // print '"' . $langs->trans("Bank") . '"' . $sep; + if ($companystatic->name == '') { + print '"' . $langs->trans("Bank") . ' - ' . utf8_decode($val["ref"]) . '"' . $sep; + } else { + print '"' . $langs->trans("Bank") . ' - ' . utf8_decode($companystatic->name) . '"' . $sep; + } print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'; print "\n"; @@ -587,7 +601,12 @@ else { print ""; print ""; print ""; - print ""; + // print ""; + if ($val['soclib'] == '') { + print ""; + } else { + print ""; + } print ""; print ""; print ""; @@ -601,8 +620,18 @@ else { print ""; print ""; print ""; + // print ""; + if (length_accounta($k) == '') { + print ""; + } else { print ""; - print ""; + } + // print ""; + if ($val['soclib'] == '') { + print ""; + } else { + print ""; + } print ""; print ""; print ""; @@ -615,7 +644,12 @@ else { print ""; print ""; print ""; - print ""; + // print ""; + if ($val['soclib'] == '') { + print ""; + } else { + print ""; + } print ""; print ""; print ""; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 7d9778f72b8..7794d5d330c 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -112,7 +112,7 @@ if ($result) { $num = $db->num_rows($result); // les variables $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"); - $cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : $langs->trans("CodeNotDef"); $tabfac = array (); $tabht = array (); @@ -136,6 +136,10 @@ if ($result) { $tabfac[$obj->rowid]["date"] = $obj->df; $tabfac[$obj->rowid]["ref"] = $obj->ref_supplier . ' (' . $obj->ref . ')'; + $tabfac[$obj->rowid]["refsologest"] = $obj->ref ; + $tabfac[$obj->rowid]["refsuppliersologest"] = $obj->ref_supplier ; + + $tabfac[$obj->rowid]["type"] = $obj->type; $tabfac[$obj->rowid]["description"] = $obj->description; $tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid; @@ -325,6 +329,14 @@ if ($action == 'export_csv') { } else { // Model Classic Export foreach ( $tabfac as $key => $val ) { + + $invoicestatic->id = $key; + $invoicestatic->ref = $val["ref"]; + $invoicestatic->ref = $val["refsologest"]; + $invoicestatic->refsupplier = $val["refsuppliersologest"]; + $invoicestatic->type = $val["type"]; + $invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32)); + $date = dol_print_date($db->jdate($val["date"]), 'day'); $companystatic->id = $tabcompany[$key]['id']; @@ -339,7 +351,8 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name,16)).' - ' . $val["refsuppliersologest"] . ' - ' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep; + //print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; print "\n"; @@ -351,7 +364,8 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . $langs->trans("VAT") . '"' . $sep; + //print '"' . $langs->trans("VAT") . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name,16)).' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; print "\n"; @@ -363,7 +377,8 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; - print '"' . utf8_decode($companystatic->name) . '"' . $sep; + //print '"' . utf8_decode($companystatic->name) . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name,16)).' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'; } @@ -434,6 +449,11 @@ if ($action == 'export_csv') { foreach ( $tabfac as $key => $val ) { $invoicestatic->id = $key; $invoicestatic->ref = $val["ref"]; + + $invoicestatic->ref = $val["refsologest"]; + $invoicestatic->refsupplier = $val["refsuppliersologest"]; + + $invoicestatic->type = $val["type"]; $invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32)); @@ -449,7 +469,10 @@ if ($action == 'export_csv') { print ""; print ""; print ""; - print ""; + $companystatic->id = $tabcompany[$key]['id']; + $companystatic->name = $tabcompany[$key]['name']; + print ""; + //print ""; print '"; print '"; print ""; @@ -461,7 +484,8 @@ if ($action == 'export_csv') { print ""; print ""; print ""; - print ""; + print "" ; + print ""; print '"; print '"; print ""; @@ -475,10 +499,11 @@ if ($action == 'export_csv') { print ""; $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; - print ""; + print ""; + print ""; + //print ""; print '"; print '"; } diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 5166d503b06..59853d5fa2e 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -40,10 +40,10 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; // Langs -$langs->load("commercial"); $langs->load("compta"); $langs->load("bills"); $langs->load("other"); +$langs->load("main"); $langs->load("accountancy"); $date_startmonth = GETPOST('date_startmonth'); @@ -361,7 +361,8 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; - print '"' . utf8_decode($companystatic->name) . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name,16)).' - ' . $companystatic->ref_client . ' - ' . $langs->trans("Code_tiers") . '"' . $sep; + //print '"' . utf8_decode($companystatic->name) . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; print "\n"; @@ -376,7 +377,8 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name,16)).' - '. utf8_decode ( dol_trunc($accountingaccount->label, 32)) . '"' . $sep; + //print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'; print "\n"; @@ -389,7 +391,8 @@ if ($action == 'export_csv') { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . $langs->trans("VAT") . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name,16)).' - '. $langs->trans("VAT") . '"' . $sep; + //print '"' . $langs->trans("VAT") . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'; print "\n"; @@ -474,8 +477,9 @@ if ($action == 'export_csv') { $companystatic->name = $tabcompany[$key]['name']; $companystatic->client = $tabcompany[$key]['code_client']; print ""; print ""; print ""; } @@ -491,7 +495,8 @@ if ($action == 'export_csv') { print ""; print ""; print ""; - print ""; + //print ""; + print ""; print ""; print ""; print ""; @@ -505,7 +510,8 @@ if ($action == 'export_csv') { print ""; print ""; print ""; - print ""; + print ""; + //print ""; print ""; print ""; print ""; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 788eaa32e88..ade361fdd51 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -217,7 +217,7 @@ if ($result) { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print '";
'; print ''; print ''; -$searchpitco=$form->showFilterAndCheckAddButtons(0); -print $searchpitco; +print ''; +print ''; +print ' '; +print ''; print '
' . $line->piece_num . '' . $line->doc_type . '" . $date . "" . $reflabel . "" . length_accountg($k) . "" . $langs->trans('Bank') . "" . $langs->trans('Bank') . "" . $langs->trans('Bank') . " - " . $val["ref"] . "" . $langs->trans("Bank") . " - " . $val['soclib'] . "" . $val["type_payment"] . "" . ($mt >= 0 ? price($mt) : '') . "" . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $val["soclib"] . "" . length_accounta($k) . "" . length_accounta($conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH) . "" . length_accounta($k) . "" . $langs->trans('ThirdParty') . " (" . $val['soclib'] . ")" . $langs->trans('ThirdParty') . " (" . $val['soclib'] . ")" . $langs->trans('ThirdParty') . " - " . $val["ref"] . "" . $langs->trans("ThirdParty") . ' - ' . $val['soclib'] . "" . $val["type_payment"] . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "" . $date . "" . $reflabel . "" . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . "" . $langs->trans('ThirdParty') . "" . $langs->trans('ThirdParty') . "" . $langs->trans('ThirdParty') . " - " . $val["ref"] . "" . $langs->trans("ThirdParty") . ' - ' . $val['soclib'] . " " . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "" . $accountingaccount->label . "" . $companystatic->getNomUrl(0, 'supplier', 16). ' - ' .$invoicestatic->refsupplier .' - '. $accountingaccount->label . "" . $accountingaccount->label . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "" . $langs->trans("VAT") . "" . length_accountg($k) . "" . $companystatic->getNomUrl(0, 'supplier', 16). ' - '.$invoicestatic->refsupplier .' - '. $langs->trans("VAT") . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $invoicestatic->getNomUrl(1) . "" . length_accounta($k); - print "" . $langs->trans("ThirdParty"); - print ' (' . $companystatic->getNomUrl(0, 'supplier', 16) . ')'; - print "" . length_accounta($k)."" . $companystatic->getNomUrl(0, 'supplier', 16). ' - '.$invoicestatic->refsupplier .' - '. $langs->trans("Code_tiers")."" . $langs->trans("ThirdParty"); + //print ' (' . $companystatic->getNomUrl(0, 'supplier', 16) . ')'; + //print "' . ($mt < 0 ? - price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "" . length_accounta($k); - print "" . $langs->trans("ThirdParty"); - print ' (' . $companystatic->getNomUrl(0, 'customer', 16) . ')'; + //print "" . $langs->trans("ThirdParty"); + //print ' (' . $companystatic->getNomUrl(0, 'customer', 16) . ')'; + print "" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref_client . ' - ' . $langs->trans("Code_tiers"). "" . ($mt >= 0 ? price($mt) : '') . "" . ($mt < 0 ? price(- $mt) : '') . "" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "" . $accountingaccount->label . "" . $accountingaccount->label . "" . $companystatic->getNomUrl(0, 'customer', 16). ' - ' . $invoicestatic->ref_client . ' - ' . utf8_decode ( utf8_decode ( $accountingaccount->label)) . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "" . $langs->trans("VAT") . "" . $companystatic->getNomUrl(0, 'customer', 16). ' - ' . $invoicestatic->ref_client .' - '. $langs->trans("VAT") . "" . $langs->trans("VAT") . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "
%% '; @@ -233,7 +233,7 @@ if ($result) { while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); $var = ! $var; - $codeCompta = $objp->account_number . ' ' . $objp->label; + $codeCompta = $objp->account_number . ' - ' . $objp->label; print "