[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 302/323: Bug #0001562: Achat mémoriser égale
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 302/323: Bug #0001562: Achat mémoriser également 3 champs |
Date: |
Wed, 14 Mar 2018 17:39:08 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c8709f2d5c4955e2a01eb8999553174147088cc4
Author: Dany De Bontridder <address@hidden>
Date: Mon Mar 5 23:08:08 2018 +0100
Bug #0001562: Achat mémoriser également 3 champs
---
include/class/acc_ledger.class.php | 15 +++++++++++----
include/class/acc_payment.class.php | 10 +++++++---
include/compta_ach.inc.php | 6 +++++-
include/compta_ven.inc.php | 9 ++++++---
4 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index 6cb8dba..f6254b1 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -2396,15 +2396,22 @@ class Acc_Ledger extends jrn_def_sql
$Res=$this->db->alter_seq("s_jrn_pj".$p_jrn, $jrn_def_pj_seq);
}
}
-
- function input_paid($p_selected)
+ /**
+ * Create the section payment
+ * @param int $p_selected
+ * @param number $p_amount
+ * @param date $p_date or empty string
+ * @param string $p_comm or empty comm
+ * @return string
+ */
+ function input_paid($p_selected,$p_amount=0,$p_date="",$p_comm="")
{
$r='';
$r.='<div id="payment"> ';
- $r.='<h2> '._('Payement').' </h2>';
+ $r.='<h2> '._('Paiement').' </h2>';
$mp=new Acc_Payment($this->db);
$mp->set_parameter('ledger_source', $this->id);
- $r.=$mp->select($p_selected);
+ $r.=$mp->select($p_selected,$p_amount,$p_date,$p_comm);
$r.='</div>';
return $r;
}
diff --git a/include/class/acc_payment.class.php
b/include/class/acc_payment.class.php
index b24b006..4a655aa 100644
--- a/include/class/acc_payment.class.php
+++ b/include/class/acc_payment.class.php
@@ -280,9 +280,12 @@ class Acc_Payment
* \todo this class is used only for storage of the defined payment
method, not the payment itself,
* it must be moved to another class 'Operation_Payment'
*\param $p_selected if the id choose
+ *\param $p_date date of payment
+ *\param $p_amount amount already paid
+ *\param $p_comm label of payment
*\return html string
*/
- public function select($p_select)
+ public function select($p_select,$p_amount,$p_date,$p_comm)
{
$r='';
$array=$this->get_valide();
@@ -290,15 +293,16 @@ class Acc_Payment
if ( empty($array)==false ) {
$date_pay=new IDate('mp_date');
-
+ $date_pay->value=$p_date;
$r.=sprintf(_("Date %s"),
$date_pay->input());
$acompte=new INum('acompte');
- $acompte->value=0;
+ $acompte->value=$p_amount;
$r.=_(" Acompte à déduire");
$r.=$acompte->input();
$r.='<p>';
$e_comm_paiement=new IText('e_comm_paiement');
+ $e_comm_paiement->value=$p_comm;
$e_comm_paiement->table = 0;
$e_comm_paiement->setReadOnly(false);
$e_comm_paiement->size = 60;
diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php
index c44e185..825d8b3 100644
--- a/include/compta_ach.inc.php
+++ b/include/compta_ach.inc.php
@@ -256,6 +256,10 @@ echo '<p class="notice">'.$p_msg.'</p>';
try
{
$payment=$http->request("e_mp", "string",0);
+ $date_payment=$http->request("mp_date", "string","");
+ $comm_payment=$http->request("e_comm_paiement", "string","");
+ $acompte=$http->request("acompte", "string",0);
+
echo "<FORM class=\"print\"NAME=\"form_detail\" METHOD=\"POST\" >";
/* request for a predefined operation */
if (isset($_REQUEST['pre_def'])&&!isset($_POST['correct']) && !
isset($correct) )
@@ -282,7 +286,7 @@ try
echo HtmlInput::hidden("p_action", "ach");
echo HtmlInput::hidden("sa", "p");
echo '<div class="content">';
- echo $Ledger->input_paid($payment);
+ echo
$Ledger->input_paid($payment,$acompte,$date_payment,$comm_payment);
echo '</div>';
echo '<script>';
echo 'compute_all_ledger();';
diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php
index dbde101..d5109ea 100644
--- a/include/compta_ven.inc.php
+++ b/include/compta_ven.inc.php
@@ -276,7 +276,10 @@ echo '<p class="notice">'.$p_msg.'</p>';
try
{
$payment=$http->request("e_mp","string", 0);
-
+ $date_payment=$http->request("mp_date", "string","");
+ $comm_payment=$http->request("e_comm_paiement", "string","");
+ $acompte=$http->request("acompte", "string",0);
+
echo "<FORM class=\"print\" NAME=\"form_detail\" METHOD=\"POST\" >";
/* request for a predefined operation */
if (isset($_REQUEST['pre_def'])&&!isset($_POST['correct']) && !
isset($correct))
@@ -304,7 +307,7 @@ try
echo HtmlInput::hidden("sa", "p");
echo $Ledger->input($array);
echo '<div class="content">';
- echo $Ledger->input_paid($payment);
+ echo
$Ledger->input_paid($payment,$acompte,$date_payment,$comm_payment);
echo '</div>';
echo '<script>';
echo 'compute_all_ledger();';
@@ -318,7 +321,7 @@ try
echo $Ledger->input($array);
echo '<div class="content">';
- echo $Ledger->input_paid($payment);
+ echo
$Ledger->input_paid($payment,$acompte,$date_payment,$comm_payment);
echo '</div>';
echo '<script>';
echo 'compute_all_ledger();';
- [Noalyss-commit] [noalyss] 244/323: ajax_card : warning if there is no category of cards, (continued)
- [Noalyss-commit] [noalyss] 244/323: ajax_card : warning if there is no category of cards, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 267/323: TVA : fix when outside VEN or PURCHASE , the selecting box for VAT didn't work, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 275/323: CSS : Anchor go_up, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 240/323: Cosmétique, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 314/323: Merge Master, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 296/323: install plugin : cosmétique, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 289/323: task #0001548: BALANCE - décalage afficha résumé classes, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 239/323: Manage_Table : add sort on header column, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 298/323: Cosmetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 256/323: Tag : select list fixed, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 302/323: Bug #0001562: Achat mémoriser également 3 champs,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 273/323: CSS : table sortable no margin, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 313/323: CSS cosmetic : highlight, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 189/323: Hight password and default user, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 290/323: Bug #1549 : VERIFBIL empty card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 292/323: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 255/323: Tag : select list add a close button, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 286/323: CSS : selected menu, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 312/323: Task #0001526: Problème navigation - retour en haut de la fenêtre si flèches de navigation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 305/323: Task #0001563: check date paiement ACH, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 309/323: Limit to event with a reminder, Dany De Bontridder, 2018/03/14