diff --git a/README b/README
index 5547d8570..b20ca8fa7 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
Si vous avez besoin d'aide pour l'installation
utilisez la mailing list
Pour souscrire ou faire des recherches
- aller à http://mail.nongnu.org/mailman/listinfo/phpcompta-support
+ aller à https://lists.nongnu.org/mailman/listinfo/noalyss-generale
diff --git a/html/export.php b/html/export.php
index 8f8bbfb4f..90b027955 100644
--- a/html/export.php
+++ b/html/export.php
@@ -43,7 +43,14 @@ if ( $action=='X' || ! isset($_GET['act']) || $g_user->check_print($_GET['act'])
exit();
}
// get file and execute it
-
- $prfile=$cn->get_value("select me_file from menu_ref where me_code=$1",array($_GET['act']));
+$action=HtmlInput::default_value_get('act', null);
+if ($action == null )
+{
+ die(_('Appel invalide'));
+}
+ $prfile=$cn->get_value("select me_file from menu_ref where me_code=$1",array($action));
+ if ( $prfile == "") {
+ die (_('Export impossible'));
+ }
require_once $prfile;
?>
\ No newline at end of file
diff --git a/html/js/infobulle.js b/html/js/infobulle.js
index 36015afd7..3aa510847 100644
--- a/html/js/infobulle.js
+++ b/html/js/infobulle.js
@@ -64,6 +64,8 @@ content[33]='le type vaut :
- ME pour Menu
- PR pour les impressi
content[34]='Cliquez sur le code AD pour ouvrir le menu dans un nouvel onglet';
content[35]='Cliquez sur le chemin pour ouvrir le menu';
content[36]='En utilisant les dates d\'échéance ou de paiement, seuls les journaux de type ACH et VEN seront utilisés ,vous excluez d\'office les autres journaux';
+content[37]='Les dates sont en format DD.MM.YYYY';
+
function showBulle(p_ctl){
d=document.getElementById('bulle');
d.innerHTML=content[p_ctl];
diff --git a/include/anc_great_ledger.inc.php b/include/anc_great_ledger.inc.php
index a21335589..a304d7e9b 100644
--- a/include/anc_great_ledger.inc.php
+++ b/include/anc_great_ledger.inc.php
@@ -3,17 +3,37 @@
//see licence.txt
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
-require_once('class_anc_grandlivre.php');
-$gl = new Anc_GrandLivre($cn);
-$gl->get_request();
-echo '';
-if (isset($_GET['result']))
+
+$result=HtmlInput::default_value_request('result',null);
+
+if ($result != null)
{
- echo $gl->show_button();
- echo $gl->display_html();
- echo $gl->show_button();
+ echo '';
+ echo _('Tout sélectionner')." ".ICheckBox::toggle_checkbox('export_pdf_bt1','export_anc_receipt_pdf');
+ echo '';
+ echo $grandLivre->show_button();
+ echo '';
+ echo $grandLivre->show_button();
}
?>
diff --git a/include/class_anc_grandlivre.php b/include/class_anc_grandlivre.php
index 28ff9bcf5..2a3d920b4 100644
--- a/include/class_anc_grandlivre.php
+++ b/include/class_anc_grandlivre.php
@@ -27,7 +27,8 @@ require_once 'class_impress.php';
class Anc_GrandLivre extends Anc_Print
{
- function set_sql_filter()
+
+ function set_sql_filter()
{
$sql="";
$and=" and ";
@@ -114,7 +115,28 @@ class Anc_GrandLivre extends Anc_Print
return $array;
}
+ /* !
+ * \brief Show the button to export in PDF all the receipt
+ *
+ * \param $p_string extra hidden value
+ * \return string with the button
+ */
+ function button_export_pdf($p_string = "")
+ {
+ $r = "";
+ $r.= HtmlInput::hidden("to", $this->to);
+ $r.= HtmlInput::hidden("from", $this->from);
+ $r.= HtmlInput::hidden("pa_id", $this->pa_id);
+ $r.= HtmlInput::hidden("from_poste", $this->from_poste);
+ $r.= HtmlInput::hidden("to_poste", $this->to_poste);
+ $r.= HtmlInput::hidden("act","PDF:AncReceipt");
+
+ $r.= $p_string;
+ $r.= dossier::hidden();
+ $r.=HtmlInput::submit('bt_receipt_anal_pdf', _("Export des pièces en PDF"));
+ return $r;
+ }
/*!
* \brief compute the html display
*
@@ -123,79 +145,102 @@ class Anc_GrandLivre extends Anc_Print
*/
function display_html()
- {
- $r="";
+ {
+ $r = "";
//---Html
- $array=$this->load();
- if ( is_array($array) == false )
+ $array = $this->load();
+ if (is_array($array) == false)
{
return $array;
-
}
- if ( empty($array) )
+ if (empty($array))
{
$r.= _("aucune donnée");
return $r;
}
$r.= '
';
- $ix=0;$prev='xx';$idx=0;
- $tot_deb=$tot_cred=0;
-
- foreach ( $array as $row )
- {
- if ($prev != $row['po_name'])
- {
- if ( $ix>0)
- {
- $r.='';
- $tot_solde=bcsub($tot_cred,$tot_deb);
- $sign=($tot_solde>0)?'C':'D';
- $r.=td('').td('').td('').td('').td('').td(nbm($tot_deb),' class="num"').td(nbm($tot_cred),' class="num"').td(nbm($tot_solde).$sign,' class="num"');
- }
- $r.='
'.''.''.h($row['po_name'].' '.$row['po_description']).' |
';
- $r.= ''.
- '| '._('Date').' | '.
- ''._('Poste').' | '.
- ''._('Quick_code').' | '.
- ''._('libelle').' | '.
- ''._('Pièce').' | '.
- ''._('Num.interne').' | '.
- ''._('Debit').' | '.
- ''._('Credit').' | '.
- '
';
+ $ix = 0;
+ $prev = 'xx';
+ $idx = 0;
+ $tot_deb = $tot_cred = 0;
- $tot_deb=$tot_cred=0;
- $prev=$row['po_name'];
- $ix++;
- }
- $class=($idx%2==0)?'even':'odd'; $idx++;
- $r.='';
- $detail=($row['jr_id'] != null)?HtmlInput::detail_op($row['jr_id'],$row['jr_internal']):'';
- $post_detail=($row['j_poste'] != null)?HtmlInput::history_account($row['j_poste'],$row['j_poste']):'';
- $card_detail=($row['f_id'] != null)?HtmlInput::history_card($row['f_id'],$row['qcode']):'';
- $amount_deb=($row['oa_debit']=='t')?$row['oa_amount']:0;
- $amount_cred=($row['oa_debit']=='f')?$row['oa_amount']:0;
- $tot_deb=bcadd($tot_deb,$amount_deb);
- $tot_cred=bcadd($tot_cred,$amount_cred);
+ foreach ($array as $row)
+ {
+ if ($prev != $row['po_name'])
+ {
+ if ($ix > 0)
+ {
+ $r.='
';
+ $tot_solde = bcsub($tot_cred, $tot_deb);
+ $sign = ($tot_solde > 0) ? 'C' : 'D';
+ $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num"');
+ }
+ $r.='
' . '' . '' . h($row['po_name'] . ' ' . $row['po_description']) . ' |
';
+ $r.= '' .
+ '| ' . ' | ' .
+ '' . _('Date') . ' | ' .
+ '' . _('Poste') . ' | ' .
+ '' . _('Quick_code') . ' | ' .
+ '' . _('Libellé') . ' | ' .
+ '' . _('Document') . ' | ' .
+ '' . _('Pièce') . ' | ' .
+ '' . _('Num.interne') . ' | ' .
+ '' . _('Debit') . ' | ' .
+ '' . _('Credit') . ' | ' .
+ '
';
+
+ $tot_deb = $tot_cred = 0;
+ $prev = $row['po_name'];
+ $ix++;
+ }
+ $class = ($idx % 2 == 0) ? 'even' : 'odd';
+ $idx++;
+ $r.='';
+ $detail = ($row['jr_id'] != null) ? HtmlInput::detail_op($row['jr_id'], $row['jr_internal']) : '';
+ $post_detail = ($row['j_poste'] != null) ? HtmlInput::history_account($row['j_poste'], $row['j_poste']) : '';
+ $card_detail = ($row['f_id'] != null) ? HtmlInput::history_card($row['f_id'], $row['qcode']) : '';
+ $amount_deb = ($row['oa_debit'] == 't') ? $row['oa_amount'] : 0;
+ $amount_cred = ($row['oa_debit'] == 'f') ? $row['oa_amount'] : 0;
+ $tot_deb = bcadd($tot_deb, $amount_deb);
+ $tot_cred = bcadd($tot_cred, $amount_cred);
+
+ /*
+ * Checked button
+ */
+ $str_ck = "";
+ $str_document = "";
+ if ($row['jr_id'] != null)
+ {
+ /*
+ * Get receipt info
+ */
+ $str_document = HtmlInput::show_receipt_document($row['jr_id']);
+ if ($str_document != "")
+ {
+ $ck = new ICheckBox('ck[]', $row['jr_id']);
+ $str_ck = $ck->input();
+ }
+ }
$r.=
- '| '.$row['oa_date'].' | '.
- td($post_detail).
- td($card_detail).
- // ''.h($row['oa_description']).' | '.
- td($row['jr_comment']).
- td($row['jr_pj_number']).
- ''.$detail.' | '.
- ''.nbm($amount_deb).' | '.
- ''.nbm($amount_cred)
- .' | ';
+ '' . $str_ck . ' | ' .
+ '' . $row['oa_date'] . ' | ' .
+ td($post_detail) .
+ td($card_detail) .
+ td($row['jr_comment']) .
+ '' . $str_document . ' | ' .
+ td($row['jr_pj_number']) .
+ '' . $detail . ' | ' .
+ '' . nbm($amount_deb) . ' | ' .
+ '' . nbm($amount_cred)
+ . ' | ';
$r.= '
';
}
- $r.='';
- $tot_solde=bcsub($tot_cred,$tot_deb);
- $sign=($tot_solde>0)?'C':'D';
- $r.=td('').td('').td('').td('').td('').td(nbm($tot_deb),' class="num"').td(nbm($tot_cred),' class="num"').td(nbm($tot_solde).$sign,' class="num"');
+ $r.='
';
+ $tot_solde = bcsub($tot_cred, $tot_deb);
+ $sign = ($tot_solde > 0) ? 'C' : 'D';
+ $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num"');
$r.= '
';
return $r;
@@ -212,19 +257,6 @@ class Anc_GrandLivre extends Anc_Print
function show_button($p_string="")
{
$r="";
- /* $r.= '';
-*/
$r.= '