[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 24/33: allow many-to-many lettering + cosmeti
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 24/33: allow many-to-many lettering + cosmetic |
Date: |
Thu, 18 Jul 2024 12:24:48 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit d810da721ef31ccf59ed673c86013bca8e44a54c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Jul 12 18:39:12 2024 +0200
allow many-to-many lettering + cosmetic
---
include/class/acc_ledger.class.php | 8 +++-----
include/class/acc_ledger_purchase.class.php | 4 +++-
include/class/acc_ledger_sale.class.php | 4 ++--
include/class/acc_reconciliation.class.php | 5 +++--
include/class/lettering.class.php | 15 +++++++++------
5 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index e3e5b9f99..17f6dd420 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -439,7 +439,7 @@ class Acc_Ledger extends jrn_def_sql
// Add a "concerned operation to bound these op.together
//
- $rec=new Acc_Reconciliation($this->db);
+ $rec=new Acc_Reconciliation($this->db);
$rec->set_jr_id($seq);
$rec->insert($this->jr_id);
@@ -449,13 +449,11 @@ class Acc_Ledger extends jrn_def_sql
throw (new Exception(__FILE__.__LINE__."SQL ERROR [ $sql ]"));
}
-
-
// the table stock must updated
// also in the stock table
$sql="delete from stock_goods where sg_id = any ( select sg_id
- from stock_goods natural join jrnx where
j_grpt=".$this->jr_grpt_id.")";
- $Res=$this->db->exec_sql($sql);
+ from stock_goods natural join jrnx where j_grpt=$1)";
+ $Res=$this->db->exec_sql($sql,array($this->jr_grpt_id));
if ($Res==false)
{
throw (new Exception(__FILE__.__LINE__."SQL ERROR [ $sql ]"));
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index c28e7eb9b..2eebca15e 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -1804,6 +1804,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger
</tr>
EOF;
if ($p_currency_code !=0) {
+ $sql_currency=new Currency_SQL($this->cn,0);
+ $iso_code=$sql_currency->getp("cr_code_iso");
$rate=_("Taux ");
$r.=<<<EOF
<tr class="highlight">
@@ -1818,7 +1820,7 @@ $r.=<<<EOF
{$rate} {$p_currency_rate}
</td>
<td class="num">
- {$tot_eur} EUR
+ {$tot_eur} {$iso_code}
</td>
</tr>
EOF;
diff --git a/include/class/acc_ledger_sale.class.php
b/include/class/acc_ledger_sale.class.php
index 75f27c89c..bfa9eb539 100644
--- a/include/class/acc_ledger_sale.class.php
+++ b/include/class/acc_ledger_sale.class.php
@@ -1064,9 +1064,9 @@ if ( $g_parameter->MY_TVA_USE=="Y") {
</td>
</tr>
EOF;
- $sql_currency=new Currency_SQL($this->cn,$p_currency_code);
- $iso_code=$sql_currency->getp("cr_code_iso");
if ($p_currency_code !=0) {
+ $sql_currency=new Currency_SQL($this->cn,0);
+ $iso_code=$sql_currency->getp("cr_code_iso");
$r.=<<<EOF
<tr class="highlight">
diff --git a/include/class/acc_reconciliation.class.php
b/include/class/acc_reconciliation.class.php
index 52d0f7abc..6b4cf8439 100644
--- a/include/class/acc_reconciliation.class.php
+++ b/include/class/acc_reconciliation.class.php
@@ -121,8 +121,9 @@ class Acc_Reconciliation
==0)
{
// Ok we can insert
- $Res=$this->db->exec_sql("insert into
jrn_rapt(jr_id,jra_concerned) values ".
- "(".$this->jr_id.",$jr_id2)");
+ $Res=$this->db->exec_sql("insert into
jrn_rapt(jr_id,jra_concerned) values ($1,$2)",
+ array($this->jr_id,$jr_id2)
+ );
// try to letter automatically same account from both operation
$this->auto_letter($jr_id2);
diff --git a/include/class/lettering.class.php
b/include/class/lettering.class.php
index 63e9a9a5c..579f1fac1 100644
--- a/include/class/lettering.class.php
+++ b/include/class/lettering.class.php
@@ -161,20 +161,23 @@ class Lettering
return;
// already linked
- if ($let1!=0&&$let2!=0&&$let1!=$let2)
+ /* if ($let1!=0&&$let2!=0&&$let1!=$let2)
return;
-
+*/
// none is linked
if ($let1==0&&$let2==0)
{
$jl_id=$this->db->get_next_seq("jnt_letter_jl_id_seq");
$this->db->exec_sql('insert into jnt_letter(jl_id) values($1)',
array($jl_id));
- }
- // one is linked but not the other
- if ($let1==0&&$let2!=0)
+ } elseif ($let1==0&&$let2!=0)
+ {
+ // one is linked but not the other
$jl_id=$let2;
- if ($let1!=0&&$let2==0)
+ }elseif ($let1!=0&&$let2==0) {
$jl_id=$let1;
+ } else {
+ throw new \Exception ("LET179 invalid");
+ }
/* insert */
if ($first=='t')
- [Noalyss-commit] [noalyss] 18/33: Fix Bug : tva_code not retrieve from search, (continued)
- [Noalyss-commit] [noalyss] 18/33: Fix Bug : tva_code not retrieve from search, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 17/33: PHPUNIT Acc_TVA : tva_code must contains at least one letter Acc_Ledger : input_new PDF_Anc_Acc_ListTest:testPdf_Card Fix bug sizIe, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 28/33: VEN - ACH fix default currency, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 32/33: test unit : pdf activity, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 33/33: Merge branch 'pre-stable' into unstable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 29/33: ODS : cosmetic detail operation, not aligned, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 07/33: remove euro symbole, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 16/33: cosmetic : improve appearance, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 19/33: ACH-13 : extourne also analytic, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 23/33: Bug : ven-3 duplicate does not work with currency : incorrect amount, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 24/33: allow many-to-many lettering + cosmetic,
dwm <=
- [Noalyss-commit] [noalyss] 20/33: Fix cosmetic : export Operation PDF: anc not printed properly, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 21/33: Fix Bug Cosmetic: appearance : color of menu1, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 03/33: IMPROVE #0002362: CCARDAT : Attribut de fiche Add control for element (choice) and allow to use VALUE(1, 1), (2, 2), dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 01/33: tag 9206, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 05/33: IMPROVE #0002362: CCARDAT : Attribut de fiche Add control for element (choice) and allow to use VALUE(1, 1), (2, 2), dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 26/33: PRINTJRN Cosmetic : 2 columns reversed, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 27/33: SQL : menu cosmetic, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 12/33: Menu not printable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 14/33: PHP8.2 Allow Dynamic Properties, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 13/33: PRINTTVA : display tva_code, dwm, 2024/07/18