[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 10/39: Task #1532 : detail payment
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 10/39: Task #1532 : detail payment |
Date: |
Sat, 11 Jul 2020 13:20:37 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 577229bde99af14860cd294d865c1da795362570
Author: Dany De Bontridder <dany@alchimerys.be>
AuthorDate: Sun May 24 21:46:34 2020 +0200
Task #1532 : detail payment
---
include/class/acc_ledger_purchase.class.php | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index 5b6fe18..4365cfd 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -48,10 +48,12 @@ require_once NOALYSS_INCLUDE.'/class/stock_goods.class.php';
*/
class Acc_Ledger_Purchase extends Acc_Ledger
{
+ private $payment_operation; /*<! id of the payment , set in insert */
function __construct ($p_cn,$p_init)
{
$this->ledger_type='ACH';
parent::__construct($p_cn,$p_init);
+ $this->payment_operation=-1;
}
/*!\brief verify that the data are correct before inserting or confirming
*\param an array (usually $_POST)
@@ -878,7 +880,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$acc_pay->grpt=$acseq;
$acc_pay->jrn=$mp->get_parameter('ledger_target');
$acc_pay->periode=$tperiode;
- $acc_pay->type=($famount>=0)?'c':'d';
+ $acc_pay->type=($famount>=0)?'c':'d';
$acc_pay->insert_jrnx();
/* Insert supplier */
@@ -899,6 +901,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$acc_pay->desc=(!isset($e_comm_paiement) ||
strlen(trim($e_comm_paiement)) == 0) ?$e_comm:$e_comm_paiement;
$mp_jr_id=$acc_pay->insert_jrn();
+ $this->payment_operation=$mp_jr_id;
$acjrn->grpt_id=$acseq;
$acjrn->update_internal_code($acinternal);
// add an automatic PJ if ODS
@@ -1700,19 +1703,30 @@ EOF;
*/
if ( $e_mp!=0 && strlen (trim (${'e_mp_qcode_'.$e_mp})) != 0 )
{
+ $r.="<p>";
$r.=HtmlInput::hidden('e_mp_qcode_'.$e_mp,${'e_mp_qcode_'.$e_mp});
$r.=HtmlInput::hidden('acompte',$acompte);
- $r.=HtmlInput::hidden('e_comm_paiement',$e_comm_paiement);
- $r.=HtmlInput::hidden('mp_date',$mp_date);
+ $r.=HtmlInput::hidden('e_comm_paiement',$e_comm_paiement);
+ $r.=HtmlInput::hidden('mp_date',$mp_date);
/* needed for generating a invoice */
$r.=HtmlInput::hidden('qcode_benef', ${'e_mp_qcode_' . $e_mp});
$fname = new Fiche($this->db);
$fname->get_by_qcode(${'e_mp_qcode_' . $e_mp});
+ $detail_payment="";
+ // payment operation
+ if ($this->payment_operation != 1) {
+ $pay_internal=$this->db->get_value("select jr_internal from
jrn where jr_id=$1",
+ [$this->payment_operation]);
+
$detail_payment=HtmlInput::detail_op($this->payment_operation,$pay_internal);
+ }
$r.='<h2>' . _("Payé par")." " . ${'e_mp_qcode_' . $e_mp} .
- " " . $fname->getName() . '</h2> ' . '<p class="decale">'
. _('Déduction acompte ') . h($acompte) . '</p>' .
+ " " . $fname->getName() .$detail_payment. '</h2> ' ;
+ $r.='<p class="decale">' . _('Déduction acompte ') . h($acompte) .
'</p>' .
_('Libellé :') . h($e_comm_paiement) ;
$r.='<br>';
$r.='<br>';
+
+ $r.="</p>";
}
// check for upload piece
/*
- [Noalyss-commit] [noalyss] branch master updated (aa78d59 -> 3450d5f), Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 01/39: Pierre-François P. Ajout des parenthèses dans le calcul des champs numériques, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 05/39: Code : add connection by DSN, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 07/39: Remove DB connect with DSN, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 04/39: Fix bug in recover password Include sendmail.class.php fix bug sending email with file (compatibility PHP7), Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 10/39: Task #1532 : detail payment,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 11/39: #1583: [Cosmétique] Liste de catégories de fiches, espace avant les (), Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 08/39: #1798 French calendar, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 09/39: Compatility PHP7.4, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 02/39: Bug Database:lo_unlink unknown variable, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 06/39: Compatibility postgresql 12, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 03/39: Fix problem with redirect, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 12/39: CSS : new background-selected for a row in table, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 16/39: task #0001413: Duplication d'opération 2 - le retour, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 18/39: Task #1803 : export detail of an operation in PDF, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 14/39: task #0001801: CARD : mise à jour fiche , effacement et modification, Dany De Bontridder, 2020/07/11