[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/10: If card already used in accountancy, c
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 02/10: If card already used in accountancy, cannot changed the quickcode |
Date: |
Sun, 25 Feb 2024 13:17:42 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit 1c6fcf0561b027caff9c7b653c1a06f20aa529a5
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Feb 18 17:59:21 2024 +0100
If card already used in accountancy, cannot changed the quickcode
---
include/class/card_property.class.php | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/class/card_property.class.php
b/include/class/card_property.class.php
index 7a30159c7..58c7f73d0 100644
--- a/include/class/card_property.class.php
+++ b/include/class/card_property.class.php
@@ -494,11 +494,14 @@ class Card_Property
}
// Special traitement
- // quickcode
+ // quickcode , if already used in ledger , it cannot be changed
if ($value->ad_id==ATTR_DEF_QUICKCODE)
{
- $sql=sprintf("select update_quick_code(%d,'%s')", $jft_id,
sql_string($value->av_text));
- $p_fiche->cn->exec_sql($sql);
+ $used = $p_fiche->cn->get_value("select count(*) from jrnx
where j_qcode= $1",[$value->av_text]);
+ if ($used == 0) {
+ $sql=sprintf("select update_quick_code(%d,'%s')",
$jft_id, sql_string($value->av_text));
+ $p_fiche->cn->exec_sql($sql);
+ }
continue;
}
// name
- [Noalyss-commit] [noalyss] branch devel updated (910ae8b9f -> 39eb388b0), dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 02/10: If card already used in accountancy, cannot changed the quickcode,
dwm <=
- [Noalyss-commit] [noalyss] 06/10: Bug : verification ne fonctionne pas avec MY_REPORT=N, dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 05/10: FOLLOWUP : change destinataire et concerne, supprime filtre sur "concerne", dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 08/10: Code Improve : Extension , Fix : php8.1, dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 07/10: Saved search for accountancy replace filter by "Saved search", dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 01/10: PHP8.1 compatibility, dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 09/10: Merge, dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 10/10: Follow-Up : list with a filter, dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 03/10: QCODE : remove trigger update on jrnx, dwm, 2024/02/25
- [Noalyss-commit] [noalyss] 04/10: PHP8.1 compatibility, dwm, 2024/02/25