[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 76/219: Extourne : correct reverse operation
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 76/219: Extourne : correct reverse operation for autoliquidation |
Date: |
Mon, 18 Dec 2017 13:22:41 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 0fdc4fa711286d1fbde5cf46ed0d61da067c533f
Author: Dany De Bontridder <address@hidden>
Date: Tue Oct 10 13:46:33 2017 +0200
Extourne : correct reverse operation for autoliquidation
---
include/ajax/ajax_ledger.php | 12 ++++--------
include/class/acc_ledger.class.php | 8 ++++----
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/include/ajax/ajax_ledger.php b/include/ajax/ajax_ledger.php
index c5f9067..ed2de19 100644
--- a/include/ajax/ajax_ledger.php
+++ b/include/ajax/ajax_ledger.php
@@ -46,12 +46,7 @@ $http=new HttpInput();
/**
* Check if we receive the needed data (jr_id...)
*/
-if ( ! isset ($_REQUEST['act'])|| ! isset ($_REQUEST['jr_id'])
- || ! isset ($_REQUEST['div']))
- {
- exit();
- }
- global $g_user,$cn,$g_parameter;
+global $g_user,$cn,$g_parameter;
mb_internal_encoding("UTF-8");
try
@@ -559,10 +554,11 @@ case 'reverseop':
ob_start();
try
{
+ $ext_date=$http->request("ext_date","date");
$cn->start();
$oLedger=new Acc_Ledger($cn,$ledger);
- $oLedger->jr_id=$_REQUEST['jr_id'];
- $oLedger->reverse($_REQUEST['ext_date']);
+ $oLedger->jr_id=$jr_id;
+ $oLedger->reverse($ext_date);
$cn->commit();
echo _("Opération extournée");
}
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index e5ba145..5c40bc4 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -264,9 +264,9 @@ class Acc_Ledger extends jrn_def_sql
// reverse in QUANT_SOLD
$Res = $this->db->exec_sql("INSERT INTO
quant_sold(
qs_internal, qs_fiche, qs_quantite,
qs_price, qs_vat,
- qs_vat_code, qs_client, qs_valid, j_id)
+ qs_vat_code, qs_client, qs_valid,
j_id,qs_vat_sided,qs_unit)
SELECT $1, qs_fiche, qs_quantite*(-1),
qs_price*(-1), qs_vat*(-1),
- qs_vat_code, qs_client, qs_valid, $2
+ qs_vat_code, qs_client, qs_valid,
$2,qs_vat_sided*(-1),qs_unit*(-1)
FROM quant_sold where j_id=$3",
array($p_internal, $j_id, $row));
if ($Res == false)
@@ -274,10 +274,10 @@ class Acc_Ledger extends jrn_def_sql
$Res = $this->db->exec_sql("INSERT INTO
quant_purchase(
qp_internal, j_id, qp_fiche, qp_quantite,
qp_price, qp_vat,
qp_vat_code, qp_nd_amount, qp_nd_tva,
qp_nd_tva_recup, qp_supplier,
- qp_valid, qp_dep_priv)
+ qp_valid,
qp_dep_priv,qp_vat_sided,qp_unit)
SELECT $1, $2, qp_fiche,
qp_quantite*(-1), qp_price*(-1), qp_vat*(-1),
qp_vat_code, qp_nd_amount*(-1),
qp_nd_tva*(-1), qp_nd_tva_recup*(-1), qp_supplier,
- qp_valid, qp_dep_priv*(-1)
+ qp_valid,
qp_dep_priv*(-1),qp_vat_sided*(-1),qp_unit*(-1)
FROM quant_purchase where j_id=$3",
array($p_internal, $j_id, $row));
if ($Res == false)
- [Noalyss-commit] [noalyss] 08/219: profil : CFGPRO , correct, (continued)
- [Noalyss-commit] [noalyss] 08/219: profil : CFGPRO , correct, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 11/219: Infobulle : esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 73/219: Esthetic : History , improve place of button, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 184/219: Icon move / fix Correct button_anchor to avoid the message "javascript:void(0)", Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 43/219: Add the icon for modify, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 12/219: Infobulle : warning : esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 126/219: Esthetic : align text, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 113/219: Améliore esthétique, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 106/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 59/219: ManageTable : Correct bug for the sort, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 76/219: Extourne : correct reverse operation for autoliquidation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 135/219: Template operation : message if there is no template, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 192/219: Select_box : add a new type of value and fix a problem with the position of the div, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 112/219: Task #0001481: Encodage Vente, Achat, Fin ou OD Task #0001485: possibilité de clouer une fenetre, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 125/219: Rewriting : Use of Noalyss_CSV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 175/219: Change autocomplete and adapt Icard setWidth is false + indicator icon for ICard, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 81/219: PRINTPOSTE : esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 121/219: correct js : getMessage instead of message, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 78/219: InPlace_Switch : add a supplemental javascript command, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 10/219: GESTION -> CUST, MANAGER, ADM ... esthetic move the name of the tiers to the right, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 50/219: task #0001467: Journaux VENTES - inversion D/C dans liste de catégorie de fiches, Dany De Bontridder, 2017/12/18