mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Bugfixes presta, support for project specific number ranges
This commit is contained in:
parent
100024391d
commit
bcf2544735
@ -29440,7 +29440,7 @@ function Firmendaten($field,$projekt="")
|
||||
$process_lock = $this->app->erp->ProzessLock("erpapi_getnextnummer");
|
||||
|
||||
$eigenernummernkreis = $this->app->DB->Select("SELECT eigenernummernkreis FROM projekt WHERE id='$projekt' LIMIT 1");
|
||||
$newbelegnr = '';
|
||||
$belegnr = '';
|
||||
if($eigenernummernkreis=='1')
|
||||
{
|
||||
$allowedtypes = ['angebot', 'auftrag', 'rechnung', 'lieferschein', 'arbeitsnachweis', 'reisekosten',
|
||||
@ -29449,13 +29449,13 @@ function Firmendaten($field,$projekt="")
|
||||
'retoure', 'verbindlichkeit', 'goodspostingdocument', 'receiptdocument'];
|
||||
|
||||
$dbfield = "next_$type";
|
||||
$dbvalue = $this->app->DB->Select("SELECT $dbfield FROM projekt WHERE id='$projekt' LIMIT 1");
|
||||
if (!empty($dbvalue)) {
|
||||
$belegnr = $this->app->DB->Select("SELECT $dbfield FROM projekt WHERE id='$projekt' LIMIT 1");
|
||||
if (!empty($belegnr)) {
|
||||
$newbelegnr = $this->CalcNextNummer($dbvalue);
|
||||
$this->app->DB->Update("UPDATE projekt SET $dbfield='$newbelegnr' WHERE id='$projekt' LIMIT 1");
|
||||
}
|
||||
}
|
||||
if (empty($newbelegnr)) {
|
||||
if (empty($belegnr)) {
|
||||
// naechste
|
||||
switch($type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user