Your current DaDaBIK version
You are using DaDaBIK version 11.4-Elba enterprise, installed on 09.03.2022 (installation code: 1780462288396de6b1), the latest version of DaDaBIK is 11.4-Elba released on 28.02.2022You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.
System info
PHP Version: 7.3.27mysql version: 5.7.33-0ubuntu0.16.04.1
Web server: Apache
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36 OPR/84.0.4316.31
Hello,
please support me with this question, I wrote the below function, it calculates the invoice number. It works fine wenn I create a new entry in the
table rechnung, I can store it to the table and the value of the invoice number is available.
But when I go to edit form and store again, the $abo_nr (1000X) is cutting off. The field value is correctly shown, but its not stored in the database
edit form shows RE22-04-26-1000X why is the value 1000X deleted from my table
database stores only RE22-04-26-
Thank you very much and best regards
Manuel
function dadabik_rechnungsnummer ($params){
global $conn;
$where_value = $params['Abo_id'];
$sql = "SELECT abo_nummer FROM Abos WHERE ID = :where_value";
$res_prepare = prepare_db($conn, $sql);
$res_bind = bind_param_db($res_prepare, ':where_value', $where_value);
$res = execute_prepared_db($res_prepare,0);
$row = fetch_row_db($res_prepare);
$abo_nr = $row['abo_nummer'];
if ($params['ReDatum'] !== ' ' && !is_null ($params['ReDatum']) ){
$jahr = substr($params['ReDatum'], 2);
if ( $params['Type'] === 'Rechnung' )
<------>{ $rechnungsnummer = sprintf("RE%s-%s",$jahr,$abo_nr);}
else
<------>{$rechnungsnummer = sprintf("MA%s-%s",$jahr,$abo_nr);}
return $rechnungsnummer;}
else {return NULL;}
}