From 626c75bbc1673faca3a6a1bcda4f4d41ae96e466 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Sun, 26 Nov 2023 12:46:42 +0100 Subject: [PATCH 01/13] verbindlichkeit initial --- www/pages/content/verbindlichkeit_list.tpl | 10 + www/pages/verbindlichkeit.php | 392 +++++++++++++++++++++ 2 files changed, 402 insertions(+) create mode 100644 www/pages/content/verbindlichkeit_list.tpl create mode 100644 www/pages/verbindlichkeit.php diff --git a/www/pages/content/verbindlichkeit_list.tpl b/www/pages/content/verbindlichkeit_list.tpl new file mode 100644 index 00000000..394c103a --- /dev/null +++ b/www/pages/content/verbindlichkeit_list.tpl @@ -0,0 +1,10 @@ +
+ +
+ [MESSAGE] + [TAB1] + [TAB1NEXT] +
+
diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php new file mode 100644 index 00000000..bcddb1f3 --- /dev/null +++ b/www/pages/verbindlichkeit.php @@ -0,0 +1,392 @@ +app = $app; + if ($intern) + return; + + $this->app->ActionHandlerInit($this); + $this->app->ActionHandler("list", "verbindlichkeit_list"); + $this->app->ActionHandler("create", "verbindlichkeit_edit"); // This automatically adds a "New" button + $this->app->ActionHandler("edit", "verbindlichkeit_edit"); + $this->app->ActionHandler("delete", "verbindlichkeit_delete"); + $this->app->DefaultActionHandler("list"); + $this->app->ActionHandlerListen($app); + } + + public function Install() { + /* Fill out manually later */ + } + + static function TableSearch(&$app, $name, $erlaubtevars) { + switch ($name) { + case "verbindlichkeit_list": + $allowed['verbindlichkeit_list'] = array('list'); + $heading = array('','','Belegnr','Adresse', 'Lieferant', 'RE-Nr', 'RE-Datum', 'Betrag (brutto)', 'Währung', 'Ziel','Skontoziel','Skonto','Monitor', 'Menü'); + $width = array('1%','1%','10%'); // Fill out manually later + + // columns that are aligned right (numbers etc) + // $alignright = array(4,5,6,7,8); + + $findcols = array( + 'v.id', + 'v.id', + 'v.id', + 'a.name', + 'a.lieferantennummer', + 'v.rechnung', + 'v.rechnungsdatum', + 'v.betrag', + 'v.waehrung', + 'v.zahlbarbis', + 'v.skontobis', + 'v.skonto', + 'v.status_beleg', + 'v.id' + ); + + $searchsql = array( + 'a.name', + 'a.lieferantennummer', + 'v.rechnung', + 'v.internebemerkung' + ); + + $defaultorder = 1; + $defaultorderdesc = 0; + $alignright = array(8); + + $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; + +// $moreinfo = true; // Allow drop down details +// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails +// $menucol = 11; // Set id col for moredata/menu + + $menu = "
" . "Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"> " . "Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\">" . "
"; + + $sql = "SELECT SQL_CALC_FOUND_ROWS + v.id, + $dropnbox, + v.belegnr, + a.name, + a.lieferantennummer, + v.rechnung, + ".$app->erp->FormatDate("v.rechnungsdatum").", + ".$app->erp->FormatMenge('v.betrag',2).", + v.waehrung, + ".$app->erp->FormatDate("v.zahlbarbis").", + IF(v.skonto <> 0,".$app->erp->FormatDate("v.skontobis").",''), + IF(v.skonto <> 0,CONCAT(".$app->erp->FormatMenge('v.skonto',0).",'%'),''), + ".$app->YUI->IconsSQLVerbindlichkeit().", + v.id FROM verbindlichkeit v + LEFT JOIN adresse a ON v.adresse = a.id + +"; + + $where = "1"; + $count = "SELECT count(DISTINCT id) FROM verbindlichkeit WHERE $where"; +// $groupby = ""; + + break; + } + + $erg = false; + + foreach ($erlaubtevars as $k => $v) { + if (isset($$v)) { + $erg[$v] = $$v; + } + } + return $erg; + } + + function verbindlichkeit_list() { + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Übersicht"); + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=create", "Neu anlegen"); + + $this->app->erp->MenuEintrag("index.php", "Zurück"); + + $this->app->YUI->TableSearch('TAB1', 'verbindlichkeit_list', "show", "", "", basename(__FILE__), __CLASS__); + $this->app->Tpl->Parse('PAGE', "verbindlichkeit_list.tpl"); + } + + public function verbindlichkeit_delete() { + $id = (int) $this->app->Secure->GetGET('id'); + + $this->app->DB->Delete("DELETE FROM `verbindlichkeit` WHERE `id` = '{$id}'"); + $this->app->Tpl->Set('MESSAGE', "
Der Eintrag wurde gelöscht.
"); + + $this->verbindlichkeit_list(); + } + + /* + * Edit verbindlichkeit item + * If id is empty, create a new one + */ + + function verbindlichkeit_edit() { + $id = $this->app->Secure->GetGET('id'); + + // Check if other users are editing this id + if($this->app->erp->DisableModul('artikel',$id)) + { + return; + } + + $this->app->Tpl->Set('ID', $id); + + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details"); + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht"); + $id = $this->app->Secure->GetGET('id'); + $input = $this->GetInput(); + $submit = $this->app->Secure->GetPOST('submit'); + + if (empty($id)) { + // New item + $id = 'NULL'; + } + + if ($submit != '') + { + + // Write to database + + // Add checks here + + // $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form? + + $columns = "id, "; + $values = "$id, "; + $update = ""; + + $fix = ""; + + foreach ($input as $key => $value) { + $columns = $columns.$fix.$key; + $values = $values.$fix."'".$value."'"; + $update = $update.$fix.$key." = '$value'"; + + $fix = ", "; + } + +// echo($columns."
"); +// echo($values."
"); +// echo($update."
"); + + $sql = "INSERT INTO verbindlichkeit (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update; + +// echo($sql); + + $this->app->DB->Update($sql); + + if ($id == 'NULL') { + $msg = $this->app->erp->base64_url_encode("
Das Element wurde erfolgreich angelegt.
"); + header("Location: index.php?module=verbindlichkeit&action=list&msg=$msg"); + } else { + $this->app->Tpl->Set('MESSAGE', "
Die Einstellungen wurden erfolgreich übernommen.
"); + } + } + + + // Load values again from database + $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; + $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS v.id, $dropnbox, v.belegnr, v.status_beleg, v.schreibschutz, v.rechnung, v.zahlbarbis, v.betrag, v.umsatzsteuer, v.ustid, v.summenormal, v.summeermaessigt, v.summesatz3, v.summesatz4, v.steuersatzname3, v.steuersatzname4, v.skonto, v.skontobis, v.skontofestsetzen, v.freigabe, v.freigabemitarbeiter, v.bestellung, v.adresse, v.projekt, v.teilprojekt, v.auftrag, v.status, v.bezahlt, v.kontoauszuege, v.firma, v.logdatei, v.bestellung1, v.bestellung1betrag, v.bestellung1bemerkung, v.bestellung1projekt, v.bestellung1kostenstelle, v.bestellung1auftrag, v.bestellung2, v.bestellung2betrag, v.bestellung2bemerkung, v.bestellung2kostenstelle, v.bestellung2auftrag, v.bestellung2projekt, v.bestellung3, v.bestellung3betrag, v.bestellung3bemerkung, v.bestellung3kostenstelle, v.bestellung3auftrag, v.bestellung3projekt, v.bestellung4, v.bestellung4betrag, v.bestellung4bemerkung, v.bestellung4kostenstelle, v.bestellung4auftrag, v.bestellung4projekt, v.bestellung5, v.bestellung5betrag, v.bestellung5bemerkung, v.bestellung5kostenstelle, v.bestellung5auftrag, v.bestellung5projekt, v.bestellung6, v.bestellung6betrag, v.bestellung6bemerkung, v.bestellung6kostenstelle, v.bestellung6auftrag, v.bestellung6projekt, v.bestellung7, v.bestellung7betrag, v.bestellung7bemerkung, v.bestellung7kostenstelle, v.bestellung7auftrag, v.bestellung7projekt, v.bestellung8, v.bestellung8betrag, v.bestellung8bemerkung, v.bestellung8kostenstelle, v.bestellung8auftrag, v.bestellung8projekt, v.bestellung9, v.bestellung9betrag, v.bestellung9bemerkung, v.bestellung9kostenstelle, v.bestellung9auftrag, v.bestellung9projekt, v.bestellung10, v.bestellung10betrag, v.bestellung10bemerkung, v.bestellung10kostenstelle, v.bestellung10auftrag, v.bestellung10projekt, v.bestellung11, v.bestellung11betrag, v.bestellung11bemerkung, v.bestellung11kostenstelle, v.bestellung11auftrag, v.bestellung11projekt, v.bestellung12, v.bestellung12betrag, v.bestellung12bemerkung, v.bestellung12projekt, v.bestellung12kostenstelle, v.bestellung12auftrag, v.bestellung13, v.bestellung13betrag, v.bestellung13bemerkung, v.bestellung13kostenstelle, v.bestellung13auftrag, v.bestellung13projekt, v.bestellung14, v.bestellung14betrag, v.bestellung14bemerkung, v.bestellung14kostenstelle, v.bestellung14auftrag, v.bestellung14projekt, v.bestellung15, v.bestellung15betrag, v.bestellung15bemerkung, v.bestellung15kostenstelle, v.bestellung15auftrag, v.bestellung15projekt, v.waehrung, v.zahlungsweise, v.eingangsdatum, v.buha_konto1, v.buha_belegfeld1, v.buha_betrag1, v.buha_konto2, v.buha_belegfeld2, v.buha_betrag2, v.buha_konto3, v.buha_belegfeld3, v.buha_betrag3, v.buha_konto4, v.buha_belegfeld4, v.buha_betrag4, v.buha_konto5, v.buha_belegfeld5, v.buha_betrag5, v.rechnungsdatum, v.rechnungsfreigabe, v.kostenstelle, v.beschreibung, v.sachkonto, v.art, v.verwendungszweck, v.dta_datei, v.frachtkosten, v.internebemerkung, v.ustnormal, v.ustermaessigt, v.uststuer3, v.uststuer4, v.betragbezahlt, v.bezahltam, v.klaerfall, v.klaergrund, v.skonto_erhalten, v.kurs, v.sprache, v.id FROM verbindlichkeit v"." WHERE id=$id"); + + foreach ($result[0] as $key => $value) { + $this->app->Tpl->Set(strtoupper($key), $value); + } + + /* + * Add displayed items later + * + + $this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email); + $this->app->Tpl->Add('EMAIL', $email); + $this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername); + + $this->app->YUI->AutoComplete("artikel", "artikelnummer"); + + */ + +// $this->SetInput($input); + $this->app->Tpl->Parse('PAGE', "verbindlichkeit_edit.tpl"); + } + + /** + * Get all paramters from html form and save into $input + */ + public function GetInput(): array { + $input = array(); + //$input['EMAIL'] = $this->app->Secure->GetPOST('email'); + + $input['belegnr'] = $this->app->Secure->GetPOST('belegnr'); + $input['status_beleg'] = $this->app->Secure->GetPOST('status_beleg'); + $input['schreibschutz'] = $this->app->Secure->GetPOST('schreibschutz'); + $input['rechnung'] = $this->app->Secure->GetPOST('rechnung'); + $input['zahlbarbis'] = $this->app->Secure->GetPOST('zahlbarbis'); + $input['betrag'] = $this->app->Secure->GetPOST('betrag'); + $input['umsatzsteuer'] = $this->app->Secure->GetPOST('umsatzsteuer'); + $input['ustid'] = $this->app->Secure->GetPOST('ustid'); + $input['summenormal'] = $this->app->Secure->GetPOST('summenormal'); + $input['summeermaessigt'] = $this->app->Secure->GetPOST('summeermaessigt'); + $input['summesatz3'] = $this->app->Secure->GetPOST('summesatz3'); + $input['summesatz4'] = $this->app->Secure->GetPOST('summesatz4'); + $input['steuersatzname3'] = $this->app->Secure->GetPOST('steuersatzname3'); + $input['steuersatzname4'] = $this->app->Secure->GetPOST('steuersatzname4'); + $input['skonto'] = $this->app->Secure->GetPOST('skonto'); + $input['skontobis'] = $this->app->Secure->GetPOST('skontobis'); + $input['skontofestsetzen'] = $this->app->Secure->GetPOST('skontofestsetzen'); + $input['freigabe'] = $this->app->Secure->GetPOST('freigabe'); + $input['freigabemitarbeiter'] = $this->app->Secure->GetPOST('freigabemitarbeiter'); + $input['bestellung'] = $this->app->Secure->GetPOST('bestellung'); + $input['adresse'] = $this->app->Secure->GetPOST('adresse'); + $input['projekt'] = $this->app->Secure->GetPOST('projekt'); + $input['teilprojekt'] = $this->app->Secure->GetPOST('teilprojekt'); + $input['auftrag'] = $this->app->Secure->GetPOST('auftrag'); + $input['status'] = $this->app->Secure->GetPOST('status'); + $input['bezahlt'] = $this->app->Secure->GetPOST('bezahlt'); + $input['kontoauszuege'] = $this->app->Secure->GetPOST('kontoauszuege'); + $input['firma'] = $this->app->Secure->GetPOST('firma'); + $input['logdatei'] = $this->app->Secure->GetPOST('logdatei'); + $input['bestellung1'] = $this->app->Secure->GetPOST('bestellung1'); + $input['bestellung1betrag'] = $this->app->Secure->GetPOST('bestellung1betrag'); + $input['bestellung1bemerkung'] = $this->app->Secure->GetPOST('bestellung1bemerkung'); + $input['bestellung1projekt'] = $this->app->Secure->GetPOST('bestellung1projekt'); + $input['bestellung1kostenstelle'] = $this->app->Secure->GetPOST('bestellung1kostenstelle'); + $input['bestellung1auftrag'] = $this->app->Secure->GetPOST('bestellung1auftrag'); + $input['bestellung2'] = $this->app->Secure->GetPOST('bestellung2'); + $input['bestellung2betrag'] = $this->app->Secure->GetPOST('bestellung2betrag'); + $input['bestellung2bemerkung'] = $this->app->Secure->GetPOST('bestellung2bemerkung'); + $input['bestellung2kostenstelle'] = $this->app->Secure->GetPOST('bestellung2kostenstelle'); + $input['bestellung2auftrag'] = $this->app->Secure->GetPOST('bestellung2auftrag'); + $input['bestellung2projekt'] = $this->app->Secure->GetPOST('bestellung2projekt'); + $input['bestellung3'] = $this->app->Secure->GetPOST('bestellung3'); + $input['bestellung3betrag'] = $this->app->Secure->GetPOST('bestellung3betrag'); + $input['bestellung3bemerkung'] = $this->app->Secure->GetPOST('bestellung3bemerkung'); + $input['bestellung3kostenstelle'] = $this->app->Secure->GetPOST('bestellung3kostenstelle'); + $input['bestellung3auftrag'] = $this->app->Secure->GetPOST('bestellung3auftrag'); + $input['bestellung3projekt'] = $this->app->Secure->GetPOST('bestellung3projekt'); + $input['bestellung4'] = $this->app->Secure->GetPOST('bestellung4'); + $input['bestellung4betrag'] = $this->app->Secure->GetPOST('bestellung4betrag'); + $input['bestellung4bemerkung'] = $this->app->Secure->GetPOST('bestellung4bemerkung'); + $input['bestellung4kostenstelle'] = $this->app->Secure->GetPOST('bestellung4kostenstelle'); + $input['bestellung4auftrag'] = $this->app->Secure->GetPOST('bestellung4auftrag'); + $input['bestellung4projekt'] = $this->app->Secure->GetPOST('bestellung4projekt'); + $input['bestellung5'] = $this->app->Secure->GetPOST('bestellung5'); + $input['bestellung5betrag'] = $this->app->Secure->GetPOST('bestellung5betrag'); + $input['bestellung5bemerkung'] = $this->app->Secure->GetPOST('bestellung5bemerkung'); + $input['bestellung5kostenstelle'] = $this->app->Secure->GetPOST('bestellung5kostenstelle'); + $input['bestellung5auftrag'] = $this->app->Secure->GetPOST('bestellung5auftrag'); + $input['bestellung5projekt'] = $this->app->Secure->GetPOST('bestellung5projekt'); + $input['bestellung6'] = $this->app->Secure->GetPOST('bestellung6'); + $input['bestellung6betrag'] = $this->app->Secure->GetPOST('bestellung6betrag'); + $input['bestellung6bemerkung'] = $this->app->Secure->GetPOST('bestellung6bemerkung'); + $input['bestellung6kostenstelle'] = $this->app->Secure->GetPOST('bestellung6kostenstelle'); + $input['bestellung6auftrag'] = $this->app->Secure->GetPOST('bestellung6auftrag'); + $input['bestellung6projekt'] = $this->app->Secure->GetPOST('bestellung6projekt'); + $input['bestellung7'] = $this->app->Secure->GetPOST('bestellung7'); + $input['bestellung7betrag'] = $this->app->Secure->GetPOST('bestellung7betrag'); + $input['bestellung7bemerkung'] = $this->app->Secure->GetPOST('bestellung7bemerkung'); + $input['bestellung7kostenstelle'] = $this->app->Secure->GetPOST('bestellung7kostenstelle'); + $input['bestellung7auftrag'] = $this->app->Secure->GetPOST('bestellung7auftrag'); + $input['bestellung7projekt'] = $this->app->Secure->GetPOST('bestellung7projekt'); + $input['bestellung8'] = $this->app->Secure->GetPOST('bestellung8'); + $input['bestellung8betrag'] = $this->app->Secure->GetPOST('bestellung8betrag'); + $input['bestellung8bemerkung'] = $this->app->Secure->GetPOST('bestellung8bemerkung'); + $input['bestellung8kostenstelle'] = $this->app->Secure->GetPOST('bestellung8kostenstelle'); + $input['bestellung8auftrag'] = $this->app->Secure->GetPOST('bestellung8auftrag'); + $input['bestellung8projekt'] = $this->app->Secure->GetPOST('bestellung8projekt'); + $input['bestellung9'] = $this->app->Secure->GetPOST('bestellung9'); + $input['bestellung9betrag'] = $this->app->Secure->GetPOST('bestellung9betrag'); + $input['bestellung9bemerkung'] = $this->app->Secure->GetPOST('bestellung9bemerkung'); + $input['bestellung9kostenstelle'] = $this->app->Secure->GetPOST('bestellung9kostenstelle'); + $input['bestellung9auftrag'] = $this->app->Secure->GetPOST('bestellung9auftrag'); + $input['bestellung9projekt'] = $this->app->Secure->GetPOST('bestellung9projekt'); + $input['bestellung10'] = $this->app->Secure->GetPOST('bestellung10'); + $input['bestellung10betrag'] = $this->app->Secure->GetPOST('bestellung10betrag'); + $input['bestellung10bemerkung'] = $this->app->Secure->GetPOST('bestellung10bemerkung'); + $input['bestellung10kostenstelle'] = $this->app->Secure->GetPOST('bestellung10kostenstelle'); + $input['bestellung10auftrag'] = $this->app->Secure->GetPOST('bestellung10auftrag'); + $input['bestellung10projekt'] = $this->app->Secure->GetPOST('bestellung10projekt'); + $input['bestellung11'] = $this->app->Secure->GetPOST('bestellung11'); + $input['bestellung11betrag'] = $this->app->Secure->GetPOST('bestellung11betrag'); + $input['bestellung11bemerkung'] = $this->app->Secure->GetPOST('bestellung11bemerkung'); + $input['bestellung11kostenstelle'] = $this->app->Secure->GetPOST('bestellung11kostenstelle'); + $input['bestellung11auftrag'] = $this->app->Secure->GetPOST('bestellung11auftrag'); + $input['bestellung11projekt'] = $this->app->Secure->GetPOST('bestellung11projekt'); + $input['bestellung12'] = $this->app->Secure->GetPOST('bestellung12'); + $input['bestellung12betrag'] = $this->app->Secure->GetPOST('bestellung12betrag'); + $input['bestellung12bemerkung'] = $this->app->Secure->GetPOST('bestellung12bemerkung'); + $input['bestellung12projekt'] = $this->app->Secure->GetPOST('bestellung12projekt'); + $input['bestellung12kostenstelle'] = $this->app->Secure->GetPOST('bestellung12kostenstelle'); + $input['bestellung12auftrag'] = $this->app->Secure->GetPOST('bestellung12auftrag'); + $input['bestellung13'] = $this->app->Secure->GetPOST('bestellung13'); + $input['bestellung13betrag'] = $this->app->Secure->GetPOST('bestellung13betrag'); + $input['bestellung13bemerkung'] = $this->app->Secure->GetPOST('bestellung13bemerkung'); + $input['bestellung13kostenstelle'] = $this->app->Secure->GetPOST('bestellung13kostenstelle'); + $input['bestellung13auftrag'] = $this->app->Secure->GetPOST('bestellung13auftrag'); + $input['bestellung13projekt'] = $this->app->Secure->GetPOST('bestellung13projekt'); + $input['bestellung14'] = $this->app->Secure->GetPOST('bestellung14'); + $input['bestellung14betrag'] = $this->app->Secure->GetPOST('bestellung14betrag'); + $input['bestellung14bemerkung'] = $this->app->Secure->GetPOST('bestellung14bemerkung'); + $input['bestellung14kostenstelle'] = $this->app->Secure->GetPOST('bestellung14kostenstelle'); + $input['bestellung14auftrag'] = $this->app->Secure->GetPOST('bestellung14auftrag'); + $input['bestellung14projekt'] = $this->app->Secure->GetPOST('bestellung14projekt'); + $input['bestellung15'] = $this->app->Secure->GetPOST('bestellung15'); + $input['bestellung15betrag'] = $this->app->Secure->GetPOST('bestellung15betrag'); + $input['bestellung15bemerkung'] = $this->app->Secure->GetPOST('bestellung15bemerkung'); + $input['bestellung15kostenstelle'] = $this->app->Secure->GetPOST('bestellung15kostenstelle'); + $input['bestellung15auftrag'] = $this->app->Secure->GetPOST('bestellung15auftrag'); + $input['bestellung15projekt'] = $this->app->Secure->GetPOST('bestellung15projekt'); + $input['waehrung'] = $this->app->Secure->GetPOST('waehrung'); + $input['zahlungsweise'] = $this->app->Secure->GetPOST('zahlungsweise'); + $input['eingangsdatum'] = $this->app->Secure->GetPOST('eingangsdatum'); + $input['buha_konto1'] = $this->app->Secure->GetPOST('buha_konto1'); + $input['buha_belegfeld1'] = $this->app->Secure->GetPOST('buha_belegfeld1'); + $input['buha_betrag1'] = $this->app->Secure->GetPOST('buha_betrag1'); + $input['buha_konto2'] = $this->app->Secure->GetPOST('buha_konto2'); + $input['buha_belegfeld2'] = $this->app->Secure->GetPOST('buha_belegfeld2'); + $input['buha_betrag2'] = $this->app->Secure->GetPOST('buha_betrag2'); + $input['buha_konto3'] = $this->app->Secure->GetPOST('buha_konto3'); + $input['buha_belegfeld3'] = $this->app->Secure->GetPOST('buha_belegfeld3'); + $input['buha_betrag3'] = $this->app->Secure->GetPOST('buha_betrag3'); + $input['buha_konto4'] = $this->app->Secure->GetPOST('buha_konto4'); + $input['buha_belegfeld4'] = $this->app->Secure->GetPOST('buha_belegfeld4'); + $input['buha_betrag4'] = $this->app->Secure->GetPOST('buha_betrag4'); + $input['buha_konto5'] = $this->app->Secure->GetPOST('buha_konto5'); + $input['buha_belegfeld5'] = $this->app->Secure->GetPOST('buha_belegfeld5'); + $input['buha_betrag5'] = $this->app->Secure->GetPOST('buha_betrag5'); + $input['rechnungsdatum'] = $this->app->Secure->GetPOST('rechnungsdatum'); + $input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe'); + $input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle'); + $input['beschreibung'] = $this->app->Secure->GetPOST('beschreibung'); + $input['sachkonto'] = $this->app->Secure->GetPOST('sachkonto'); + $input['art'] = $this->app->Secure->GetPOST('art'); + $input['verwendungszweck'] = $this->app->Secure->GetPOST('verwendungszweck'); + $input['dta_datei'] = $this->app->Secure->GetPOST('dta_datei'); + $input['frachtkosten'] = $this->app->Secure->GetPOST('frachtkosten'); + $input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung'); + $input['ustnormal'] = $this->app->Secure->GetPOST('ustnormal'); + $input['ustermaessigt'] = $this->app->Secure->GetPOST('ustermaessigt'); + $input['uststuer3'] = $this->app->Secure->GetPOST('uststuer3'); + $input['uststuer4'] = $this->app->Secure->GetPOST('uststuer4'); + $input['betragbezahlt'] = $this->app->Secure->GetPOST('betragbezahlt'); + $input['bezahltam'] = $this->app->Secure->GetPOST('bezahltam'); + $input['klaerfall'] = $this->app->Secure->GetPOST('klaerfall'); + $input['klaergrund'] = $this->app->Secure->GetPOST('klaergrund'); + $input['skonto_erhalten'] = $this->app->Secure->GetPOST('skonto_erhalten'); + $input['kurs'] = $this->app->Secure->GetPOST('kurs'); + $input['sprache'] = $this->app->Secure->GetPOST('sprache'); + + + return $input; + } + } From bbf8b071c076a5f49b495701743da6b002e0ab2f Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Thu, 30 Nov 2023 19:39:11 +0100 Subject: [PATCH 02/13] Zwischenstand --- .../module_creator_php_template.txt | 13 +- www/lib/class.erpapi.php | 4 +- www/pages/_gen/adresse.php | 112 +++---- www/pages/ajax.php | 27 +- www/pages/content/verbindlichkeit_edit.tpl | 188 ++++++++++++ www/pages/verbindlichkeit.php | 281 +++++++----------- 6 files changed, 373 insertions(+), 252 deletions(-) create mode 100644 www/pages/content/verbindlichkeit_edit.tpl diff --git a/tools/module_creator/module_creator_php_template.txt b/tools/module_creator/module_creator_php_template.txt index 693723a0..51402e00 100644 --- a/tools/module_creator/module_creator_php_template.txt +++ b/tools/module_creator/module_creator_php_template.txt @@ -41,6 +41,10 @@ class PLACEHOLDER_MODULECLASSNAME { $defaultorder = 1; $defaultorderdesc = 0; + $aligncenter = array(); + $alignright = array(); + $numbercols = array(); + $sumcol = array(); $dropnbox = "PLACEHOLDER_DROPNBOX"; @@ -159,11 +163,17 @@ class PLACEHOLDER_MODULECLASSNAME { // Load values again from database $dropnbox = "PLACEHOLDER_DROPNBOX"; - $result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id"); + $result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id"); foreach ($result[0] as $key => $value) { $this->app->Tpl->Set(strtoupper($key), $value); } + + if (!empty($result)) { + $PLACEHOLDER_MODULENAME_from_db = $result[0]; + } else { + return; + } /* * Add displayed items later @@ -177,7 +187,6 @@ class PLACEHOLDER_MODULECLASSNAME { */ -// $this->SetInput($input); $this->app->Tpl->Parse('PAGE', "PLACEHOLDER_MODULENAME_edit.tpl"); } diff --git a/www/lib/class.erpapi.php b/www/lib/class.erpapi.php index 22adef90..b26ef436 100644 --- a/www/lib/class.erpapi.php +++ b/www/lib/class.erpapi.php @@ -2676,7 +2676,7 @@ public function NavigationHooks(&$menu) // @refactor in Dateien Modul function AnzahlDateien($objekt,$id) { - return $this->app->DB->Select("SELECT COUNT(id) FROM datei_stichwoerter WHERE objekt='$objekt' AND parameter='$id'"); + return $this->app->DB->Select("SELECT COUNT(ds.id) FROM datei_stichwoerter ds INNER JOIN datei d ON d.id = ds.datei WHERE ds.objekt='$objekt' AND ds.parameter='$id' AND d.geloescht <> 1"); } @@ -37298,7 +37298,7 @@ function Firmendaten($field,$projekt="") function GetDateiSubjektObjekt($subjekt,$objekt,$parameter) { - $dateien = $this->app->DB->SelectArr("SELECT datei FROM datei_stichwoerter WHERE subjekt LIKE '$subjekt' AND objekt LIKE '$objekt' AND parameter='$parameter' GROUP by datei"); + $dateien = $this->app->DB->SelectArr("SELECT datei FROM datei_stichwoerter INNER JOIN datei d on d.id = datei WHERE subjekt LIKE '$subjekt' AND objekt LIKE '$objekt' AND parameter='$parameter' AND d.geloescht <> 1 GROUP by datei"); if(empty($dateien)) { return null; } diff --git a/www/pages/_gen/adresse.php b/www/pages/_gen/adresse.php index 1dbb44b8..bf3fe3f9 100644 --- a/www/pages/_gen/adresse.php +++ b/www/pages/_gen/adresse.php @@ -1,59 +1,59 @@ -app=&$app; - $this->app->ActionHandlerInit($this); - - $this->app->ActionHandler("create","AdresseCreate"); - $this->app->ActionHandler("edit","AdresseEdit"); - $this->app->ActionHandler("copy","AdresseCopy"); - $this->app->ActionHandler("list","AdresseList"); - $this->app->ActionHandler("delete","AdresseDelete"); - - $this->app->Tpl->Set("HEADING","Adresse"); //$this->app->ActionHandlerListen($app); - } - - function AdresseCreate(){ - $this->app->Tpl->Set("HEADING","Adresse (Anlegen)"); - $this->app->PageBuilder->CreateGen("adresse_create.tpl"); - } - - function AdresseEdit(){ - $this->app->Tpl->Set("HEADING","Adresse (Bearbeiten)"); - $this->app->PageBuilder->CreateGen("adresse_edit.tpl"); - } - - function AdresseCopy(){ - $this->app->Tpl->Set("HEADING","Adresse (Kopieren)"); - $this->app->PageBuilder->CreateGen("adresse_copy.tpl"); - } - - function AdresseDelete(){ - $this->app->Tpl->Set("HEADING","Adresse (Löschen)"); - $this->app->PageBuilder->CreateGen("adresse_delete.tpl"); - } - - function AdresseList(){ - $this->app->Tpl->Set("HEADING","Adresse (Übersicht)"); - $this->app->PageBuilder->CreateGen("adresse_list.tpl"); - } - -} -?> \ No newline at end of file +app=&$app; + $this->app->ActionHandlerInit($this); + + $this->app->ActionHandler("create","AdresseCreate"); + $this->app->ActionHandler("edit","AdresseEdit"); + $this->app->ActionHandler("copy","AdresseCopy"); + $this->app->ActionHandler("list","AdresseList"); + $this->app->ActionHandler("delete","AdresseDelete"); + + $this->app->Tpl->Set("HEADING","Adresse"); //$this->app->ActionHandlerListen($app); + } + + function AdresseCreate(){ + $this->app->Tpl->Set("HEADING","Adresse (Anlegen)"); + $this->app->PageBuilder->CreateGen("adresse_create.tpl"); + } + + function AdresseEdit(){ + $this->app->Tpl->Set("HEADING","Adresse (Bearbeiten)"); + $this->app->PageBuilder->CreateGen("adresse_edit.tpl"); + } + + function AdresseCopy(){ + $this->app->Tpl->Set("HEADING","Adresse (Kopieren)"); + $this->app->PageBuilder->CreateGen("adresse_copy.tpl"); + } + + function AdresseDelete(){ + $this->app->Tpl->Set("HEADING","Adresse (Löschen)"); + $this->app->PageBuilder->CreateGen("adresse_delete.tpl"); + } + + function AdresseList(){ + $this->app->Tpl->Set("HEADING","Adresse (Übersicht)"); + $this->app->PageBuilder->CreateGen("adresse_list.tpl"); + } + +} +?> diff --git a/www/pages/ajax.php b/www/pages/ajax.php index 7c9ae905..6eda4979 100644 --- a/www/pages/ajax.php +++ b/www/pages/ajax.php @@ -674,6 +674,7 @@ class Ajax { echo $str; exit; } + if(!empty($datei['parameter'])) { if($cmd === 'projekt') { if(!$this->app->erp->UserProjektRecht($datei['parameter'])) { @@ -707,8 +708,7 @@ class Ajax { } } } - //Rechte prüfen - + //Rechte prüfen $userdata = isset($this->app->Conf->WFuserdata) ?$this->app->Conf->WFuserdata :(str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']).'../userdata'); @@ -746,34 +746,17 @@ class Ajax { exit; break; case 'application/pdf': - $str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.svg'); + $str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.png'); header('Content-type: image/png'); echo $str; exit; break; - default: - $str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.svg'); - if(substr(strtolower($datei['dateiname']),-4) === '.gif'){ - header('Content-type: image/gif'); - echo $str; - exit; - } - if(substr(strtolower($datei['dateiname']),-4) === '.png'){ - header('Content-type: image/png'); - echo $str; - exit; - } - if(substr(strtolower($datei['dateiname']),-4) === '.jpg' - || substr(strtolower($datei['dateiname']),-4) === 'jpeg'){ - header('Content-type: image/jpg'); - echo $str; - exit; - } + default: break; } } } - + if(file_exists($cachefolder.'/'.$datei['id'].'_100_100')) { $type = is_file($path.'/'.$datei['id'])? false : mime_content_type($path.'/'.$datei['id']); if($type === false) { diff --git a/www/pages/content/verbindlichkeit_edit.tpl b/www/pages/content/verbindlichkeit_edit.tpl new file mode 100644 index 00000000..5490fa4d --- /dev/null +++ b/www/pages/content/verbindlichkeit_edit.tpl @@ -0,0 +1,188 @@ +
+ + +
+ [MESSAGE] +
+ [FORMHANDLEREVENT] +
+
+
+
+
+
+
+
+
+ {|Verbindlichkeit [BELEGNR] Lf-Nr. [LIEFERANTENNUMMER]|} + [STATUSICONS] +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {|Adresse|}: + + +
+ {|Rechnung|}: + + +
+ {|Rechnungsdatum|}: + + +
+ {|Betrag|}: + + + +
+ {|Zahlbarbis|}: + + +
+ {|Projekt|}: + + +
+ {|Eingangsdatum|}: + + +
+ {|Zahlungsweise|}: + + +
+ {|Skonto|}: + + +
+ {|Skontobis|}: + + +
+ {|Kostenstelle|}: + + +
+ {|Sachkonto|}: + + +
+ {|Waren-/Leistungsprüfung (Einkauf)|}: + + +
+ {|Rechnungseingangsprüfung (Buchhaltung)|}: + + +
+ {|Bezahlt|}: + + +
+ {|Internebemerkung|}: + + +
+
+
+
+
+
+
+
+
+
+
+ {|Vorschau|} + [INLINEPDF] +
+
+
+
+
+ +
+
+
+ diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php index bcddb1f3..290b8231 100644 --- a/www/pages/verbindlichkeit.php +++ b/www/pages/verbindlichkeit.php @@ -18,6 +18,8 @@ class Verbindlichkeit { $this->app->ActionHandler("create", "verbindlichkeit_edit"); // This automatically adds a "New" button $this->app->ActionHandler("edit", "verbindlichkeit_edit"); $this->app->ActionHandler("delete", "verbindlichkeit_delete"); + $this->app->ActionHandler("dateien", "verbindlichkeit_dateien"); + $this->app->ActionHandler("inlinepdf", "verbindlichkeit_inlinepdf"); $this->app->DefaultActionHandler("list"); $this->app->ActionHandlerListen($app); } @@ -63,6 +65,7 @@ class Verbindlichkeit { $defaultorder = 1; $defaultorderdesc = 0; $alignright = array(8); + $sumcol = array(8); $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; @@ -143,9 +146,8 @@ class Verbindlichkeit { $this->app->Tpl->Set('ID', $id); - $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details"); - $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht"); - $id = $this->app->Secure->GetGET('id'); + $this->verbindlichkeit_menu($id); + $input = $this->GetInput(); $submit = $this->app->Secure->GetPOST('submit'); @@ -162,6 +164,7 @@ class Verbindlichkeit { // Add checks here // $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form? + $input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form? $columns = "id, "; $values = "$id, "; @@ -198,12 +201,17 @@ class Verbindlichkeit { // Load values again from database $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; - $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS v.id, $dropnbox, v.belegnr, v.status_beleg, v.schreibschutz, v.rechnung, v.zahlbarbis, v.betrag, v.umsatzsteuer, v.ustid, v.summenormal, v.summeermaessigt, v.summesatz3, v.summesatz4, v.steuersatzname3, v.steuersatzname4, v.skonto, v.skontobis, v.skontofestsetzen, v.freigabe, v.freigabemitarbeiter, v.bestellung, v.adresse, v.projekt, v.teilprojekt, v.auftrag, v.status, v.bezahlt, v.kontoauszuege, v.firma, v.logdatei, v.bestellung1, v.bestellung1betrag, v.bestellung1bemerkung, v.bestellung1projekt, v.bestellung1kostenstelle, v.bestellung1auftrag, v.bestellung2, v.bestellung2betrag, v.bestellung2bemerkung, v.bestellung2kostenstelle, v.bestellung2auftrag, v.bestellung2projekt, v.bestellung3, v.bestellung3betrag, v.bestellung3bemerkung, v.bestellung3kostenstelle, v.bestellung3auftrag, v.bestellung3projekt, v.bestellung4, v.bestellung4betrag, v.bestellung4bemerkung, v.bestellung4kostenstelle, v.bestellung4auftrag, v.bestellung4projekt, v.bestellung5, v.bestellung5betrag, v.bestellung5bemerkung, v.bestellung5kostenstelle, v.bestellung5auftrag, v.bestellung5projekt, v.bestellung6, v.bestellung6betrag, v.bestellung6bemerkung, v.bestellung6kostenstelle, v.bestellung6auftrag, v.bestellung6projekt, v.bestellung7, v.bestellung7betrag, v.bestellung7bemerkung, v.bestellung7kostenstelle, v.bestellung7auftrag, v.bestellung7projekt, v.bestellung8, v.bestellung8betrag, v.bestellung8bemerkung, v.bestellung8kostenstelle, v.bestellung8auftrag, v.bestellung8projekt, v.bestellung9, v.bestellung9betrag, v.bestellung9bemerkung, v.bestellung9kostenstelle, v.bestellung9auftrag, v.bestellung9projekt, v.bestellung10, v.bestellung10betrag, v.bestellung10bemerkung, v.bestellung10kostenstelle, v.bestellung10auftrag, v.bestellung10projekt, v.bestellung11, v.bestellung11betrag, v.bestellung11bemerkung, v.bestellung11kostenstelle, v.bestellung11auftrag, v.bestellung11projekt, v.bestellung12, v.bestellung12betrag, v.bestellung12bemerkung, v.bestellung12projekt, v.bestellung12kostenstelle, v.bestellung12auftrag, v.bestellung13, v.bestellung13betrag, v.bestellung13bemerkung, v.bestellung13kostenstelle, v.bestellung13auftrag, v.bestellung13projekt, v.bestellung14, v.bestellung14betrag, v.bestellung14bemerkung, v.bestellung14kostenstelle, v.bestellung14auftrag, v.bestellung14projekt, v.bestellung15, v.bestellung15betrag, v.bestellung15bemerkung, v.bestellung15kostenstelle, v.bestellung15auftrag, v.bestellung15projekt, v.waehrung, v.zahlungsweise, v.eingangsdatum, v.buha_konto1, v.buha_belegfeld1, v.buha_betrag1, v.buha_konto2, v.buha_belegfeld2, v.buha_betrag2, v.buha_konto3, v.buha_belegfeld3, v.buha_betrag3, v.buha_konto4, v.buha_belegfeld4, v.buha_betrag4, v.buha_konto5, v.buha_belegfeld5, v.buha_betrag5, v.rechnungsdatum, v.rechnungsfreigabe, v.kostenstelle, v.beschreibung, v.sachkonto, v.art, v.verwendungszweck, v.dta_datei, v.frachtkosten, v.internebemerkung, v.ustnormal, v.ustermaessigt, v.uststuer3, v.uststuer4, v.betragbezahlt, v.bezahltam, v.klaerfall, v.klaergrund, v.skonto_erhalten, v.kurs, v.sprache, v.id FROM verbindlichkeit v"." WHERE id=$id"); + $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS v.id, $dropnbox, v.belegnr, v.status_beleg, v.schreibschutz, v.rechnung, v.zahlbarbis, v.betrag, v.umsatzsteuer, v.ustid, v.summenormal, v.summeermaessigt, v.summesatz3, v.summesatz4, v.steuersatzname3, v.steuersatzname4, v.skonto, v.skontobis, v.skontofestsetzen, v.freigabe, v.freigabemitarbeiter, v.bestellung, v.adresse, v.projekt, v.teilprojekt, v.auftrag, v.status, v.bezahlt, v.kontoauszuege, v.firma, v.logdatei, v.bestellung1, v.bestellung1betrag, v.bestellung1bemerkung, v.bestellung1projekt, v.bestellung1kostenstelle, v.bestellung1auftrag, v.bestellung2, v.bestellung2betrag, v.bestellung2bemerkung, v.bestellung2kostenstelle, v.bestellung2auftrag, v.bestellung2projekt, v.bestellung3, v.bestellung3betrag, v.bestellung3bemerkung, v.bestellung3kostenstelle, v.bestellung3auftrag, v.bestellung3projekt, v.bestellung4, v.bestellung4betrag, v.bestellung4bemerkung, v.bestellung4kostenstelle, v.bestellung4auftrag, v.bestellung4projekt, v.bestellung5, v.bestellung5betrag, v.bestellung5bemerkung, v.bestellung5kostenstelle, v.bestellung5auftrag, v.bestellung5projekt, v.bestellung6, v.bestellung6betrag, v.bestellung6bemerkung, v.bestellung6kostenstelle, v.bestellung6auftrag, v.bestellung6projekt, v.bestellung7, v.bestellung7betrag, v.bestellung7bemerkung, v.bestellung7kostenstelle, v.bestellung7auftrag, v.bestellung7projekt, v.bestellung8, v.bestellung8betrag, v.bestellung8bemerkung, v.bestellung8kostenstelle, v.bestellung8auftrag, v.bestellung8projekt, v.bestellung9, v.bestellung9betrag, v.bestellung9bemerkung, v.bestellung9kostenstelle, v.bestellung9auftrag, v.bestellung9projekt, v.bestellung10, v.bestellung10betrag, v.bestellung10bemerkung, v.bestellung10kostenstelle, v.bestellung10auftrag, v.bestellung10projekt, v.bestellung11, v.bestellung11betrag, v.bestellung11bemerkung, v.bestellung11kostenstelle, v.bestellung11auftrag, v.bestellung11projekt, v.bestellung12, v.bestellung12betrag, v.bestellung12bemerkung, v.bestellung12projekt, v.bestellung12kostenstelle, v.bestellung12auftrag, v.bestellung13, v.bestellung13betrag, v.bestellung13bemerkung, v.bestellung13kostenstelle, v.bestellung13auftrag, v.bestellung13projekt, v.bestellung14, v.bestellung14betrag, v.bestellung14bemerkung, v.bestellung14kostenstelle, v.bestellung14auftrag, v.bestellung14projekt, v.bestellung15, v.bestellung15betrag, v.bestellung15bemerkung, v.bestellung15kostenstelle, v.bestellung15auftrag, v.bestellung15projekt, v.waehrung, v.zahlungsweise, v.eingangsdatum, v.buha_konto1, v.buha_belegfeld1, v.buha_betrag1, v.buha_konto2, v.buha_belegfeld2, v.buha_betrag2, v.buha_konto3, v.buha_belegfeld3, v.buha_betrag3, v.buha_konto4, v.buha_belegfeld4, v.buha_betrag4, v.buha_konto5, v.buha_belegfeld5, v.buha_betrag5, v.rechnungsdatum, v.rechnungsfreigabe, v.kostenstelle, v.beschreibung, v.sachkonto, v.art, v.verwendungszweck, v.dta_datei, v.frachtkosten, v.internebemerkung, v.ustnormal, v.ustermaessigt, v.uststuer3, v.uststuer4, v.betragbezahlt, v.bezahltam, v.klaerfall, v.klaergrund, v.skonto_erhalten, v.kurs, v.sprache, v.id, a.lieferantennummer, a.name AS adresse_name FROM verbindlichkeit v LEFT JOIN adresse a ON a.id = v.adresse"." WHERE v.id=$id"); foreach ($result[0] as $key => $value) { $this->app->Tpl->Set(strtoupper($key), $value); } - + + if (!empty($result[0])) { + $verbindlichkeit_from_db = $result[0]; + } + + /* * Add displayed items later * @@ -211,12 +219,29 @@ class Verbindlichkeit { $this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email); $this->app->Tpl->Add('EMAIL', $email); $this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername); - $this->app->YUI->AutoComplete("artikel", "artikelnummer"); */ -// $this->SetInput($input); + $this->app->Tpl->Add('KURZUEBERSCHRIFT2', $verbindlichkeit_from_db['adresse_name']." ".$verbindlichkeit_from_db['rechnung']); + + $sql = "SELECT " . $this->app->YUI->IconsSQLVerbindlichkeit() . " AS `icons` FROM verbindlichkeit v WHERE id=$id"; + $icons = $this->app->DB->SelectArr($sql); + $this->app->Tpl->Add('STATUSICONS', $icons[0]['icons']); + + $this->app->YUI->AutoComplete("adresse", "adresse"); + + $waehrungenselect = $this->app->erp->GetSelect($this->app->erp->GetWaehrung(), $verbindlichkeit_from_db['waehrung']); + $this->app->Tpl->Set('WAEHRUNG', $waehrungenselect); + + $this->app->Tpl->Set('ADRESSE_ID', $verbindlichkeit_from_db['adresse']); + + $this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display + + $file = urlencode("../../../../index.php?module=verbindlichkeit&action=inlinepdf&id=$id"); + $iframe = ""; + $this->app->Tpl->Set('INLINEPDF', $iframe); + $this->app->Tpl->Parse('PAGE', "verbindlichkeit_edit.tpl"); } @@ -225,168 +250,84 @@ class Verbindlichkeit { */ public function GetInput(): array { $input = array(); - //$input['EMAIL'] = $this->app->Secure->GetPOST('email'); - - $input['belegnr'] = $this->app->Secure->GetPOST('belegnr'); - $input['status_beleg'] = $this->app->Secure->GetPOST('status_beleg'); - $input['schreibschutz'] = $this->app->Secure->GetPOST('schreibschutz'); - $input['rechnung'] = $this->app->Secure->GetPOST('rechnung'); - $input['zahlbarbis'] = $this->app->Secure->GetPOST('zahlbarbis'); - $input['betrag'] = $this->app->Secure->GetPOST('betrag'); - $input['umsatzsteuer'] = $this->app->Secure->GetPOST('umsatzsteuer'); - $input['ustid'] = $this->app->Secure->GetPOST('ustid'); - $input['summenormal'] = $this->app->Secure->GetPOST('summenormal'); - $input['summeermaessigt'] = $this->app->Secure->GetPOST('summeermaessigt'); - $input['summesatz3'] = $this->app->Secure->GetPOST('summesatz3'); - $input['summesatz4'] = $this->app->Secure->GetPOST('summesatz4'); - $input['steuersatzname3'] = $this->app->Secure->GetPOST('steuersatzname3'); - $input['steuersatzname4'] = $this->app->Secure->GetPOST('steuersatzname4'); - $input['skonto'] = $this->app->Secure->GetPOST('skonto'); - $input['skontobis'] = $this->app->Secure->GetPOST('skontobis'); - $input['skontofestsetzen'] = $this->app->Secure->GetPOST('skontofestsetzen'); - $input['freigabe'] = $this->app->Secure->GetPOST('freigabe'); - $input['freigabemitarbeiter'] = $this->app->Secure->GetPOST('freigabemitarbeiter'); - $input['bestellung'] = $this->app->Secure->GetPOST('bestellung'); - $input['adresse'] = $this->app->Secure->GetPOST('adresse'); - $input['projekt'] = $this->app->Secure->GetPOST('projekt'); - $input['teilprojekt'] = $this->app->Secure->GetPOST('teilprojekt'); - $input['auftrag'] = $this->app->Secure->GetPOST('auftrag'); - $input['status'] = $this->app->Secure->GetPOST('status'); - $input['bezahlt'] = $this->app->Secure->GetPOST('bezahlt'); - $input['kontoauszuege'] = $this->app->Secure->GetPOST('kontoauszuege'); - $input['firma'] = $this->app->Secure->GetPOST('firma'); - $input['logdatei'] = $this->app->Secure->GetPOST('logdatei'); - $input['bestellung1'] = $this->app->Secure->GetPOST('bestellung1'); - $input['bestellung1betrag'] = $this->app->Secure->GetPOST('bestellung1betrag'); - $input['bestellung1bemerkung'] = $this->app->Secure->GetPOST('bestellung1bemerkung'); - $input['bestellung1projekt'] = $this->app->Secure->GetPOST('bestellung1projekt'); - $input['bestellung1kostenstelle'] = $this->app->Secure->GetPOST('bestellung1kostenstelle'); - $input['bestellung1auftrag'] = $this->app->Secure->GetPOST('bestellung1auftrag'); - $input['bestellung2'] = $this->app->Secure->GetPOST('bestellung2'); - $input['bestellung2betrag'] = $this->app->Secure->GetPOST('bestellung2betrag'); - $input['bestellung2bemerkung'] = $this->app->Secure->GetPOST('bestellung2bemerkung'); - $input['bestellung2kostenstelle'] = $this->app->Secure->GetPOST('bestellung2kostenstelle'); - $input['bestellung2auftrag'] = $this->app->Secure->GetPOST('bestellung2auftrag'); - $input['bestellung2projekt'] = $this->app->Secure->GetPOST('bestellung2projekt'); - $input['bestellung3'] = $this->app->Secure->GetPOST('bestellung3'); - $input['bestellung3betrag'] = $this->app->Secure->GetPOST('bestellung3betrag'); - $input['bestellung3bemerkung'] = $this->app->Secure->GetPOST('bestellung3bemerkung'); - $input['bestellung3kostenstelle'] = $this->app->Secure->GetPOST('bestellung3kostenstelle'); - $input['bestellung3auftrag'] = $this->app->Secure->GetPOST('bestellung3auftrag'); - $input['bestellung3projekt'] = $this->app->Secure->GetPOST('bestellung3projekt'); - $input['bestellung4'] = $this->app->Secure->GetPOST('bestellung4'); - $input['bestellung4betrag'] = $this->app->Secure->GetPOST('bestellung4betrag'); - $input['bestellung4bemerkung'] = $this->app->Secure->GetPOST('bestellung4bemerkung'); - $input['bestellung4kostenstelle'] = $this->app->Secure->GetPOST('bestellung4kostenstelle'); - $input['bestellung4auftrag'] = $this->app->Secure->GetPOST('bestellung4auftrag'); - $input['bestellung4projekt'] = $this->app->Secure->GetPOST('bestellung4projekt'); - $input['bestellung5'] = $this->app->Secure->GetPOST('bestellung5'); - $input['bestellung5betrag'] = $this->app->Secure->GetPOST('bestellung5betrag'); - $input['bestellung5bemerkung'] = $this->app->Secure->GetPOST('bestellung5bemerkung'); - $input['bestellung5kostenstelle'] = $this->app->Secure->GetPOST('bestellung5kostenstelle'); - $input['bestellung5auftrag'] = $this->app->Secure->GetPOST('bestellung5auftrag'); - $input['bestellung5projekt'] = $this->app->Secure->GetPOST('bestellung5projekt'); - $input['bestellung6'] = $this->app->Secure->GetPOST('bestellung6'); - $input['bestellung6betrag'] = $this->app->Secure->GetPOST('bestellung6betrag'); - $input['bestellung6bemerkung'] = $this->app->Secure->GetPOST('bestellung6bemerkung'); - $input['bestellung6kostenstelle'] = $this->app->Secure->GetPOST('bestellung6kostenstelle'); - $input['bestellung6auftrag'] = $this->app->Secure->GetPOST('bestellung6auftrag'); - $input['bestellung6projekt'] = $this->app->Secure->GetPOST('bestellung6projekt'); - $input['bestellung7'] = $this->app->Secure->GetPOST('bestellung7'); - $input['bestellung7betrag'] = $this->app->Secure->GetPOST('bestellung7betrag'); - $input['bestellung7bemerkung'] = $this->app->Secure->GetPOST('bestellung7bemerkung'); - $input['bestellung7kostenstelle'] = $this->app->Secure->GetPOST('bestellung7kostenstelle'); - $input['bestellung7auftrag'] = $this->app->Secure->GetPOST('bestellung7auftrag'); - $input['bestellung7projekt'] = $this->app->Secure->GetPOST('bestellung7projekt'); - $input['bestellung8'] = $this->app->Secure->GetPOST('bestellung8'); - $input['bestellung8betrag'] = $this->app->Secure->GetPOST('bestellung8betrag'); - $input['bestellung8bemerkung'] = $this->app->Secure->GetPOST('bestellung8bemerkung'); - $input['bestellung8kostenstelle'] = $this->app->Secure->GetPOST('bestellung8kostenstelle'); - $input['bestellung8auftrag'] = $this->app->Secure->GetPOST('bestellung8auftrag'); - $input['bestellung8projekt'] = $this->app->Secure->GetPOST('bestellung8projekt'); - $input['bestellung9'] = $this->app->Secure->GetPOST('bestellung9'); - $input['bestellung9betrag'] = $this->app->Secure->GetPOST('bestellung9betrag'); - $input['bestellung9bemerkung'] = $this->app->Secure->GetPOST('bestellung9bemerkung'); - $input['bestellung9kostenstelle'] = $this->app->Secure->GetPOST('bestellung9kostenstelle'); - $input['bestellung9auftrag'] = $this->app->Secure->GetPOST('bestellung9auftrag'); - $input['bestellung9projekt'] = $this->app->Secure->GetPOST('bestellung9projekt'); - $input['bestellung10'] = $this->app->Secure->GetPOST('bestellung10'); - $input['bestellung10betrag'] = $this->app->Secure->GetPOST('bestellung10betrag'); - $input['bestellung10bemerkung'] = $this->app->Secure->GetPOST('bestellung10bemerkung'); - $input['bestellung10kostenstelle'] = $this->app->Secure->GetPOST('bestellung10kostenstelle'); - $input['bestellung10auftrag'] = $this->app->Secure->GetPOST('bestellung10auftrag'); - $input['bestellung10projekt'] = $this->app->Secure->GetPOST('bestellung10projekt'); - $input['bestellung11'] = $this->app->Secure->GetPOST('bestellung11'); - $input['bestellung11betrag'] = $this->app->Secure->GetPOST('bestellung11betrag'); - $input['bestellung11bemerkung'] = $this->app->Secure->GetPOST('bestellung11bemerkung'); - $input['bestellung11kostenstelle'] = $this->app->Secure->GetPOST('bestellung11kostenstelle'); - $input['bestellung11auftrag'] = $this->app->Secure->GetPOST('bestellung11auftrag'); - $input['bestellung11projekt'] = $this->app->Secure->GetPOST('bestellung11projekt'); - $input['bestellung12'] = $this->app->Secure->GetPOST('bestellung12'); - $input['bestellung12betrag'] = $this->app->Secure->GetPOST('bestellung12betrag'); - $input['bestellung12bemerkung'] = $this->app->Secure->GetPOST('bestellung12bemerkung'); - $input['bestellung12projekt'] = $this->app->Secure->GetPOST('bestellung12projekt'); - $input['bestellung12kostenstelle'] = $this->app->Secure->GetPOST('bestellung12kostenstelle'); - $input['bestellung12auftrag'] = $this->app->Secure->GetPOST('bestellung12auftrag'); - $input['bestellung13'] = $this->app->Secure->GetPOST('bestellung13'); - $input['bestellung13betrag'] = $this->app->Secure->GetPOST('bestellung13betrag'); - $input['bestellung13bemerkung'] = $this->app->Secure->GetPOST('bestellung13bemerkung'); - $input['bestellung13kostenstelle'] = $this->app->Secure->GetPOST('bestellung13kostenstelle'); - $input['bestellung13auftrag'] = $this->app->Secure->GetPOST('bestellung13auftrag'); - $input['bestellung13projekt'] = $this->app->Secure->GetPOST('bestellung13projekt'); - $input['bestellung14'] = $this->app->Secure->GetPOST('bestellung14'); - $input['bestellung14betrag'] = $this->app->Secure->GetPOST('bestellung14betrag'); - $input['bestellung14bemerkung'] = $this->app->Secure->GetPOST('bestellung14bemerkung'); - $input['bestellung14kostenstelle'] = $this->app->Secure->GetPOST('bestellung14kostenstelle'); - $input['bestellung14auftrag'] = $this->app->Secure->GetPOST('bestellung14auftrag'); - $input['bestellung14projekt'] = $this->app->Secure->GetPOST('bestellung14projekt'); - $input['bestellung15'] = $this->app->Secure->GetPOST('bestellung15'); - $input['bestellung15betrag'] = $this->app->Secure->GetPOST('bestellung15betrag'); - $input['bestellung15bemerkung'] = $this->app->Secure->GetPOST('bestellung15bemerkung'); - $input['bestellung15kostenstelle'] = $this->app->Secure->GetPOST('bestellung15kostenstelle'); - $input['bestellung15auftrag'] = $this->app->Secure->GetPOST('bestellung15auftrag'); - $input['bestellung15projekt'] = $this->app->Secure->GetPOST('bestellung15projekt'); - $input['waehrung'] = $this->app->Secure->GetPOST('waehrung'); - $input['zahlungsweise'] = $this->app->Secure->GetPOST('zahlungsweise'); - $input['eingangsdatum'] = $this->app->Secure->GetPOST('eingangsdatum'); - $input['buha_konto1'] = $this->app->Secure->GetPOST('buha_konto1'); - $input['buha_belegfeld1'] = $this->app->Secure->GetPOST('buha_belegfeld1'); - $input['buha_betrag1'] = $this->app->Secure->GetPOST('buha_betrag1'); - $input['buha_konto2'] = $this->app->Secure->GetPOST('buha_konto2'); - $input['buha_belegfeld2'] = $this->app->Secure->GetPOST('buha_belegfeld2'); - $input['buha_betrag2'] = $this->app->Secure->GetPOST('buha_betrag2'); - $input['buha_konto3'] = $this->app->Secure->GetPOST('buha_konto3'); - $input['buha_belegfeld3'] = $this->app->Secure->GetPOST('buha_belegfeld3'); - $input['buha_betrag3'] = $this->app->Secure->GetPOST('buha_betrag3'); - $input['buha_konto4'] = $this->app->Secure->GetPOST('buha_konto4'); - $input['buha_belegfeld4'] = $this->app->Secure->GetPOST('buha_belegfeld4'); - $input['buha_betrag4'] = $this->app->Secure->GetPOST('buha_betrag4'); - $input['buha_konto5'] = $this->app->Secure->GetPOST('buha_konto5'); - $input['buha_belegfeld5'] = $this->app->Secure->GetPOST('buha_belegfeld5'); - $input['buha_betrag5'] = $this->app->Secure->GetPOST('buha_betrag5'); - $input['rechnungsdatum'] = $this->app->Secure->GetPOST('rechnungsdatum'); - $input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe'); - $input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle'); - $input['beschreibung'] = $this->app->Secure->GetPOST('beschreibung'); - $input['sachkonto'] = $this->app->Secure->GetPOST('sachkonto'); - $input['art'] = $this->app->Secure->GetPOST('art'); - $input['verwendungszweck'] = $this->app->Secure->GetPOST('verwendungszweck'); - $input['dta_datei'] = $this->app->Secure->GetPOST('dta_datei'); - $input['frachtkosten'] = $this->app->Secure->GetPOST('frachtkosten'); - $input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung'); - $input['ustnormal'] = $this->app->Secure->GetPOST('ustnormal'); - $input['ustermaessigt'] = $this->app->Secure->GetPOST('ustermaessigt'); - $input['uststuer3'] = $this->app->Secure->GetPOST('uststuer3'); - $input['uststuer4'] = $this->app->Secure->GetPOST('uststuer4'); - $input['betragbezahlt'] = $this->app->Secure->GetPOST('betragbezahlt'); - $input['bezahltam'] = $this->app->Secure->GetPOST('bezahltam'); - $input['klaerfall'] = $this->app->Secure->GetPOST('klaerfall'); - $input['klaergrund'] = $this->app->Secure->GetPOST('klaergrund'); - $input['skonto_erhalten'] = $this->app->Secure->GetPOST('skonto_erhalten'); - $input['kurs'] = $this->app->Secure->GetPOST('kurs'); - $input['sprache'] = $this->app->Secure->GetPOST('sprache'); - - + $input['adresse'] = $this->app->Secure->GetPOST('adresse'); + $input['rechnung'] = $this->app->Secure->GetPOST('rechnung'); + $input['zahlbarbis'] = $this->app->Secure->GetPOST('zahlbarbis'); + $input['betrag'] = $this->app->Secure->GetPOST('betrag'); + $input['waehrung'] = $this->app->Secure->GetPOST('waehrung'); + $input['skonto'] = $this->app->Secure->GetPOST('skonto'); + $input['skontobis'] = $this->app->Secure->GetPOST('skontobis'); + $input['projekt'] = $this->app->Secure->GetPOST('projekt'); + $input['bezahlt'] = $this->app->Secure->GetPOST('bezahlt'); + $input['zahlungsweise'] = $this->app->Secure->GetPOST('zahlungsweise'); + $input['eingangsdatum'] = $this->app->Secure->GetPOST('eingangsdatum'); + $input['rechnungsdatum'] = $this->app->Secure->GetPOST('rechnungsdatum'); + $input['freigabe'] = $this->app->Secure->GetPOST('freigabe'); + $input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe'); + $input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle'); + $input['sachkonto'] = $this->app->Secure->GetPOST('sachkonto'); + $input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung'); return $input; } - } + + function verbindlichkeit_menu($id) { + + $anzahldateien = $this->app->erp->AnzahlDateien("verbindlichkeit",$id); + if ($anzahldateien > 0) { + $anzahldateien = " (".$anzahldateien.")"; + } else { + $anzahldateien=""; + } + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details"); + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht"); + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=dateien&id=$id", "Dateien".$anzahldateien); + } + + function verbindlichkeit_dateien() + { + $id = $this->app->Secure->GetGET("id"); + $this->verbindlichkeit_menu($id); + $this->app->Tpl->Add('UEBERSCHRIFT'," (Dateien)"); + $this->app->YUI->DateiUpload('PAGE',"verbindlichkeit",$id); + } + + function verbindlichkeit_inlinepdf() { + $id = $this->app->Secure->GetGET('id'); + + $file_attachments = $this->app->erp->GetDateiSubjektObjekt('%','verbindlichkeit',$id); + + if (!empty($file_attachments)) { + +// print_r($file_attachments); + + // Try to merge all PDFs + $file_paths = array(); + foreach ($file_attachments as $file_attachment) { + if ($this->app->erp->GetDateiEndung($file_attachment) == 'pdf') { + $file_paths[] = $this->app->erp->GetDateiPfad($file_attachment); + } + } + $pdfMerger = $this->app->Container->get('PdfMerger'); + $mergeOutputPath = realpath($this->app->erp->GetTMP()) . '/' . uniqid('sammelpdf_', true) . '.pdf'; + try { + $pdfMerger->merge($file_paths, $mergeOutputPath); + header('Content-type:application/pdf'); + header('Content-Disposition: attachment;filename='.md5(microtime(true)).'.pdf'); + readfile($mergeOutputPath); + $this->app->ExitXentral(); + } catch (\Xentral\Components\Pdf\Exception\PdfComponentExceptionInterface $exception) { + // Just the first PDF + foreach ($file_attachments as $file_attachment) { + if ($this->app->erp->GetDateiEndung($file_attachment) == 'pdf') { + $file_contents = $this->app->erp->GetDatei($file_attachment); + header('Content-type:application/pdf'); + header('Content-Disposition: attachment;filename=verbindlichkeit_'.$id.'.pdf'); + echo($file_contents); + $this->app->ExitXentral(); + } + } + } + } + $this->app->ExitXentral(); + } +} From 57f0e2f6275492ea887e98f618204ac6b07eeac4 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Mon, 11 Dec 2023 22:17:28 +0100 Subject: [PATCH 03/13] verbindlichkeit added positionen with sachkonto --- phpwf/plugins/class.yui.php | 17 +- upgrade/data/db_schema.json | 13 +- .../object.gen.verbindlichkeit_position.php | 476 +++++++++--------- www/pages/ajax.php | 7 + www/pages/content/verbindlichkeit_edit.tpl | 12 +- www/pages/verbindlichkeit.php | 72 +++ .../widget.gen.verbindlichkeit_position.php | 255 +++++----- .../_gen/verbindlichkeit_position.tpl | 62 ++- .../widget.verbindlichkeit_position.php | 7 + 9 files changed, 524 insertions(+), 397 deletions(-) diff --git a/phpwf/plugins/class.yui.php b/phpwf/plugins/class.yui.php index ecf58f9c..5cf512ef 100644 --- a/phpwf/plugins/class.yui.php +++ b/phpwf/plugins/class.yui.php @@ -2563,7 +2563,7 @@ class YUI { $anzeigebrutto = true; } } - + $sortcol = ' b.sort '; $schreibschutz = !empty($docArr)?$docArr['schreibschutz']:$this->app->DB->Select("SELECT schreibschutz FROM $module WHERE id='$id'"); if(!$schreibschutz)$sortcol = " concat('',b.sort) as sort "; @@ -2853,7 +2853,20 @@ class YUI { LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id WHERE b.$module='$id'"; - } else { + } + else if ($module == "verbindlichkeit") // OpenXE + { + $sql = "SELECT $sortcol, if(b.beschreibung!='', + if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnung,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnung,' *')), + if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung)) + as Artikel, + p.abkuerzung as projekt, a.nummer as nummer, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, " . $this->FormatPreis($preiscell) . " as preis, CONCAT(k.sachkonto,' - ',k.beschriftung) AS sachkonto, b.id as id + FROM $table b + LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id + LEFT JOIN kontorahmen k ON k.id = b.sachkonto + WHERE b.$module='$id'"; + } + else { $sql = null; $this->app->erp->RunHook('yui_position_sql', 3, $table, $id, $sql); if($sql === null){ diff --git a/upgrade/data/db_schema.json b/upgrade/data/db_schema.json index 4526dc4a..0cdae6d1 100644 --- a/upgrade/data/db_schema.json +++ b/upgrade/data/db_schema.json @@ -104773,7 +104773,7 @@ }, { "Field": "adresse", - "Type": "int", + "Type": "int(11)", "Collation": null, "Null": "NO", "Key": "", @@ -111280,6 +111280,17 @@ "Extra": "", "Privileges": "select,insert,update,references", "Comment": "" + }, + { + "Field": "sachkonto", + "Type": "int(11)", + "Collation": null, + "Null": "NO", + "Key": "", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" } ], "keys": [ diff --git a/www/objectapi/mysql/_gen/object.gen.verbindlichkeit_position.php b/www/objectapi/mysql/_gen/object.gen.verbindlichkeit_position.php index 9c82d0a6..c88928ef 100644 --- a/www/objectapi/mysql/_gen/object.gen.verbindlichkeit_position.php +++ b/www/objectapi/mysql/_gen/object.gen.verbindlichkeit_position.php @@ -1,238 +1,244 @@ -app = $app; - } - - public function Select($id) - { - if(is_numeric($id)) - $result = $this->app->DB->SelectArr("SELECT * FROM `verbindlichkeit_position` WHERE (`id` = '$id')"); - else - return -1; - -$result = $result[0]; - - $this->id=$result['id']; - $this->verbindlichkeit=$result['verbindlichkeit']; - $this->sort=$result['sort']; - $this->artikel=$result['artikel']; - $this->projekt=$result['projekt']; - $this->bestellung=$result['bestellung']; - $this->nummer=$result['nummer']; - $this->bestellnummer=$result['bestellnummer']; - $this->waehrung=$result['waehrung']; - $this->einheit=$result['einheit']; - $this->vpe=$result['vpe']; - $this->bezeichnung=$result['bezeichnung']; - $this->umsatzsteuer=$result['umsatzsteuer']; - $this->status=$result['status']; - $this->beschreibung=$result['beschreibung']; - $this->lieferdatum=$result['lieferdatum']; - $this->steuersatz=$result['steuersatz']; - $this->steuertext=$result['steuertext']; - $this->preis=$result['preis']; - $this->menge=$result['menge']; - $this->kostenstelle=$result['kostenstelle']; - } - - public function Create() - { - $sql = "INSERT INTO `verbindlichkeit_position` (`id`,`verbindlichkeit`,`sort`,`artikel`,`projekt`,`bestellung`,`nummer`,`bestellnummer`,`waehrung`,`einheit`,`vpe`,`bezeichnung`,`umsatzsteuer`,`status`,`beschreibung`,`lieferdatum`,`steuersatz`,`steuertext`,`preis`,`menge`,`kostenstelle`) - VALUES(NULL,'{$this->verbindlichkeit}','{$this->sort}','{$this->artikel}','{$this->projekt}','{$this->bestellung}','{$this->nummer}','{$this->bestellnummer}','{$this->waehrung}','{$this->einheit}','{$this->vpe}','{$this->bezeichnung}','{$this->umsatzsteuer}','{$this->status}','{$this->beschreibung}','{$this->lieferdatum}','{$this->steuersatz}','{$this->steuertext}','{$this->preis}','{$this->menge}','{$this->kostenstelle}')"; - - $this->app->DB->Insert($sql); - $this->id = $this->app->DB->GetInsertID(); - } - - public function Update() - { - if(!is_numeric($this->id)) { - return -1; - } - - $sql = "UPDATE `verbindlichkeit_position` SET - `verbindlichkeit`='{$this->verbindlichkeit}', - `sort`='{$this->sort}', - `artikel`='{$this->artikel}', - `projekt`='{$this->projekt}', - `bestellung`='{$this->bestellung}', - `nummer`='{$this->nummer}', - `bestellnummer`='{$this->bestellnummer}', - `waehrung`='{$this->waehrung}', - `einheit`='{$this->einheit}', - `vpe`='{$this->vpe}', - `bezeichnung`='{$this->bezeichnung}', - `umsatzsteuer`='{$this->umsatzsteuer}', - `status`='{$this->status}', - `beschreibung`='{$this->beschreibung}', - `lieferdatum`='{$this->lieferdatum}', - `steuersatz`='{$this->steuersatz}', - `steuertext`='{$this->steuertext}', - `preis`='{$this->preis}', - `menge`='{$this->menge}', - `kostenstelle`='{$this->kostenstelle}' - WHERE (`id`='{$this->id}')"; - - $this->app->DB->Update($sql); - } - - public function Delete($id='') - { - if(is_numeric($id)) - { - $this->id=$id; - } - else - return -1; - - $sql = "DELETE FROM `verbindlichkeit_position` WHERE (`id`='{$this->id}')"; - $this->app->DB->Delete($sql); - - $this->id=''; - $this->verbindlichkeit=''; - $this->sort=''; - $this->artikel=''; - $this->projekt=''; - $this->bestellung=''; - $this->nummer=''; - $this->bestellnummer=''; - $this->waehrung=''; - $this->einheit=''; - $this->vpe=''; - $this->bezeichnung=''; - $this->umsatzsteuer=''; - $this->status=''; - $this->beschreibung=''; - $this->lieferdatum=''; - $this->steuersatz=''; - $this->steuertext=''; - $this->preis=''; - $this->menge=''; - $this->kostenstelle=''; - } - - public function Copy() - { - $this->id = ''; - $this->Create(); - } - - /** - Mit dieser Funktion kann man einen Datensatz suchen - dafuer muss man die Attribute setzen nach denen gesucht werden soll - dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt - zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen - **/ - - public function Find() - { - //TODO Suche mit den werten machen - } - - public function FindNext() - { - //TODO Suche mit den alten werten fortsetzen machen - } - - /** Funktionen um durch die Tabelle iterieren zu koennen */ - - public function Next() - { - //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer - } - - public function First() - { - //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer - } - - /** dank dieser funktionen kann man die tatsaechlichen werte einfach - ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/ - - public function SetId($value) { $this->id=$value; } - public function GetId() { return $this->id; } - public function SetVerbindlichkeit($value) { $this->verbindlichkeit=$value; } - public function GetVerbindlichkeit() { return $this->verbindlichkeit; } - public function SetSort($value) { $this->sort=$value; } - public function GetSort() { return $this->sort; } - public function SetArtikel($value) { $this->artikel=$value; } - public function GetArtikel() { return $this->artikel; } - public function SetProjekt($value) { $this->projekt=$value; } - public function GetProjekt() { return $this->projekt; } - public function SetBestellung($value) { $this->bestellung=$value; } - public function GetBestellung() { return $this->bestellung; } - public function SetNummer($value) { $this->nummer=$value; } - public function GetNummer() { return $this->nummer; } - public function SetBestellnummer($value) { $this->bestellnummer=$value; } - public function GetBestellnummer() { return $this->bestellnummer; } - public function SetWaehrung($value) { $this->waehrung=$value; } - public function GetWaehrung() { return $this->waehrung; } - public function SetEinheit($value) { $this->einheit=$value; } - public function GetEinheit() { return $this->einheit; } - public function SetVpe($value) { $this->vpe=$value; } - public function GetVpe() { return $this->vpe; } - public function SetBezeichnung($value) { $this->bezeichnung=$value; } - public function GetBezeichnung() { return $this->bezeichnung; } - public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; } - public function GetUmsatzsteuer() { return $this->umsatzsteuer; } - public function SetStatus($value) { $this->status=$value; } - public function GetStatus() { return $this->status; } - public function SetBeschreibung($value) { $this->beschreibung=$value; } - public function GetBeschreibung() { return $this->beschreibung; } - public function SetLieferdatum($value) { $this->lieferdatum=$value; } - public function GetLieferdatum() { return $this->lieferdatum; } - public function SetSteuersatz($value) { $this->steuersatz=$value; } - public function GetSteuersatz() { return $this->steuersatz; } - public function SetSteuertext($value) { $this->steuertext=$value; } - public function GetSteuertext() { return $this->steuertext; } - public function SetPreis($value) { $this->preis=$value; } - public function GetPreis() { return $this->preis; } - public function SetMenge($value) { $this->menge=$value; } - public function GetMenge() { return $this->menge; } - public function SetKostenstelle($value) { $this->kostenstelle=$value; } - public function GetKostenstelle() { return $this->kostenstelle; } - -} +app = $app; + } + + public function Select($id) + { + if(is_numeric($id)) + $result = $this->app->DB->SelectArr("SELECT * FROM `verbindlichkeit_position` WHERE (`id` = '$id')"); + else + return -1; + +$result = $result[0]; + + $this->id=$result['id']; + $this->verbindlichkeit=$result['verbindlichkeit']; + $this->sort=$result['sort']; + $this->artikel=$result['artikel']; + $this->projekt=$result['projekt']; + $this->bestellung=$result['bestellung']; + $this->nummer=$result['nummer']; + $this->bestellnummer=$result['bestellnummer']; + $this->waehrung=$result['waehrung']; + $this->einheit=$result['einheit']; + $this->vpe=$result['vpe']; + $this->bezeichnung=$result['bezeichnung']; + $this->umsatzsteuer=$result['umsatzsteuer']; + $this->status=$result['status']; + $this->beschreibung=$result['beschreibung']; + $this->lieferdatum=$result['lieferdatum']; + $this->steuersatz=$result['steuersatz']; + $this->steuertext=$result['steuertext']; + $this->preis=$result['preis']; + $this->menge=$result['menge']; + $this->kostenstelle=$result['kostenstelle']; + $this->sachkonto=$result['sachkonto']; + } + + public function Create() + { + $sql = "INSERT INTO `verbindlichkeit_position` (`id`,`verbindlichkeit`,`sort`,`artikel`,`projekt`,`bestellung`,`nummer`,`bestellnummer`,`waehrung`,`einheit`,`vpe`,`bezeichnung`,`umsatzsteuer`,`status`,`beschreibung`,`lieferdatum`,`steuersatz`,`steuertext`,`preis`,`menge`,`kostenstelle`) + VALUES(NULL,'{$this->verbindlichkeit}','{$this->sort}','{$this->artikel}','{$this->projekt}','{$this->bestellung}','{$this->nummer}','{$this->bestellnummer}','{$this->waehrung}','{$this->einheit}','{$this->vpe}','{$this->bezeichnung}','{$this->umsatzsteuer}','{$this->status}','{$this->beschreibung}','{$this->lieferdatum}','{$this->steuersatz}','{$this->steuertext}','{$this->preis}','{$this->menge}','{$this->kostenstelle}','{$this->sachkonto}')"; + + $this->app->DB->Insert($sql); + $this->id = $this->app->DB->GetInsertID(); + } + + public function Update() + { + if(!is_numeric($this->id)) { + return -1; + } + + $sql = "UPDATE `verbindlichkeit_position` SET + `verbindlichkeit`='{$this->verbindlichkeit}', + `sort`='{$this->sort}', + `artikel`='{$this->artikel}', + `projekt`='{$this->projekt}', + `bestellung`='{$this->bestellung}', + `nummer`='{$this->nummer}', + `bestellnummer`='{$this->bestellnummer}', + `waehrung`='{$this->waehrung}', + `einheit`='{$this->einheit}', + `vpe`='{$this->vpe}', + `bezeichnung`='{$this->bezeichnung}', + `umsatzsteuer`='{$this->umsatzsteuer}', + `status`='{$this->status}', + `beschreibung`='{$this->beschreibung}', + `lieferdatum`='{$this->lieferdatum}', + `steuersatz`='{$this->steuersatz}', + `steuertext`='{$this->steuertext}', + `preis`='{$this->preis}', + `menge`='{$this->menge}', + `kostenstelle`='{$this->kostenstelle}', + `sachkonto`='{$this->sachkonto}' + WHERE (`id`='{$this->id}')"; + + $this->app->DB->Update($sql); + } + + public function Delete($id='') + { + if(is_numeric($id)) + { + $this->id=$id; + } + else + return -1; + + $sql = "DELETE FROM `verbindlichkeit_position` WHERE (`id`='{$this->id}')"; + $this->app->DB->Delete($sql); + + $this->id=''; + $this->verbindlichkeit=''; + $this->sort=''; + $this->artikel=''; + $this->projekt=''; + $this->bestellung=''; + $this->nummer=''; + $this->bestellnummer=''; + $this->waehrung=''; + $this->einheit=''; + $this->vpe=''; + $this->bezeichnung=''; + $this->umsatzsteuer=''; + $this->status=''; + $this->beschreibung=''; + $this->lieferdatum=''; + $this->steuersatz=''; + $this->steuertext=''; + $this->preis=''; + $this->menge=''; + $this->kostenstelle=''; + $this->sachkonto=''; + } + + public function Copy() + { + $this->id = ''; + $this->Create(); + } + + /** + Mit dieser Funktion kann man einen Datensatz suchen + dafuer muss man die Attribute setzen nach denen gesucht werden soll + dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt + zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen + **/ + + public function Find() + { + //TODO Suche mit den werten machen + } + + public function FindNext() + { + //TODO Suche mit den alten werten fortsetzen machen + } + + /** Funktionen um durch die Tabelle iterieren zu koennen */ + + public function Next() + { + //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer + } + + public function First() + { + //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer + } + + /** dank dieser funktionen kann man die tatsaechlichen werte einfach + ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/ + + public function SetId($value) { $this->id=$value; } + public function GetId() { return $this->id; } + public function SetVerbindlichkeit($value) { $this->verbindlichkeit=$value; } + public function GetVerbindlichkeit() { return $this->verbindlichkeit; } + public function SetSort($value) { $this->sort=$value; } + public function GetSort() { return $this->sort; } + public function SetArtikel($value) { $this->artikel=$value; } + public function GetArtikel() { return $this->artikel; } + public function SetProjekt($value) { $this->projekt=$value; } + public function GetProjekt() { return $this->projekt; } + public function SetBestellung($value) { $this->bestellung=$value; } + public function GetBestellung() { return $this->bestellung; } + public function SetNummer($value) { $this->nummer=$value; } + public function GetNummer() { return $this->nummer; } + public function SetBestellnummer($value) { $this->bestellnummer=$value; } + public function GetBestellnummer() { return $this->bestellnummer; } + public function SetWaehrung($value) { $this->waehrung=$value; } + public function GetWaehrung() { return $this->waehrung; } + public function SetEinheit($value) { $this->einheit=$value; } + public function GetEinheit() { return $this->einheit; } + public function SetVpe($value) { $this->vpe=$value; } + public function GetVpe() { return $this->vpe; } + public function SetBezeichnung($value) { $this->bezeichnung=$value; } + public function GetBezeichnung() { return $this->bezeichnung; } + public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; } + public function GetUmsatzsteuer() { return $this->umsatzsteuer; } + public function SetStatus($value) { $this->status=$value; } + public function GetStatus() { return $this->status; } + public function SetBeschreibung($value) { $this->beschreibung=$value; } + public function GetBeschreibung() { return $this->beschreibung; } + public function SetLieferdatum($value) { $this->lieferdatum=$value; } + public function GetLieferdatum() { return $this->lieferdatum; } + public function SetSteuersatz($value) { $this->steuersatz=$value; } + public function GetSteuersatz() { return $this->steuersatz; } + public function SetSteuertext($value) { $this->steuertext=$value; } + public function GetSteuertext() { return $this->steuertext; } + public function SetPreis($value) { $this->preis=$value; } + public function GetPreis() { return $this->preis; } + public function SetMenge($value) { $this->menge=$value; } + public function GetMenge() { return $this->menge; } + public function SetKostenstelle($value) { $this->kostenstelle=$value; } + public function GetKostenstelle() { return $this->kostenstelle; } + public function SetSachkonto($value) { $this->sachkonto=$value; } + public function GetSachkonto() { return $this->sachkonto; } + +} diff --git a/www/pages/ajax.php b/www/pages/ajax.php index 6eda4979..231cfcca 100644 --- a/www/pages/ajax.php +++ b/www/pages/ajax.php @@ -2362,7 +2362,14 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku for($i = 0; $i < $carr; $i++) $newarr[] = $arr[$i]['name']; break; + case "sachkonto_aufwendungen": + $arr = $this->app->DB->SelectArr("SELECT CONCAT(sachkonto,' ',beschriftung) as name FROM kontorahmen + WHERE art = 1 AND (beschriftung LIKE '%$term%' OR sachkonto LIKE '%$term%' OR sachkonto LIKE '%$term2%' OR sachkonto LIKE '%$term3%' OR beschriftung LIKE '%$term2%' OR beschriftung LIKE '%$term3%') AND ausblenden!=1 $andprojekt ORDER by sachkonto"); + $carr = !empty($arr)?count($arr):0; + for($i = 0; $i < $carr; $i++) + $newarr[] = $arr[$i]['name']; + break; case "lieferbedingungen": $arr = $this->app->DB->SelectArr("SELECT CONCAT(lieferbedingungen) as name FROM lieferbedingungen WHERE (lieferbedingungen LIKE '%$term%' OR lieferbedingungen LIKE '%$term2%' OR lieferbedingungen LIKE '%$term3%') ORDER by lieferbedingungen"); diff --git a/www/pages/content/verbindlichkeit_edit.tpl b/www/pages/content/verbindlichkeit_edit.tpl index 5490fa4d..83562c18 100644 --- a/www/pages/content/verbindlichkeit_edit.tpl +++ b/www/pages/content/verbindlichkeit_edit.tpl @@ -1,13 +1,8 @@
-
[MESSAGE]
@@ -184,5 +179,8 @@
+
+ [POS] +
diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php index 290b8231..ac4de5e3 100644 --- a/www/pages/verbindlichkeit.php +++ b/www/pages/verbindlichkeit.php @@ -17,9 +17,12 @@ class Verbindlichkeit { $this->app->ActionHandler("list", "verbindlichkeit_list"); $this->app->ActionHandler("create", "verbindlichkeit_edit"); // This automatically adds a "New" button $this->app->ActionHandler("edit", "verbindlichkeit_edit"); + $this->app->ActionHandler("positionen", "verbindlichkeit_positionen"); $this->app->ActionHandler("delete", "verbindlichkeit_delete"); $this->app->ActionHandler("dateien", "verbindlichkeit_dateien"); $this->app->ActionHandler("inlinepdf", "verbindlichkeit_inlinepdf"); + $this->app->ActionHandler("positioneneditpopup", "verbindlichkeit_positioneneditpopup"); + $this->app->DefaultActionHandler("list"); $this->app->ActionHandlerListen($app); } @@ -138,6 +141,8 @@ class Verbindlichkeit { function verbindlichkeit_edit() { $id = $this->app->Secure->GetGET('id'); + $this->app->YUI->AARLGPositionen(true); // create iframe with positionen action + // Check if other users are editing this id if($this->app->erp->DisableModul('artikel',$id)) { @@ -330,4 +335,71 @@ class Verbindlichkeit { } $this->app->ExitXentral(); } + + function verbindlichkeit_positionen() { + $this->app->YUI->AARLGPositionen(false); // Render positionen editable into iframe + } + + function verbindlichkeit_positioneneditpopup() { + $cmd = $this->app->Secure->GetGET('cmd'); + if($cmd === 'getopenaccordions') + { + $accordions = $this->app->Secure->GetPOST('accordions'); + $accordions = explode('*|*',$accordions); + foreach($accordions as $k => $v) + { + if(empty($v)) + { + unset($accordions[$k]); + }else{ + $accordions[$k] = 'verbindlichkeit_accordion'.$v; + } + } + $ret = []; + if(!empty($accordions)) + { + $accordions = $this->app->User->GetParameter($accordions); + if(!empty($accordions)) + { + foreach($accordions as $v) + { + if(!empty($v['value'])) + { + $ret['accordions'][] = str_replace('verbindlichkeit_accordion','',$v['name']); + } + } + } + } + echo json_encode($ret); + $this->app->ExitXentral(); + } + if($cmd === 'setaccordion') + { + $name = $this->app->Secure->GetPOST('name'); + $active = $this->app->Secure->GetPOST('active'); + $this->app->User->SetParameter('verbindlichkeit_accordion'.$name, $active); + echo json_encode(array('success'=>1)); + $this->app->ExitXentral(); + } + $id = $this->app->Secure->GetGET('id'); + $fmodul = $this->app->Secure->GetGET('fmodul'); + $artikel= $this->app->DB->Select("SELECT artikel FROM verbindlichkeit_position WHERE id='$id' LIMIT 1"); + + // nach page inhalt des dialogs ausgeben + $filename = 'widgets/widget.auftag_position_custom.php'; + if(is_file($filename)) + { + include_once $filename; + $widget = new WidgetVerbindlichkeit_positionCustom($this->app,'PAGE'); + } else { + $widget = new WidgetVerbindlichkeit_position($this->app,'PAGE'); + } + + $sid= $this->app->DB->Select("SELECT verbindlichkeit FROM verbindlichkeit_position WHERE id='$id' LIMIT 1"); + $widget->form->SpecialActionAfterExecute('close_refresh', + "index.php?module=verbindlichkeit&action=positionen&id=$sid&fmodul=$fmodul"); + $widget->Edit(); + $this->app->BuildNavigation=false; + } + } diff --git a/www/widgets/_gen/widget.gen.verbindlichkeit_position.php b/www/widgets/_gen/widget.gen.verbindlichkeit_position.php index efbd4856..8fe52cc0 100644 --- a/www/widgets/_gen/widget.gen.verbindlichkeit_position.php +++ b/www/widgets/_gen/widget.gen.verbindlichkeit_position.php @@ -1,129 +1,132 @@ -app = $app; - $this->parsetarget = $parsetarget; - $this->Form(); - } - - public function verbindlichkeit_positionDelete() - { - - $this->form->Execute("verbindlichkeit_position","delete"); - - $this->verbindlichkeit_positionList(); - } - - function Edit() - { - $this->form->Edit(); - } - - function Copy() - { - $this->form->Copy(); - } - - public function Create() - { - $this->form->Create(); - } - - public function Search() - { - $this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE"); - } - - public function Summary() - { - $this->app->Tpl->Set($this->parsetarget,"grosse Tabelle"); - } - - function Form() - { - $this->form = $this->app->FormHandler->CreateNew("verbindlichkeit_position"); - $this->form->UseTable("verbindlichkeit_position"); - $this->form->UseTemplate("verbindlichkeit_position.tpl",$this->parsetarget); - - $field = new HTMLInput("artikel","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - $this->form->AddMandatory("artikel","notempty","Pflichtfeld!","MSGARTIKEL"); - - $field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - $this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG"); - - $field = new HTMLInput("nummer","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLTextarea("beschreibung",5,30,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLInput("menge","text","","8","","","","","","","","0","",""); - $this->form->NewField($field); - $this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE"); - - $field = new HTMLInput("preis","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("waehrung","text","","15","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0"); - $field->AddOption('Standard',''); - $field->AddOption('Ermäßigt','ermaessigt'); - $field->AddOption('Befreit','befreit'); - $this->form->NewField($field); - - $field = new HTMLCheckbox("anderersteuersatz","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLTextarea("steuertext",3,50,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLInput("einheit","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("vpe","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("projekt","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("kostenstelle","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","",""); - $this->form->NewField($field); - - - } - -} - -?> \ No newline at end of file +app = $app; + $this->parsetarget = $parsetarget; + $this->Form(); + } + + public function verbindlichkeit_positionDelete() + { + + $this->form->Execute("verbindlichkeit_position","delete"); + + $this->verbindlichkeit_positionList(); + } + + function Edit() + { + $this->form->Edit(); + } + + function Copy() + { + $this->form->Copy(); + } + + public function Create() + { + $this->form->Create(); + } + + public function Search() + { + $this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE"); + } + + public function Summary() + { + $this->app->Tpl->Set($this->parsetarget,"grosse Tabelle"); + } + + function Form() + { + $this->form = $this->app->FormHandler->CreateNew("verbindlichkeit_position"); + $this->form->UseTable("verbindlichkeit_position"); + $this->form->UseTemplate("verbindlichkeit_position.tpl",$this->parsetarget); + + $field = new HTMLInput("artikel","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + $this->form->AddMandatory("artikel","notempty","Pflichtfeld!","MSGARTIKEL"); + + $field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + $this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG"); + + $field = new HTMLInput("nummer","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLTextarea("beschreibung",5,30,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLInput("menge","text","","8","","","","","","","","0","",""); + $this->form->NewField($field); + $this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE"); + + $field = new HTMLInput("preis","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("waehrung","text","","15","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0"); + $field->AddOption('Standard',''); + $field->AddOption('Ermäßigt','ermaessigt'); + $field->AddOption('Befreit','befreit'); + $this->form->NewField($field); + + $field = new HTMLCheckbox("anderersteuersatz","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLTextarea("steuertext",3,50,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLInput("einheit","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("vpe","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("projekt","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("sachkonto","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("kostenstelle","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","",""); + $this->form->NewField($field); + + + } + +} + +?> diff --git a/www/widgets/templates/_gen/verbindlichkeit_position.tpl b/www/widgets/templates/_gen/verbindlichkeit_position.tpl index 86803cbb..24c4ac26 100644 --- a/www/widgets/templates/_gen/verbindlichkeit_position.tpl +++ b/www/widgets/templates/_gen/verbindlichkeit_position.tpl @@ -25,31 +25,41 @@ $('#anderersteuersatz').click(function() { if (!$(this).is(':checked')) { });
-[FORMHANDLEREVENT] - - - - - - - - - - - - - - - - - - - -
{|Artikel-Nr|}:[ARTIKEL][MSGARTIKEL]
{|Beschreibung|}:[BEZEICHNUNG][MSGBEZEICHNUNG]
{|Artikel-Nr|}:[NUMMER][MSGNUMMER]
{|Beschreibung|}:[BESCHREIBUNG][MSGBESCHREIBUNG]
{|Menge|}:[MENGE][MSGMENGE]
{|Preis|}:[PREIS][MSGPREIS]
{|Währung|}:[WAEHRUNG][MSGWAEHRUNG] [WAEHRUNGSBUTTON]
{|Steuersatz|}:[UMSATZSTEUER][MSGUMSATZSTEUER]  - -[ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ] individuellen Steuersatz verwenden -
{|Rechtlicher Steuerhinweis|}: - [STEUERTEXT][MSGSTEUERTEXT] -
{|Einheit|}:[EINHEIT][MSGEINHEIT]
{|VPE|}:[VPE][MSGVPE]
{|Projekt|}:[PROJEKT][MSGPROJEKT]
{|Kostenstelle|}:[KOSTENSTELLE][MSGKOSTENSTELLE]
{|Lieferdatum|}:[LIEFERDATUM][MSGLIEFERDATUM]
+ [FORMHANDLEREVENT] + + + + + + + +
+ + + + + + + + + + + + + + +
{|Artikel-Nr|}:[ARTIKEL][MSGARTIKEL]
{|Beschreibung|}:[BEZEICHNUNG][MSGBEZEICHNUNG]
{|Artikel-Nr|}:[NUMMER][MSGNUMMER]
{|Beschreibung|}:[BESCHREIBUNG][MSGBESCHREIBUNG]
{|Menge|}:[MENGE][MSGMENGE]
{|Preis|}:[PREIS][MSGPREIS]
{|Währung|}:[WAEHRUNG][MSGWAEHRUNG] [WAEHRUNGSBUTTON]
{|Steuersatz|}:[UMSATZSTEUER][MSGUMSATZSTEUER]  + [ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ] individuellen Steuersatz verwenden +
{|Rechtlicher Steuerhinweis|}: + [STEUERTEXT][MSGSTEUERTEXT] +
{|Einheit|}:[EINHEIT][MSGEINHEIT]
{|VPE|}:[VPE][MSGVPE]
{|Lieferdatum|}:[LIEFERDATUM][MSGLIEFERDATUM]
+
+ + + + + +
{|Projekt|}:[PROJEKT][MSGPROJEKT]
{|Kostenstelle|}:[KOSTENSTELLE][MSGKOSTENSTELLE]
{|Sachkonto|}:[SACHKONTO][MSGSACHKONTO]
+
[WAEHRUNGSTABELLE] diff --git a/www/widgets/widget.verbindlichkeit_position.php b/www/widgets/widget.verbindlichkeit_position.php index e80d4dd7..23710a9b 100644 --- a/www/widgets/widget.verbindlichkeit_position.php +++ b/www/widgets/widget.verbindlichkeit_position.php @@ -24,6 +24,7 @@ class WidgetVerbindlichkeit_position extends WidgetGenVerbindlichkeit_position $this->app->YUI->AutoComplete("projekt","projektname",1); $this->app->YUI->AutoComplete("kostenstelle","kostenstelle",1); + $this->app->YUI->AutoComplete("sachkonto","sachkonto_aufwendungen",1); $this->app->YUI->AutoComplete("artikel","artikelnummer"); //$this->app->YUI->AutoComplete(AUTO,"artikel",array('nummer','name_de','warengruppe'),"nummer"); @@ -36,6 +37,7 @@ class WidgetVerbindlichkeit_position extends WidgetGenVerbindlichkeit_position $this->form->ReplaceFunction("menge",$this,"ReplaceMenge"); //$this->form->ReplaceFunction("geliefert",$this,"ReplaceMenge"); $this->form->ReplaceFunction("projekt",$this,"ReplaceProjekt"); + $this->form->ReplaceFunction("sachkonto",$this,"ReplaceSachkonto"); if($this->app->erp->Firmendaten("briefhtml")=="1") { @@ -79,6 +81,11 @@ class WidgetVerbindlichkeit_position extends WidgetGenVerbindlichkeit_position return $this->app->erp->ReplaceProjekt($db,$value,$fromform); } + function ReplaceSachkonto($db,$value,$fromform) + { + return $this->app->erp->ReplaceKontorahmen($db,$value,$fromform); + } + function ReplaceSteuersatz($db,$value,$fromform) { if($db) From 8664e16c559ccdcb74a1d71f4108d032c4929c9d Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Wed, 13 Dec 2023 18:27:08 +0100 Subject: [PATCH 04/13] zwischenstand verbindlichkeit status, forms, positions --- phpwf/htmltags/class.form.php | 716 +++++++++--------- phpwf/plugins/class.yui.php | 66 +- upgrade/data/db_schema.json | 66 ++ www/lib/class.erpapi.php | 1 + www/pages/content/verbindlichkeit_edit.tpl | 162 ++-- www/pages/verbindlichkeit.php | 142 +++- .../widget.gen.verbindlichkeit_position.php | 5 +- .../_gen/verbindlichkeit_position.tpl | 4 +- 8 files changed, 692 insertions(+), 470 deletions(-) diff --git a/phpwf/htmltags/class.form.php b/phpwf/htmltags/class.form.php index b4795197..221a477c 100644 --- a/phpwf/htmltags/class.form.php +++ b/phpwf/htmltags/class.form.php @@ -1,361 +1,361 @@ -action=$action; - $this->name=$name; - $this->method=$method; - $this->id=$id; - } - - function Set($value) - { - } - - function Get() - { - - } - - function GetClose() - { - } -} - - - -class HTMLTextarea -{ - var $name; - var $rows; - var $value; - var $cols; - var $id=""; - var $readonly=""; - var $disabled=""; - var $class; - - function __construct($name,$rows,$cols,$defvalue="",$id="",$readonly="",$disabled="",$class="") - { - $this->name = $name; - $this->rows = $rows; - $this->cols = $cols; - $this->class = $class; - $this->value = $defvalue; - $this->id = $id; - - if($id=="") - $this->id = $name; - - $this->readonly = $readonly; - $this->disabled = $disabled; - } - - function Get() - { - // TEMP ACHTUNG HIER IST MIST!!! - $value = $this->value; -/* - if(!defined('WFHTMLTextareabr') || !WFHTMLTextareabr)$value = preg_replace('//i', "\n", $value); - */ - // $value = str_replace("\\r\\n","\n",$value); - - $html = ""; - return $html; - } - - function GetClose() - { - } -} - - -/// fuer Datenfelder die mit in die Datenbank o.ae. kommen sollen, aber nicht durch den -/// user in irgendeiner art und weise gesehen und manipuliert werden koennen - -class BlindField -{ - var $name; - var $value; - - function __construct($name,$value) - { - $this->name = $name; - $this->value = $value; - } - function Get(){} - function GetClose(){} -} - - -class HTMLInput -{ - var $name; - var $type; - var $value; - var $dbvalue; - var $checkvalue; - var $onchange; - var $onclick; - var $defvalue; - var $size; - var $maxlength; - var $tabindex; - var $id=""; - var $readonly=""; - var $disabled=""; - var $placeholder=""; - var $class; - var $checked; - - function __construct($name,$type,$value,$size="",$maxlength="",$id="",$defvalue="",$checked="",$readonly="",$disabled="",$class="",$onclick="",$tabindex="",$placeholder="") - { - $this->name = $name; - $this->type = $type; - $this->value = $value; - $this->size = $size; - $this->maxlength = $maxlength; - $this->id = $id; - $this->readonly = $readonly; - $this->disabled = $disabled; - $this->class=$class; - $this->checked=$checked; - $this->tabindex=$tabindex; - $this->placeholder=$placeholder; - $this->defvalue=$defvalue; // if value is empty use this - $this->onclick=$onclick; - - } - - function Get() - { - if($this->id=="") $this->id = $this->name; - - switch($this->type) - { - case "text": - $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" - name=\"{$this->name}\" value=\"".preg_replace("/\"/",""",$this->value)."\" size=\"{$this->size}\" placeholder=\"{$this->placeholder}\" - maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; - break; - case "password": - $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" - name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\" - maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; - break; - case "checkbox": - $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" - name=\"{$this->name}\" value=\"{$this->value}\" {$this->checked} onchange=\"{$this->onchange}\" onclick=\"{$this->onclick}\" - {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; - break; - case "radio": - - if($this->value==$this->defvalue) $this->checked="checked"; - - $tmpname = str_replace('_'.$this->defvalue,'',$this->name); - - $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" - name=\"{$tmpname}\" value=\"{$this->defvalue}\" {$this->checked} onchange=\"{$this->onchange}\" - {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; - break; - case "submit": - $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" - name=\"{$this->name}\" value=\"{$this->value}\" - {$this->readonly} {$this->disabled}>"; - break; - case "hidden": - $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" - name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\" - maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled}>"; - break; - } - - return $html; - } - - function GetClose() - { - } -} - - - -class HTMLCheckbox extends HTMLInput -{ - function __construct($name,$value,$defvalue,$checkvalue="",$onclick="",$tabindex="") - { - - if($checkvalue!="") - $this->checkvalue=$checkvalue; - else - $this->checkvalue=$value; - - $this->name = $name; - $this->type = "checkbox"; - $this->checkradiovalue = isset($okvalue)?$okvalue:null; - $this->defvalue = $defvalue; - $this->value = $value; - $this->onclick= $onclick; - $this->tabindex= $tabindex; - $this->orgvalue = $value; - } - - - function Get() - { - if(($this->value=="" && $this->defvalue==$this->checkvalue)) { - } - if($this->checkvalue==$this->value) { - $this->checked="checked"; - } - if($this->value=="" && $this->defvalue!=$this->checkvalue) - $this->checked=""; - - $this->value = $this->checkvalue; - //$this->value=1; - return parent::Get(); - } - - function GetClose() - { - } - -}; - -class HTMLSelect -{ - var $name; - var $size; - var $id; - var $readonly; - var $disabled; - - var $options; - var $onchange; - var $selected; - var $tabindex; - - var $class; - - function __construct($name,$size,$id="",$readonly=false,$disabled=false,$tabindex="") - { - $this->name=$name; - $this->size=$size; - $this->id=$id; - $this->readonly=$readonly; - $this->disabled=$disabled; - $this->tabindex=$tabindex; - $this->class=""; - - if($id=="") - $this->id = $name; - } - - function AddOption($option,$value) - { - $this->options[] = array($option,$value); - } - - function AddOptionsDimensionalArray($values) - { - foreach($values as $key=>$value) - { - $this->options[] = array($value[wert],$value[schluessel]); - } - } - - - function AddOptionsAsocSimpleArray($values) - { - foreach($values as $key=>$value) - $this->options[] = array($value,$key); - } - - function AddOptionsSimpleArray($values) - { - if(is_array($values)) - { - foreach($values as $key=>$value) - { - if(!is_numeric($key)) - $this->options[] = array($value,$key); - else - $this->options[] = array($value,$value); - } - } - } - - function AddOptions($values) - { - $number=0; - if(count($values)>0) - { - foreach($values as $key=>$row) - foreach($row as $value) - { - if($number==0){ - $option=$value; - $number=1; - } - else { - $this->options[] = array($option,$value); - $number=0; - $option=""; - } - } - } - - } - - function Get() - { - $html = ""; - return $html; - } - - function GetClose() - { - } - -} - +action=$action; + $this->name=$name; + $this->method=$method; + $this->id=$id; + } + + function Set($value) + { + } + + function Get() + { + + } + + function GetClose() + { + } +} + + + +class HTMLTextarea +{ + var $name; + var $rows; + var $value; + var $cols; + var $id=""; + var $readonly=""; + var $disabled=""; + var $class; + + function __construct($name,$rows,$cols,$defvalue="",$id="",$readonly="",$disabled="",$class="") + { + $this->name = $name; + $this->rows = $rows; + $this->cols = $cols; + $this->class = $class; + $this->value = $defvalue; + $this->id = $id; + + if($id=="") + $this->id = $name; + + $this->readonly = $readonly; + $this->disabled = $disabled; + } + + function Get() + { + // TEMP ACHTUNG HIER IST MIST!!! + $value = $this->value; +/* + if(!defined('WFHTMLTextareabr') || !WFHTMLTextareabr)$value = preg_replace('//i', "\n", $value); + */ + // $value = str_replace("\\r\\n","\n",$value); + + $html = ""; + return $html; + } + + function GetClose() + { + } +} + + +/// fuer Datenfelder die mit in die Datenbank o.ae. kommen sollen, aber nicht durch den +/// user in irgendeiner art und weise gesehen und manipuliert werden koennen + +class BlindField +{ + var $name; + var $value; + + function __construct($name,$value) + { + $this->name = $name; + $this->value = $value; + } + function Get(){} + function GetClose(){} +} + + +class HTMLInput +{ + var $name; + var $type; + var $value; + var $dbvalue; + var $checkvalue; + var $onchange; + var $onclick; + var $defvalue; + var $size; + var $maxlength; + var $tabindex; + var $id=""; + var $readonly=""; + var $disabled=""; + var $placeholder=""; + var $class; + var $checked; + + function __construct($name,$type,$value,$size="",$maxlength="",$id="",$defvalue="",$checked="",$readonly="",$disabled="",$class="",$onclick="",$tabindex="",$placeholder="") + { + $this->name = $name; + $this->type = $type; + $this->value = $value; + $this->size = $size; + $this->maxlength = $maxlength; + $this->id = $id; + $this->readonly = $readonly; + $this->disabled = $disabled; + $this->class=$class; + $this->checked=$checked; + $this->tabindex=$tabindex; + $this->placeholder=$placeholder; + $this->defvalue=$defvalue; // if value is empty use this + $this->onclick=$onclick; + + } + + function Get() + { + if($this->id=="") $this->id = $this->name; + + switch($this->type) + { + case "text": + $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" + name=\"{$this->name}\" value=\"".preg_replace("/\"/",""",$this->value)."\" size=\"{$this->size}\" placeholder=\"{$this->placeholder}\" + maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; + break; + case "password": + $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" + name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\" + maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; + break; + case "checkbox": + $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" + name=\"{$this->name}\" value=\"{$this->value}\" {$this->checked} onchange=\"{$this->onchange}\" onclick=\"{$this->onclick}\" + {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; + break; + case "radio": + + if($this->value==$this->defvalue) $this->checked="checked"; + + $tmpname = str_replace('_'.$this->defvalue,'',$this->name); + + $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\" + name=\"{$tmpname}\" value=\"{$this->defvalue}\" {$this->checked} onchange=\"{$this->onchange}\" + {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>"; + break; + case "submit": + $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" + name=\"{$this->name}\" value=\"{$this->value}\" + {$this->readonly} {$this->disabled}>"; + break; + case "hidden": + $html = "type}\" id=\"{$this->id}\" class=\"{$this->class}\" + name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\" + maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled}>"; + break; + } + + return $html; + } + + function GetClose() + { + } +} + + + +class HTMLCheckbox extends HTMLInput +{ + function __construct($name,$value,$defvalue,$checkvalue="",$onclick="",$tabindex="") + { + + if($checkvalue!="") + $this->checkvalue=$checkvalue; + else + $this->checkvalue=$value; + + $this->name = $name; + $this->type = "checkbox"; + $this->checkradiovalue = isset($okvalue)?$okvalue:null; + $this->defvalue = $defvalue; + $this->value = $value; + $this->onclick= $onclick; + $this->tabindex= $tabindex; + $this->orgvalue = $value; + } + + + function Get() + { + if(($this->value=="" && $this->defvalue==$this->checkvalue)) { + } + if($this->checkvalue==$this->value) { + $this->checked="checked"; + } + if($this->value=="" && $this->defvalue!=$this->checkvalue) + $this->checked=""; + + $this->value = $this->checkvalue; + //$this->value=1; + return parent::Get(); + } + + function GetClose() + { + } + +}; + +class HTMLSelect +{ + var $name; + var $size; + var $id; + var $readonly; + var $disabled; + + var $options; + var $onchange; + var $selected; + var $tabindex; + + var $class; + + function __construct($name,$size,$id="",$readonly=false,$disabled=false,$tabindex="") + { + $this->name=$name; + $this->size=$size; + $this->id=$id; + $this->readonly=$readonly; + $this->disabled=$disabled; + $this->tabindex=$tabindex; + $this->class=""; + + if($id=="") + $this->id = $name; + } + + function AddOption($option,$value) + { + $this->options[] = array($option,$value); + } + + function AddOptionsDimensionalArray($values) + { + foreach($values as $key=>$value) + { + $this->options[] = array($value[wert],$value[schluessel]); + } + } + + + function AddOptionsAsocSimpleArray($values) + { + foreach($values as $key=>$value) + $this->options[] = array($value,$key); + } + + function AddOptionsSimpleArray($values) + { + if(is_array($values)) + { + foreach($values as $key=>$value) + { + if(!is_numeric($key)) + $this->options[] = array($value,$key); + else + $this->options[] = array($value,$value); + } + } + } + + function AddOptions($values) + { + $number=0; + if(count($values)>0) + { + foreach($values as $key=>$row) + foreach($row as $value) + { + if($number==0){ + $option=$value; + $number=1; + } + else { + $this->options[] = array($option,$value); + $number=0; + $option=""; + } + } + } + + } + + function Get() + { + $html = ""; + return $html; + } + + function GetClose() + { + } + +} + diff --git a/phpwf/plugins/class.yui.php b/phpwf/plugins/class.yui.php index 5cf512ef..d01d209c 100644 --- a/phpwf/plugins/class.yui.php +++ b/phpwf/plugins/class.yui.php @@ -2855,16 +2855,60 @@ class YUI { } else if ($module == "verbindlichkeit") // OpenXE - { - $sql = "SELECT $sortcol, if(b.beschreibung!='', - if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnung,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnung,' *')), - if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung)) - as Artikel, - p.abkuerzung as projekt, a.nummer as nummer, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, " . $this->FormatPreis($preiscell) . " as preis, CONCAT(k.sachkonto,' - ',k.beschriftung) AS sachkonto, b.id as id - FROM $table b - LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id - LEFT JOIN kontorahmen k ON k.id = b.sachkonto - WHERE b.$module='$id'"; + { + $sql = " + SELECT + $sortcol, + IF( + b.beschreibung != '', + IF( + CHAR_LENGTH(b.bezeichnung) > " . $this->app->erp->MaxArtikelbezeichnung() . ", + CONCAT( + SUBSTR( + CONCAT(b.bezeichnung, ' *'), + 1, + " . $this->app->erp->MaxArtikelbezeichnung() . " + ), + '...' + ), + CONCAT(b.bezeichnung, ' *') + ), + IF( + CHAR_LENGTH(b.bezeichnung) > " . $this->app->erp->MaxArtikelbezeichnung() . ", + CONCAT( + SUBSTR( + b.bezeichnung, + 1, + " . $this->app->erp->MaxArtikelbezeichnung() . " + ), + '...' + ), + b.bezeichnung + ) + ) AS Artikel, + p.abkuerzung AS projekt, + a.nummer, + ".$this->app->erp->FormatDate('lieferdatum')." AS lieferdatum, + TRIM(b.menge) +0 AS menge, + " . $this->FormatPreis($preiscell) . " AS preis, + " . $this->FormatPreis($preiscell."*menge") . " AS Betrag, + CONCAT( + k.sachkonto, + ' - ', + k.beschriftung + ) AS sachkonto, + b.id AS id + FROM + $table b + LEFT JOIN artikel a ON + a.id = b.artikel + LEFT JOIN projekt p ON + b.projekt = p.id + LEFT JOIN kontorahmen k ON + k.id = b.sachkonto + WHERE + b.$module = '$id' + "; } else { $sql = null; @@ -14875,8 +14919,6 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl $table->headings[4] = 'Abr. bei Kd'; $table->headings[5] = 'sonst. MwSt'; // kann man auch umbenennen in Keine - - $table->headings[6] = 'MwSt'; $table->headings[7] = 'Kommentar'; $table->headings[8] = 'Bezahlt'; diff --git a/upgrade/data/db_schema.json b/upgrade/data/db_schema.json index 0cdae6d1..28e41a5b 100644 --- a/upgrade/data/db_schema.json +++ b/upgrade/data/db_schema.json @@ -52371,6 +52371,17 @@ "Privileges": "select,insert,update,references", "Comment": "" }, + { + "Field": "nummer", + "Type": "int(11)", + "Collation": null, + "Null": "NO", + "Key": "PRI", + "Default": null, + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" + }, { "Field": "bezeichnung", "Type": "varchar(255)", @@ -52382,6 +52393,17 @@ "Privileges": "select,insert,update,references", "Comment": "" }, + { + "Field": "beschreibung", + "Type": "varchar(255)", + "Collation": "utf8mb3_general_ci", + "Null": "NO", + "Key": "", + "Default": null, + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" + }, { "Field": "projekt", "Type": "varchar(255)", @@ -108959,6 +108981,17 @@ "Privileges": "select,insert,update,references", "Comment": "" }, + { + "Field": "datum", + "Type": "date", + "Collation": null, + "Null": "YES", + "Key": "", + "Default": null, + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" + }, { "Field": "status_beleg", "Type": "varchar(64)", @@ -110685,6 +110718,39 @@ "Extra": "", "Privileges": "select,insert,update,references", "Comment": "" + }, + { + "Field": "steuersatz_normal", + "Type": "decimal(5,2)", + "Collation": null, + "Null": "NO", + "Key": "", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" + }, + { + "Field": "steuersatz_ermaessigt", + "Type": "decimal(5,2)", + "Collation": null, + "Null": "NO", + "Key": "", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" + }, + { + "Field": "ust_befreit", + "Type": "int(1)", + "Collation": null, + "Null": "NO", + "Key": "", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" } ], "keys": [ diff --git a/www/lib/class.erpapi.php b/www/lib/class.erpapi.php index b26ef436..cf79da0d 100644 --- a/www/lib/class.erpapi.php +++ b/www/lib/class.erpapi.php @@ -35375,6 +35375,7 @@ function Firmendaten($field,$projekt="") { case 'bestellung': case 'anfrage': + case 'verbindlichkeit': $aufwendung = true; break; } diff --git a/www/pages/content/verbindlichkeit_edit.tpl b/www/pages/content/verbindlichkeit_edit.tpl index 83562c18..005111c2 100644 --- a/www/pages/content/verbindlichkeit_edit.tpl +++ b/www/pages/content/verbindlichkeit_edit.tpl @@ -9,16 +9,19 @@ [FORMHANDLEREVENT]
-
+
-
+
{|Verbindlichkeit [BELEGNR] Lf-Nr. [LIEFERANTENNUMMER]|} - [STATUSICONS] -
+ [STATUSICONS] +
+
+ +
@@ -27,14 +30,22 @@
-
+
+ + + + @@ -42,7 +53,7 @@ {|Rechnung|}: @@ -50,26 +61,82 @@ {|Rechnungsdatum|}: + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ {|Status|}: + + +
{|Adresse|}: - +
- +
- +
+ {|Eingangsdatum|}: + + +
{|Betrag|}: - - + +
+ {|Betrag netto|}: + + +
{|Zahlbarbis|}: - + +
+ {|Skonto %|}: + +
+ {|Skontobis|}: + + +
+ {|Waren-/Leistungsprüfung (Einkauf)|}: + + +
+ {|Rechnungseingangsprüfung (Buchhaltung)|}: + + +
+ {|Bezahlt|}: + + +
{|Projekt|}: @@ -78,38 +145,6 @@
- {|Eingangsdatum|}: - - -
- {|Zahlungsweise|}: - - -
- {|Skonto|}: - - -
- {|Skontobis|}: - - -
{|Kostenstelle|}: @@ -117,45 +152,13 @@
- {|Sachkonto|}: - - -
- {|Waren-/Leistungsprüfung (Einkauf)|}: - - -
- {|Rechnungseingangsprüfung (Buchhaltung)|}: - - -
- {|Bezahlt|}: - - -
{|Internebemerkung|}: - +
@@ -166,7 +169,7 @@
-
+
{|Vorschau|} @@ -176,7 +179,6 @@
-
diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php index ac4de5e3..a0d39f3e 100644 --- a/www/pages/verbindlichkeit.php +++ b/www/pages/verbindlichkeit.php @@ -1,7 +1,8 @@ app->ActionHandler("dateien", "verbindlichkeit_dateien"); $this->app->ActionHandler("inlinepdf", "verbindlichkeit_inlinepdf"); $this->app->ActionHandler("positioneneditpopup", "verbindlichkeit_positioneneditpopup"); + $this->app->ActionHandler("freigabe", "verbindlichkeit_freigabe"); $this->app->DefaultActionHandler("list"); $this->app->ActionHandlerListen($app); @@ -35,7 +37,7 @@ class Verbindlichkeit { switch ($name) { case "verbindlichkeit_list": $allowed['verbindlichkeit_list'] = array('list'); - $heading = array('','','Belegnr','Adresse', 'Lieferant', 'RE-Nr', 'RE-Datum', 'Betrag (brutto)', 'Währung', 'Ziel','Skontoziel','Skonto','Monitor', 'Menü'); + $heading = array('','','Belegnr','Adresse', 'Lieferant', 'RE-Nr', 'RE-Datum', 'Betrag (brutto)', 'Währung', 'Ziel','Skontoziel','Skonto','Status','Monitor', 'Menü'); $width = array('1%','1%','10%'); // Fill out manually later // columns that are aligned right (numbers etc) @@ -54,6 +56,7 @@ class Verbindlichkeit { 'v.zahlbarbis', 'v.skontobis', 'v.skonto', + 'v.status', 'v.status_beleg', 'v.id' ); @@ -91,6 +94,7 @@ class Verbindlichkeit { ".$app->erp->FormatDate("v.zahlbarbis").", IF(v.skonto <> 0,".$app->erp->FormatDate("v.skontobis").",''), IF(v.skonto <> 0,CONCAT(".$app->erp->FormatMenge('v.skonto',0).",'%'),''), + v.status, ".$app->YUI->IconsSQLVerbindlichkeit().", v.id FROM verbindlichkeit v LEFT JOIN adresse a ON v.adresse = a.id @@ -159,17 +163,30 @@ class Verbindlichkeit { if (empty($id)) { // New item $id = 'NULL'; + $input['status'] = 'angelegt'; } if ($submit != '') { - // Write to database - + // Write to database // Add checks here + $status = $this->app->DB->Select("SELECT status FROM verbindlichkeit WHERE id =".$id); - // $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form? - $input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form? + if ($status != 'angelegt' && $id != 'NULL') { + $internebemerkung = $input['internebemerkung']; + unset($input); + $input['internebemerkung'] = $internebemerkung; + } else { + $input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form? + $input['rechnungsdatum'] = $this->app->erp->ReplaceDatum(true,$input['rechnungsdatum'],true); // Parameters: Target db?, value, from form? + $input['eingangsdatum'] = $this->app->erp->ReplaceDatum(true,$input['eingangsdatum'],true); // Parameters: Target db?, value, from form? + $input['skontobis'] = $this->app->erp->ReplaceDatum(true,$input['skontobis'],true); // Parameters: Target db?, value, from form? + $input['zahlbarbis'] = $this->app->erp->ReplaceDatum(true,$input['zahlbarbis'],true); // Parameters: Target db?, value, from form? + $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); + $input['kostenstelle'] = $this->app->erp->ReplaceKostenstelle(true,$input['kostenstelle'],true); + $input['sachkonto'] = $this->app->erp->ReplaceKontorahmen(true,$input['sachkonto'],true); + } $columns = "id, "; $values = "$id, "; @@ -196,8 +213,9 @@ class Verbindlichkeit { $this->app->DB->Update($sql); if ($id == 'NULL') { + $id = $this->app->DB->GetInsertID(); $msg = $this->app->erp->base64_url_encode("
Das Element wurde erfolgreich angelegt.
"); - header("Location: index.php?module=verbindlichkeit&action=list&msg=$msg"); + header("Location: index.php?module=verbindlichkeit&action=edit&id=$id&msg=$msg"); } else { $this->app->Tpl->Set('MESSAGE', "
Die Einstellungen wurden erfolgreich übernommen.
"); } @@ -216,6 +234,49 @@ class Verbindlichkeit { $verbindlichkeit_from_db = $result[0]; } + // Summarize positions + + $sql = "SELECT * FROM verbindlichkeit_position WHERE verbindlichkeit = ".$id; + $positionen = $this->app->DB->SelectArr($sql); + + if (!empty($positionen)) { + $betrag_netto = 0; + $betrag_brutto = 0; + $steuer_normal = 0; + $steuer_ermaessigt = 0; + + /* + Normal: umsatzsteuer leer, steuersatz = leer + Ermäßigt: umsatzsteuer ermaessigt, steuersatz = -1 + Befreit: umsatzsteuer befreit, steursatz = -1 + Individuell: umsatzsteuer leer, steuersatz = wert + */ + + foreach ($positionen as $position) { + + $tmpsteuersatz = null; + $tmpsteuertext = null; + $erloes = null; + + // function GetSteuerPosition($typ, $posid,&$tmpsteuersatz = null, &$tmpsteuertext = null, &$erloes = null) + + $this->app->erp->GetSteuerPosition("verbindlichkeit",$position['id'],$tmpsteuersatz,$tmpsteuertext,$erloes); + + $position['steuersatz_berechnet'] = $tmpsteuersatz; + $position['steuertext_berechnet'] = $tmpsteuertext; + $position['steuererloes_berechnet'] = $erloes; + + $betrag_netto += ($position['menge']*$position['preis']); + $betrag_brutto += ($position['menge']*$position['preis'])*(1+($tmpsteuersatz/100)); + + } + + $this->app->Tpl->Set('BETRAGNETTO', $betrag_netto); + $this->app->Tpl->Set('BETRAGBRUTTO', round($betrag_brutto,2)); + + $this->app->Tpl->Set('BETRAGDISABLED', 'disabled'); + + } /* * Add displayed items later @@ -228,6 +289,23 @@ class Verbindlichkeit { */ + if ($verbindlichkeit_from_db['status'] != 'angelegt' && $id != 'NULL') { + $this->app->Tpl->Set('SAVEDISABLED','disabled'); + } + + $this->app->Tpl->Set('FREIGABECHECKED', $verbindlichkeit_from_db['freigabe']==1?"checked":""); + $this->app->Tpl->Set('RECHNUNGSFREIGABECHECKED', $verbindlichkeit_from_db['rechnungsfreigabe']==1?"checked":""); + $this->app->Tpl->Set('BEZAHLTCHECKED', $verbindlichkeit_from_db['bezahlt']==1?"checked":""); + + $this->app->Tpl->Set('RECHNUNGSDATUM',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['rechnungsdatum'],false)); + $this->app->YUI->DatePicker("rechnungsdatum"); + $this->app->Tpl->Set('EINGANGSDATUM',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['eingangsdatum'],false)); + $this->app->YUI->DatePicker("eingangsdatum"); + $this->app->Tpl->Set('SKONTOBIS',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['skontobis'],false)); + $this->app->YUI->DatePicker("skontobis"); + $this->app->Tpl->Set('ZAHLBARBIS',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['zahlbarbis'],false)); + $this->app->YUI->DatePicker("zahlbarbis"); + $this->app->Tpl->Add('KURZUEBERSCHRIFT2', $verbindlichkeit_from_db['adresse_name']." ".$verbindlichkeit_from_db['rechnung']); $sql = "SELECT " . $this->app->YUI->IconsSQLVerbindlichkeit() . " AS `icons` FROM verbindlichkeit v WHERE id=$id"; @@ -235,6 +313,12 @@ class Verbindlichkeit { $this->app->Tpl->Add('STATUSICONS', $icons[0]['icons']); $this->app->YUI->AutoComplete("adresse", "adresse"); + $this->app->YUI->AutoComplete("projekt", "projektname", 1); + $this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$verbindlichkeit_from_db['projekt'],false)); + $this->app->YUI->AutoComplete("kostenstelle", "kostenstelle", 1); + $this->app->Tpl->Set('KOSTENSTELLE',$this->app->erp->ReplaceKostenstelle(false,$verbindlichkeit_from_db['kostenstelle'],false)); + $this->app->YUI->AutoComplete("sachkonto","sachkonto_aufwendungen",1); + $this->app->Tpl->Set('SACHKONTO',$this->app->erp->ReplaceKontorahmen(false,$verbindlichkeit_from_db['sachkonto'],false)); $waehrungenselect = $this->app->erp->GetSelect($this->app->erp->GetWaehrung(), $verbindlichkeit_from_db['waehrung']); $this->app->Tpl->Set('WAEHRUNG', $waehrungenselect); @@ -243,11 +327,17 @@ class Verbindlichkeit { $this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display - $file = urlencode("../../../../index.php?module=verbindlichkeit&action=inlinepdf&id=$id"); - $iframe = ""; - $this->app->Tpl->Set('INLINEPDF', $iframe); + $anzahldateien = $this->app->erp->AnzahlDateien("verbindlichkeit",$id); + if ($anzahldateien > 0) { + $file = urlencode("../../../../index.php?module=verbindlichkeit&action=inlinepdf&id=$id"); + $iframe = ""; + $this->app->Tpl->Set('INLINEPDF', $iframe); + } else { + $this->app->Tpl->Set('INLINEPDF', 'Keine Dateien vorhanden.'); + } $this->app->Tpl->Parse('PAGE', "verbindlichkeit_edit.tpl"); + } /** @@ -263,12 +353,12 @@ class Verbindlichkeit { $input['skonto'] = $this->app->Secure->GetPOST('skonto'); $input['skontobis'] = $this->app->Secure->GetPOST('skontobis'); $input['projekt'] = $this->app->Secure->GetPOST('projekt'); - $input['bezahlt'] = $this->app->Secure->GetPOST('bezahlt'); + $input['bezahlt'] = $this->app->Secure->GetPOST('bezahlt')?'1':'0';; $input['zahlungsweise'] = $this->app->Secure->GetPOST('zahlungsweise'); $input['eingangsdatum'] = $this->app->Secure->GetPOST('eingangsdatum'); $input['rechnungsdatum'] = $this->app->Secure->GetPOST('rechnungsdatum'); - $input['freigabe'] = $this->app->Secure->GetPOST('freigabe'); - $input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe'); + $input['freigabe'] = $this->app->Secure->GetPOST('freigabe')?'1':'0'; + $input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe')?'1':'0'; $input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle'); $input['sachkonto'] = $this->app->Secure->GetPOST('sachkonto'); $input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung'); @@ -283,9 +373,25 @@ class Verbindlichkeit { } else { $anzahldateien=""; } + + if ($id != 'NULL') { + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=dateien&id=$id", "Dateien".$anzahldateien); + } + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details"); $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht"); - $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=dateien&id=$id", "Dateien".$anzahldateien); + + $invoiceArr = $this->app->DB->SelectRow("SELECT v.belegnr, a.name, v.status FROM verbindlichkeit v LEFT JOIN adresse a ON v.adresse = a.id WHERE v.id='$id' LIMIT 1"); + $belegnr = $invoiceArr['belegnr']; + $name = $invoiceArr['name']; + if($belegnr=='0' || $belegnr=='') { + $belegnr ='(Entwurf)'; + } + $this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Rechnung $belegnr"); + $status = $invoiceArr['status']; + if ($status==='angelegt') { + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=freigabe&id=$id",'Freigabe'); + } } function verbindlichkeit_dateien() @@ -402,4 +508,12 @@ class Verbindlichkeit { $this->app->BuildNavigation=false; } + function verbindlichkeit_freigabe() + { + $id = $this->app->Secure->GetGET('id'); + $this->app->erp->BelegFreigabe('verbindlichkeit',$id); + $this->verbindlichkeit_edit(); + } + + } diff --git a/www/widgets/_gen/widget.gen.verbindlichkeit_position.php b/www/widgets/_gen/widget.gen.verbindlichkeit_position.php index 8fe52cc0..71b00ae7 100644 --- a/www/widgets/_gen/widget.gen.verbindlichkeit_position.php +++ b/www/widgets/_gen/widget.gen.verbindlichkeit_position.php @@ -85,10 +85,7 @@ class WidgetGenverbindlichkeit_position $this->form->NewField($field); $this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE"); - $field = new HTMLInput("preis","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("waehrung","text","","15","","","","","","","","0","",""); + $field = new HTMLInput("preis","text","","40","","","","","","","","0","",""); $this->form->NewField($field); $field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0"); diff --git a/www/widgets/templates/_gen/verbindlichkeit_position.tpl b/www/widgets/templates/_gen/verbindlichkeit_position.tpl index 24c4ac26..a8923644 100644 --- a/www/widgets/templates/_gen/verbindlichkeit_position.tpl +++ b/www/widgets/templates/_gen/verbindlichkeit_position.tpl @@ -36,8 +36,8 @@ $('#anderersteuersatz').click(function() { if (!$(this).is(':checked')) { {|Artikel-Nr|}:[NUMMER][MSGNUMMER] {|Beschreibung|}:[BESCHREIBUNG][MSGBESCHREIBUNG] {|Menge|}:[MENGE][MSGMENGE] - {|Preis|}:[PREIS][MSGPREIS] - {|Währung|}:[WAEHRUNG][MSGWAEHRUNG] [WAEHRUNGSBUTTON] + {|Preis|}:[PREIS][MSGPREIS][WAEHRUNG] + {|Steuersatz|}:[UMSATZSTEUER][MSGUMSATZSTEUER]  [ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ] individuellen Steuersatz verwenden From 8f9ed4d7aeafd6ec7e3881326f442d0d287b5ed4 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Mon, 25 Dec 2023 21:30:58 +0100 Subject: [PATCH 05/13] zwischenstand verbindlichkeit filert, multi-action, forms --- phpwf/plugins/class.yui.php | 17 +- www/pages/content/verbindlichkeit_edit.tpl | 28 ++-- www/pages/content/verbindlichkeit_list.tpl | 56 ++++++- www/pages/verbindlichkeit.php | 173 +++++++++++++++++++-- 4 files changed, 233 insertions(+), 41 deletions(-) diff --git a/phpwf/plugins/class.yui.php b/phpwf/plugins/class.yui.php index d01d209c..61630ae7 100644 --- a/phpwf/plugins/class.yui.php +++ b/phpwf/plugins/class.yui.php @@ -3606,24 +3606,11 @@ class YUI { $stop_betragbezahlt = "\"Zahlungapp->Conf->WFconf['defaulttheme']}/images/vorkassestop.png\" style=\"margin-right:1px\" title=\"Zahlung fehlt\" border=\"0\">"; $gostop_betragbezahlt = "\"teilweiseapp->Conf->WFconf['defaulttheme']}/images/vorkassegostop.png\" style=\"margin-right:1px\" title=\"teilweise bezahlt\" border=\"0\">"; - $go_betragbezahlt = "\"nichtapp->Conf->WFconf['defaulttheme']}/images/vorkassego.png\" style=\"margin-right:1px\" title=\"komplett bezahlt\" border=\"0\">"; + $go_betragbezahlt = "\"nichtapp->Conf->WFconf['defaulttheme']}/images/vorkassego.png\" style=\"margin-right:1px\" title=\"bezahlt\" border=\"0\">"; return "CONCAT('
', if(v.freigabe,'$go_ware','$stop_ware'), if(v.rechnungsfreigabe,'$go_summe','$stop_summe'), - IF( v.betragbezahlt = 0 OR (v.betrag > 0 AND v.betragbezahlt < 0),'$stop_betragbezahlt', - IF(v.betrag > 0 AND (v.betragbezahlt + v.skonto_erhalten) >= v.betrag, '$go_betragbezahlt', - IF(v.betrag - v.betragbezahlt <= v.betrag-((v.betrag/100.0)*v.skonto), - '$gostop_betragbezahlt', - '$go_betragbezahlt' - ) - ) - ), - if(( - (SELECT COUNT(ka.id) - FROM kontoauszuege_zahlungsausgang ka WHERE ka.parameter=v.id AND ka.objekt='verbindlichkeit') + - (SELECT COUNT(ke.id) FROM kontoauszuege_zahlungseingang ke WHERE ke.parameter=v.id AND ke.objekt='verbindlichkeit')) > 0, - '$go_zahlung','$stop_zahlung' - ), + if(v.bezahlt,'$go_betragbezahlt','$stop_betragbezahlt'), '
')"; } diff --git a/www/pages/content/verbindlichkeit_edit.tpl b/www/pages/content/verbindlichkeit_edit.tpl index 005111c2..c99b1428 100644 --- a/www/pages/content/verbindlichkeit_edit.tpl +++ b/www/pages/content/verbindlichkeit_edit.tpl @@ -45,7 +45,7 @@ {|Adresse|}: - + @@ -74,16 +74,24 @@ - {|Betrag|}: + {|Betrag brutto|}: - + - + - {|Betrag netto|}: + {|Betrag Positionen brutto|}: + + + + + + + + {|Betrag Positionen netto|}: @@ -118,7 +126,7 @@ {|Waren-/Leistungsprüfung (Einkauf)|}: - + Wird gesetzt wenn Wareneingangspositionen vollständig @@ -126,7 +134,8 @@ {|Rechnungseingangsprüfung (Buchhaltung)|}: - + + @@ -134,9 +143,10 @@ {|Bezahlt|}: - + + - + {|Projekt|}: diff --git a/www/pages/content/verbindlichkeit_list.tpl b/www/pages/content/verbindlichkeit_list.tpl index 394c103a..6a846aae 100644 --- a/www/pages/content/verbindlichkeit_list.tpl +++ b/www/pages/content/verbindlichkeit_list.tpl @@ -4,7 +4,61 @@
[MESSAGE] - [TAB1] + +
+
+
{|Filter|}
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+ +
+
+
+ +
+ [TAB1] +
{|Stapelverarbeitung|} +  {|alle markieren|}  + +   +
+
[TAB1NEXT]
+ + diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php index a0d39f3e..5343876e 100644 --- a/www/pages/verbindlichkeit.php +++ b/www/pages/verbindlichkeit.php @@ -24,6 +24,9 @@ class Verbindlichkeit { $this->app->ActionHandler("inlinepdf", "verbindlichkeit_inlinepdf"); $this->app->ActionHandler("positioneneditpopup", "verbindlichkeit_positioneneditpopup"); $this->app->ActionHandler("freigabe", "verbindlichkeit_freigabe"); + $this->app->ActionHandler("freigabeeinkauf", "verbindlichkeit_freigabeeinkauf"); + $this->app->ActionHandler("freigabebuchhaltung", "verbindlichkeit_freigabebuchhaltung"); + $this->app->ActionHandler("freigabebezahlt", "verbindlichkeit_freigabebezahlt"); $this->app->DefaultActionHandler("list"); $this->app->ActionHandlerListen($app); @@ -33,7 +36,7 @@ class Verbindlichkeit { /* Fill out manually later */ } - static function TableSearch(&$app, $name, $erlaubtevars) { + function TableSearch(&$app, $name, $erlaubtevars) { switch ($name) { case "verbindlichkeit_list": $allowed['verbindlichkeit_list'] = array('list'); @@ -105,6 +108,52 @@ class Verbindlichkeit { $count = "SELECT count(DISTINCT id) FROM verbindlichkeit WHERE $where"; // $groupby = ""; + // Toggle filters + $this->app->Tpl->Add('JQUERYREADY', "$('#wareneingang').click( function() { fnFilterColumn1( 0 ); } );"); + $this->app->Tpl->Add('JQUERYREADY', "$('#rechnungsfreigabe').click( function() { fnFilterColumn2( 0 ); } );"); + $this->app->Tpl->Add('JQUERYREADY', "$('#nichtbezahlt').click( function() { fnFilterColumn3( 0 ); } );"); + + for ($r = 1;$r <= 3;$r++) { + $this->app->Tpl->Add('JAVASCRIPT', ' + function fnFilterColumn' . $r . ' ( i ) + { + if(oMoreData' . $r . $name . '==1) + oMoreData' . $r . $name . ' = 0; + else + oMoreData' . $r . $name . ' = 1; + + $(\'#' . $name . '\').dataTable().fnFilter( + \'\', + i, + 0,0 + ); + } + '); + } + + + $more_data1 = $this->app->Secure->GetGET("more_data1"); + if ($more_data1 == 1) { + $where .= " AND v.freigabe <> '1'"; + } else { + } + + $more_data2 = $this->app->Secure->GetGET("more_data2"); + if ($more_data2 == 1) { + $where .= " AND v.rechnungsfreigabe <> '1'"; + } + else { + } + + $more_data3 = $this->app->Secure->GetGET("more_data3"); + if ($more_data3 == 1) { + $where .= " AND v.bezahlt <> '1'"; + } + else { + } + // END Toggle filters + + break; } @@ -119,12 +168,55 @@ class Verbindlichkeit { } function verbindlichkeit_list() { + + // Process multi action + $submit = $this->app->Secure->GetPOST('ausfuehren'); + if (!empty($submit)) { + $auswahl = $this->app->Secure->GetPOST('auswahl'); + $aktion = $this->app->Secure->GetPOST('sel_aktion'); + + $selectedIds = []; + if(!empty($auswahl)) { + foreach($auswahl as $selectedId) { + $selectedId = (int)$selectedId; + if($selectedId > 0) { + $selectedIds[] = $selectedId; + } + } + + switch ($aktion) { + case 'freigabeeinkauf': + echo("freigabeeinkauf"); + break; + case 'freigabebuchhaltung': + echo("freigabebuchhaltung"); + break; + case 'bezahlt': + echo("bezahlt"); + break; + } + } + } + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Übersicht"); $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=create", "Neu anlegen"); $this->app->erp->MenuEintrag("index.php", "Zurück"); $this->app->YUI->TableSearch('TAB1', 'verbindlichkeit_list', "show", "", "", basename(__FILE__), __CLASS__); + + if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabeeinkauf')){ + $this->app->Tpl->Set('MANUELLFREIGABEEINKAUF', ''); + } + + if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabebuchhaltung')){ + $this->app->Tpl->Set('MANUELLFREIGABEBUCHHALTUNG', ''); + } + + if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabebezahlt')){ + $this->app->Tpl->Set('ALSBEZAHLTMARKIEREN', ''); + } + $this->app->Tpl->Parse('PAGE', "verbindlichkeit_list.tpl"); } @@ -175,17 +267,24 @@ class Verbindlichkeit { if ($status != 'angelegt' && $id != 'NULL') { $internebemerkung = $input['internebemerkung']; + $projekt = $input['projekt']; + $kostenstelle = $input['kostenstelle']; unset($input); $input['internebemerkung'] = $internebemerkung; + $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$projekt,true); + $input['kostenstelle'] = $this->app->erp->ReplaceKostenstelle(true,$kostenstelle,true); } else { - $input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form? + $input['adresse'] = $this->app->erp->ReplaceLieferantennummer(true,$input['adresse'],true); // Parameters: Target db?, value, from form? $input['rechnungsdatum'] = $this->app->erp->ReplaceDatum(true,$input['rechnungsdatum'],true); // Parameters: Target db?, value, from form? $input['eingangsdatum'] = $this->app->erp->ReplaceDatum(true,$input['eingangsdatum'],true); // Parameters: Target db?, value, from form? $input['skontobis'] = $this->app->erp->ReplaceDatum(true,$input['skontobis'],true); // Parameters: Target db?, value, from form? $input['zahlbarbis'] = $this->app->erp->ReplaceDatum(true,$input['zahlbarbis'],true); // Parameters: Target db?, value, from form? $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); $input['kostenstelle'] = $this->app->erp->ReplaceKostenstelle(true,$input['kostenstelle'],true); - $input['sachkonto'] = $this->app->erp->ReplaceKontorahmen(true,$input['sachkonto'],true); + + if(empty($input['projekt']) && !empty($input['adresse'])) { + $input['projekt'] = $this->app->erp->GetCreateProjekt($input['adresse']); + } } $columns = "id, "; @@ -272,7 +371,7 @@ class Verbindlichkeit { } $this->app->Tpl->Set('BETRAGNETTO', $betrag_netto); - $this->app->Tpl->Set('BETRAGBRUTTO', round($betrag_brutto,2)); + $this->app->Tpl->Set('BETRAGBRUTTOPOS', round($betrag_brutto,2)); $this->app->Tpl->Set('BETRAGDISABLED', 'disabled'); @@ -293,7 +392,14 @@ class Verbindlichkeit { $this->app->Tpl->Set('SAVEDISABLED','disabled'); } - $this->app->Tpl->Set('FREIGABECHECKED', $verbindlichkeit_from_db['freigabe']==1?"checked":""); + if ($verbindlichkeit_from_db['status'] == 'angelegt' || $verbindlichkeit_from_db['rechnungsfreigabe']) { + $this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden'); + } + if ($verbindlichkeit_from_db['status'] == 'angelegt' || $verbindlichkeit_from_db['bezahlt'] == '1') { + $this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden'); + } + + $this->app->Tpl->Set('WARENEINGANGCHECKED', $verbindlichkeit_from_db['freigabe']==1?"checked":""); $this->app->Tpl->Set('RECHNUNGSFREIGABECHECKED', $verbindlichkeit_from_db['rechnungsfreigabe']==1?"checked":""); $this->app->Tpl->Set('BEZAHLTCHECKED', $verbindlichkeit_from_db['bezahlt']==1?"checked":""); @@ -306,26 +412,29 @@ class Verbindlichkeit { $this->app->Tpl->Set('ZAHLBARBIS',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['zahlbarbis'],false)); $this->app->YUI->DatePicker("zahlbarbis"); - $this->app->Tpl->Add('KURZUEBERSCHRIFT2', $verbindlichkeit_from_db['adresse_name']." ".$verbindlichkeit_from_db['rechnung']); - $sql = "SELECT " . $this->app->YUI->IconsSQLVerbindlichkeit() . " AS `icons` FROM verbindlichkeit v WHERE id=$id"; $icons = $this->app->DB->SelectArr($sql); $this->app->Tpl->Add('STATUSICONS', $icons[0]['icons']); - $this->app->YUI->AutoComplete("adresse", "adresse"); + $this->app->YUI->AutoComplete("adresse", "lieferant"); $this->app->YUI->AutoComplete("projekt", "projektname", 1); $this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$verbindlichkeit_from_db['projekt'],false)); $this->app->YUI->AutoComplete("kostenstelle", "kostenstelle", 1); $this->app->Tpl->Set('KOSTENSTELLE',$this->app->erp->ReplaceKostenstelle(false,$verbindlichkeit_from_db['kostenstelle'],false)); - $this->app->YUI->AutoComplete("sachkonto","sachkonto_aufwendungen",1); - $this->app->Tpl->Set('SACHKONTO',$this->app->erp->ReplaceKontorahmen(false,$verbindlichkeit_from_db['sachkonto'],false)); $waehrungenselect = $this->app->erp->GetSelect($this->app->erp->GetWaehrung(), $verbindlichkeit_from_db['waehrung']); $this->app->Tpl->Set('WAEHRUNG', $waehrungenselect); $this->app->Tpl->Set('ADRESSE_ID', $verbindlichkeit_from_db['adresse']); - $this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display + $this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceLieferantennummer(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display + + if (empty($verbindlichkeit_from_db['adresse'])) { + $this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden'); + $this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden'); + } + + $this->app->YUI->CkEditor("internebemerkung"); $anzahldateien = $this->app->erp->AnzahlDateien("verbindlichkeit",$id); if ($anzahldateien > 0) { @@ -360,13 +469,15 @@ class Verbindlichkeit { $input['freigabe'] = $this->app->Secure->GetPOST('freigabe')?'1':'0'; $input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe')?'1':'0'; $input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle'); - $input['sachkonto'] = $this->app->Secure->GetPOST('sachkonto'); $input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung'); return $input; } function verbindlichkeit_menu($id) { + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details"); + $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht"); + $anzahldateien = $this->app->erp->AnzahlDateien("verbindlichkeit",$id); if ($anzahldateien > 0) { $anzahldateien = " (".$anzahldateien.")"; @@ -378,16 +489,13 @@ class Verbindlichkeit { $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=dateien&id=$id", "Dateien".$anzahldateien); } - $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details"); - $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht"); - $invoiceArr = $this->app->DB->SelectRow("SELECT v.belegnr, a.name, v.status FROM verbindlichkeit v LEFT JOIN adresse a ON v.adresse = a.id WHERE v.id='$id' LIMIT 1"); $belegnr = $invoiceArr['belegnr']; $name = $invoiceArr['name']; if($belegnr=='0' || $belegnr=='') { $belegnr ='(Entwurf)'; } - $this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Rechnung $belegnr"); + $this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Verbindlichkeit $belegnr"); $status = $invoiceArr['status']; if ($status==='angelegt') { $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=freigabe&id=$id",'Freigabe'); @@ -515,5 +623,38 @@ class Verbindlichkeit { $this->verbindlichkeit_edit(); } + function verbindlichkeit_freigabeeinkauf($id) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + } + $sql = "UPDATE verbindlichkeit SET freigabe = 1 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Einkauf)"); + $this->verbindlichkeit_edit(); + } + + + function verbindlichkeit_freigabebuchhaltung($id) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + } + $sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 1 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Buchhaltung)"); + $this->verbindlichkeit_edit(); + } + + function verbindlichkeit_freigabebezahlt($id) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + } + $sql = "UPDATE verbindlichkeit SET bezahlt = 1 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit als bezahlt markiert"); + $this->verbindlichkeit_edit(); + } } From afd60b382bd4d25ac469f8912000dde7d0a9c2bc Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Wed, 27 Dec 2023 18:17:30 +0100 Subject: [PATCH 06/13] verbindlichkeit version 1 --- www/pages/ajax.php | 1 + www/pages/content/verbindlichkeit_edit.tpl | 28 +- www/pages/content/verbindlichkeit_list.tpl | 8 + .../content/verbindlichkeit_minidetail.tpl | 240 +++++----------- www/pages/verbindlichkeit.php | 259 +++++++++++++++--- 5 files changed, 326 insertions(+), 210 deletions(-) diff --git a/www/pages/ajax.php b/www/pages/ajax.php index 231cfcca..2a8cb88b 100644 --- a/www/pages/ajax.php +++ b/www/pages/ajax.php @@ -2448,6 +2448,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku $subwhere = $this->AjaxFilterWhere($termorig,$felder); $arr = $this->app->DB->SelectArr("SELECT CONCAT(nummer,' ',beschreibung) as name FROM kostenstellen WHERE $subwhere ORDER by nummer"); + $carr = !empty($arr)?count($arr):0; for($i = 0; $i < $carr; $i++) $newarr[] = $arr[$i]['name']; diff --git a/www/pages/content/verbindlichkeit_edit.tpl b/www/pages/content/verbindlichkeit_edit.tpl index c99b1428..8e908c75 100644 --- a/www/pages/content/verbindlichkeit_edit.tpl +++ b/www/pages/content/verbindlichkeit_edit.tpl @@ -1,7 +1,8 @@
[MESSAGE] @@ -50,10 +51,10 @@ - {|Rechnung|}: + {|Rechnungs-Nr.|}: - + @@ -78,10 +79,10 @@ - + - + {|Betrag Positionen brutto|}: @@ -89,7 +90,7 @@ - + {|Betrag Positionen netto|}: @@ -126,7 +127,9 @@ {|Waren-/Leistungsprüfung (Einkauf)|}: - Wird gesetzt wenn Wareneingangspositionen vollständig + + + @@ -135,7 +138,8 @@ - + + @@ -144,7 +148,8 @@ - + + @@ -191,8 +196,13 @@
+ +
+ [MINIDETAIL] +
diff --git a/www/pages/content/verbindlichkeit_list.tpl b/www/pages/content/verbindlichkeit_list.tpl index 6a846aae..838328d1 100644 --- a/www/pages/content/verbindlichkeit_list.tpl +++ b/www/pages/content/verbindlichkeit_list.tpl @@ -30,6 +30,14 @@ +
  • + + +
  • +
  • + + +
  • diff --git a/www/pages/content/verbindlichkeit_minidetail.tpl b/www/pages/content/verbindlichkeit_minidetail.tpl index 9d0aa1cb..723fd770 100644 --- a/www/pages/content/verbindlichkeit_minidetail.tpl +++ b/www/pages/content/verbindlichkeit_minidetail.tpl @@ -1,176 +1,76 @@ - [FORMHANDLEREVENT] [MESSAGE] - - - - - - - -
    -
    {|Rechnungsdaten|} - + +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Lieferant:[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND] [MELDUNG] -
    [VERBINDLICHKEIT] -


    Rechnungs Nr.:


    [RECHNUNG][MSGRECHNUNG]
     
    Bestellung:[DISABLESTART][BESTELLUNG][MSGBESTELLUNG][MULTIBESTELLUNG][DISABLEENDE] Zahlweise:[ZAHLUNGSWEISE][MSGZAHLUNGSWEISE]
    Rechnungsdatum:[RECHNUNGSDATUM][MSGRECHNUNGSDATUM] Zahlbar bis:[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]
    Betrag/Total (Brutto):[BETRAG][MSGBETRAG] [WAEHRUNG][MSGWAEHRUNG] Skonto in %:[SKONTO][MSGSKONTO]
    USt. 19%:[SUMMENORMAL][MSGSUMMENORMAL] Skonto bis:[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]
    USt. 7%:[SUMMEERMAESSIGT][MSGSUMMEERMAESSIGT] Umsatzsteuer[UMSATZSTEUER][MSGUMSATZSTEUER]
    [STEUERSATZNAME3][SUMMESATZ3][MSGSUMMESATZ3] [STEUERSATZNAME4][SUMMESATZ4][MSGSUMMESATZ4]
    Verwendungszweck:[VERWENDUNGSZWECK][MSGVERWENDUNGSZWECK] Frachtkosten:[FRACHTKOSTEN][MSGFRACHTKOSTEN]
    Projekt:[PROJEKT][MSGKOSTENSTELLE] 
    Kostenstelle:[KOSTENSTELLE][MSGKOSTENSTELLE] Freigabe:[MSGFREIGABE] Wareneingangsprüfung: [FREIGABE] [MSGRECHNUNGSFREIGABE] Rechnungseingangsprüfung: [RECHNUNGSFREIGABE]
    Sachkonto:[SACHKONTO][MSGSACHKONTO] Aktion:[BUTTONBEZAHLT]
    Interne Bemerkung:[INTERNEBEMERKUNG]
    - - - -
    -
    - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    - - - -[TABELLEBESTELLUNGEN] - -
    -
    - - - - - - - -
    Summe VerbindlichkeitSumme Kontierung
    [SUMMEVERBINDLICHKEIT][SUMMEKONTIERUNG]
    - -[MESSAGEVORKONTIERUNG] -[VORKONTIERUNG] -[ZAHLUNGEN] - -
    -

    {|Protokoll|}

    -
    - [PROTOKOLL] +
    Lieferant:[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]
    Rechnungs-Nr.:[RECHNUNG][MSGRECHNUNG]
    Rechnungsdatum:[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]
    Zahlbar bis:[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]
    Betrag/Total (Brutto):[BETRAG][MSGBETRAG] [WAEHRUNG][MSGWAEHRUNG]
    Skonto in %:[SKONTO][MSGSKONTO]
    Skonto bis:[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]
    Projekt:[PROJEKT][MSGKOSTENSTELLE] 
    Kostenstelle:[KOSTENSTELLE][MSGKOSTENSTELLE] 
    Interne Bemerkung:[INTERNEBEMERKUNG]
    +
    +
    +

    Artikel

    +
    + [ARTIKEL] +
    +
    +
    +

    Buchungen

    +
    + [ZAHLUNGEN] +
    +
    +
    +

    Protokoll

    +
    + [PROTOKOLL] +
    +
    - - - - - - - - - diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php index 5343876e..a1483ecf 100644 --- a/www/pages/verbindlichkeit.php +++ b/www/pages/verbindlichkeit.php @@ -24,9 +24,14 @@ class Verbindlichkeit { $this->app->ActionHandler("inlinepdf", "verbindlichkeit_inlinepdf"); $this->app->ActionHandler("positioneneditpopup", "verbindlichkeit_positioneneditpopup"); $this->app->ActionHandler("freigabe", "verbindlichkeit_freigabe"); + $this->app->ActionHandler("schreibschutz", "verbindlichkeit_schreibschutz"); $this->app->ActionHandler("freigabeeinkauf", "verbindlichkeit_freigabeeinkauf"); $this->app->ActionHandler("freigabebuchhaltung", "verbindlichkeit_freigabebuchhaltung"); $this->app->ActionHandler("freigabebezahlt", "verbindlichkeit_freigabebezahlt"); + $this->app->ActionHandler("ruecksetzeneinkauf", "verbindlichkeit_ruecksetzeneinkauf"); + $this->app->ActionHandler("ruecksetzenbuchhaltung", "verbindlichkeit_ruecksetzenbuchhaltung"); + $this->app->ActionHandler("ruecksetzenbezahlt", "verbindlichkeit_ruecksetzenbezahlt"); + $this->app->ActionHandler("minidetail", "verbindlichkeit_minidetail"); $this->app->DefaultActionHandler("list"); $this->app->ActionHandlerListen($app); @@ -153,6 +158,22 @@ class Verbindlichkeit { } // END Toggle filters + $this->app->YUI->DatePicker('zahlbarbis'); + $filterzahlbarbis = $this->app->YUI->TableSearchFilter($name, 4,'zahlbarbis'); + if (!empty($filterzahlbarbis)) { + $filterzahlbarbis = $this->app->String->Convert($filterzahlbarbis,'%1.%2.%3','%3-%2-%1'); + $where .= " AND v.zahlbarbis <= '".$filterzahlbarbis."'"; + } + + $this->app->YUI->DatePicker('skontobis'); + $filterskontobis = $this->app->YUI->TableSearchFilter($name, 5,'skontobis'); + if (!empty($filterskontobis)) { + $filterskontobis = $this->app->String->Convert($filterskontobis,'%1.%2.%3','%3-%2-%1'); + $where .= " AND v.skontobis <= '".$filterskontobis."'"; + } + + $moreinfo = true; // Allow drop down details + $menucol = 1; // For moredata break; } @@ -186,13 +207,19 @@ class Verbindlichkeit { switch ($aktion) { case 'freigabeeinkauf': - echo("freigabeeinkauf"); + foreach ($selectedIds as $id) { + $this->verbindlichkeit_freigabeeinkauf($id); + } break; case 'freigabebuchhaltung': - echo("freigabebuchhaltung"); + foreach ($selectedIds as $id) { + $this->verbindlichkeit_freigabebuchhaltung($id); + } break; case 'bezahlt': - echo("bezahlt"); + foreach ($selectedIds as $id) { + $this->verbindlichkeit_freigabebezahlt($id); + } break; } } @@ -205,6 +232,10 @@ class Verbindlichkeit { $this->app->YUI->TableSearch('TAB1', 'verbindlichkeit_list', "show", "", "", basename(__FILE__), __CLASS__); +/* + + Prepared for later use... + if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabeeinkauf')){ $this->app->Tpl->Set('MANUELLFREIGABEEINKAUF', ''); } @@ -216,6 +247,9 @@ class Verbindlichkeit { if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabebezahlt')){ $this->app->Tpl->Set('ALSBEZAHLTMARKIEREN', ''); } +*/ + $this->app->User->SetParameter('table_verbindlichkeit_list_zahlbarbis', ''); + $this->app->User->SetParameter('table_verbindlichkeit_list_skontobis', ''); $this->app->Tpl->Parse('PAGE', "verbindlichkeit_list.tpl"); } @@ -223,8 +257,8 @@ class Verbindlichkeit { public function verbindlichkeit_delete() { $id = (int) $this->app->Secure->GetGET('id'); - $this->app->DB->Delete("DELETE FROM `verbindlichkeit` WHERE `id` = '{$id}'"); - $this->app->Tpl->Set('MESSAGE', "
    Der Eintrag wurde gelöscht.
    "); + $this->app->DB->Delete("UPDATE `verbindlichkeit` SET status='storniert' WHERE `id` = '{$id}'"); + $this->app->Tpl->Set('MESSAGE', "
    Der Eintrag wurde storniert.
    "); $this->verbindlichkeit_list(); } @@ -263,16 +297,16 @@ class Verbindlichkeit { // Write to database // Add checks here - $status = $this->app->DB->Select("SELECT status FROM verbindlichkeit WHERE id =".$id); + $schreibschutz = $this->app->DB->Select("SELECT schreibschutz FROM verbindlichkeit WHERE id =".$id); - if ($status != 'angelegt' && $id != 'NULL') { + if ($schreibschutz) { $internebemerkung = $input['internebemerkung']; $projekt = $input['projekt']; $kostenstelle = $input['kostenstelle']; unset($input); $input['internebemerkung'] = $internebemerkung; $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$projekt,true); - $input['kostenstelle'] = $this->app->erp->ReplaceKostenstelle(true,$kostenstelle,true); + $input['kostenstelle'] = $this->app->DB->Select("SELECT id FROM kostenstellen WHERE nummer = '".$kostenstelle."'"); } else { $input['adresse'] = $this->app->erp->ReplaceLieferantennummer(true,$input['adresse'],true); // Parameters: Target db?, value, from form? $input['rechnungsdatum'] = $this->app->erp->ReplaceDatum(true,$input['rechnungsdatum'],true); // Parameters: Target db?, value, from form? @@ -280,8 +314,7 @@ class Verbindlichkeit { $input['skontobis'] = $this->app->erp->ReplaceDatum(true,$input['skontobis'],true); // Parameters: Target db?, value, from form? $input['zahlbarbis'] = $this->app->erp->ReplaceDatum(true,$input['zahlbarbis'],true); // Parameters: Target db?, value, from form? $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); - $input['kostenstelle'] = $this->app->erp->ReplaceKostenstelle(true,$input['kostenstelle'],true); - + $input['kostenstelle'] = $this->app->DB->Select("SELECT id FROM kostenstellen WHERE nummer = '".$input['kostenstelle']."'"); if(empty($input['projekt']) && !empty($input['adresse'])) { $input['projekt'] = $this->app->erp->GetCreateProjekt($input['adresse']); } @@ -388,15 +421,31 @@ class Verbindlichkeit { */ - if ($verbindlichkeit_from_db['status'] != 'angelegt' && $id != 'NULL') { + if ($verbindlichkeit_from_db['schreibschutz']) { $this->app->Tpl->Set('SAVEDISABLED','disabled'); + $this->app->Tpl->Set('MESSAGE',"
    Diese Verbindlichkeit ist schreibgeschützt und darf daher nicht mehr bearbeitet werden! 
    "); } - if ($verbindlichkeit_from_db['status'] == 'angelegt' || $verbindlichkeit_from_db['rechnungsfreigabe']) { + if (empty($verbindlichkeit_from_db['adresse'] || $verbindlichkeit_from_db['status'] == 'angelegt')) { + $this->app->Tpl->Set('FREIGABEEINKAUFHIDDEN','hidden'); + $this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden'); + $this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden'); + } + + if ($verbindlichkeit_from_db['freigabe']) { + $this->app->Tpl->Set('FREIGABEEINKAUFHIDDEN','hidden'); + } else { + $this->app->Tpl->Set('RUECKSETZENEINKAUFHIDDEN','hidden'); + } + if ($verbindlichkeit_from_db['rechnungsfreigabe']) { $this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden'); + } else { + $this->app->Tpl->Set('RUECKSETZENBUCHHALTUNGHIDDEN','hidden'); } - if ($verbindlichkeit_from_db['status'] == 'angelegt' || $verbindlichkeit_from_db['bezahlt'] == '1') { + if ($verbindlichkeit_from_db['bezahlt'] == '1') { $this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden'); + } else { + $this->app->Tpl->Set('RUECKSETZENBEZAHLTHIDDEN','hidden'); } $this->app->Tpl->Set('WARENEINGANGCHECKED', $verbindlichkeit_from_db['freigabe']==1?"checked":""); @@ -420,19 +469,14 @@ class Verbindlichkeit { $this->app->YUI->AutoComplete("projekt", "projektname", 1); $this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$verbindlichkeit_from_db['projekt'],false)); $this->app->YUI->AutoComplete("kostenstelle", "kostenstelle", 1); - $this->app->Tpl->Set('KOSTENSTELLE',$this->app->erp->ReplaceKostenstelle(false,$verbindlichkeit_from_db['kostenstelle'],false)); + $this->app->Tpl->Set('KOSTENSTELLE',$this->app->DB->SELECT("SELECT nummer FROM kostenstellen WHERE id = '".$verbindlichkeit_from_db['kostenstelle']."'")); $waehrungenselect = $this->app->erp->GetSelect($this->app->erp->GetWaehrung(), $verbindlichkeit_from_db['waehrung']); - $this->app->Tpl->Set('WAEHRUNG', $waehrungenselect); + $this->app->Tpl->Set('WAEHRUNGSELECT', $waehrungenselect); $this->app->Tpl->Set('ADRESSE_ID', $verbindlichkeit_from_db['adresse']); - $this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceLieferantennummer(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display - - if (empty($verbindlichkeit_from_db['adresse'])) { - $this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden'); - $this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden'); - } + $this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceLieferantennummer(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display $this->app->YUI->CkEditor("internebemerkung"); @@ -445,6 +489,7 @@ class Verbindlichkeit { $this->app->Tpl->Set('INLINEPDF', 'Keine Dateien vorhanden.'); } + $this->verbindlichkeit_minidetail('MINIDETAIL',false); $this->app->Tpl->Parse('PAGE', "verbindlichkeit_edit.tpl"); } @@ -489,15 +534,15 @@ class Verbindlichkeit { $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=dateien&id=$id", "Dateien".$anzahldateien); } - $invoiceArr = $this->app->DB->SelectRow("SELECT v.belegnr, a.name, v.status FROM verbindlichkeit v LEFT JOIN adresse a ON v.adresse = a.id WHERE v.id='$id' LIMIT 1"); + $invoiceArr = $this->app->DB->SelectRow("SELECT v.belegnr, a.name, v.status, schreibschutz FROM verbindlichkeit v LEFT JOIN adresse a ON v.adresse = a.id WHERE v.id='$id' LIMIT 1"); $belegnr = $invoiceArr['belegnr']; $name = $invoiceArr['name']; if($belegnr=='0' || $belegnr=='') { $belegnr ='(Entwurf)'; } $this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Verbindlichkeit $belegnr"); - $status = $invoiceArr['status']; - if ($status==='angelegt') { + + if ($invoiceArr['status'] === 'angelegt' || $invoiceArr['schreibschutz'] != 1) { $this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=freigabe&id=$id",'Freigabe'); } } @@ -620,41 +665,193 @@ class Verbindlichkeit { { $id = $this->app->Secure->GetGET('id'); $this->app->erp->BelegFreigabe('verbindlichkeit',$id); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben"); + $this->app->DB->Update("UPDATE verbindlichkeit SET schreibschutz = 1 WHERE id = ".$id); $this->verbindlichkeit_edit(); } - function verbindlichkeit_freigabeeinkauf($id) + function verbindlichkeit_freigabeeinkauf($id = null) { if (empty($id)) { $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; } $sql = "UPDATE verbindlichkeit SET freigabe = 1 WHERE id=".$id; $this->app->DB->Update($sql); $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Einkauf)"); - $this->verbindlichkeit_edit(); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } } - - function verbindlichkeit_freigabebuchhaltung($id) + function verbindlichkeit_freigabebuchhaltung($id = null) { if (empty($id)) { $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; } $sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 1 WHERE id=".$id; $this->app->DB->Update($sql); $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Buchhaltung)"); - $this->verbindlichkeit_edit(); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } } - function verbindlichkeit_freigabebezahlt($id) + function verbindlichkeit_freigabebezahlt($id = null) { if (empty($id)) { $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; } $sql = "UPDATE verbindlichkeit SET bezahlt = 1 WHERE id=".$id; $this->app->DB->Update($sql); $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit als bezahlt markiert"); - $this->verbindlichkeit_edit(); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } + } + + function verbindlichkeit_ruecksetzeneinkauf($id = null) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; + } + $sql = "UPDATE verbindlichkeit SET freigabe = 0 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit rückgesetzt (Einkauf)"); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } } + function verbindlichkeit_ruecksetzenbuchhaltung($id = null) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; + } + $sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 0 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit rückgesetzt (Buchhaltung)"); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } + } + + function verbindlichkeit_ruecksetzenbezahlt($id = null) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; + } + $sql = "UPDATE verbindlichkeit SET bezahlt = 0 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit bezahlt rückgesetzt"); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } + } + + function verbindlichkeit_schreibschutz($id = null) + { + if (empty($id)) { + $id = $this->app->Secure->GetGET('id'); + $gotoedit = true; + } + $sql = "UPDATE verbindlichkeit SET schreibschutz = 0 WHERE id=".$id; + $this->app->DB->Update($sql); + $this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit Schreibschutz entfernt"); + if ($gotoedit) { + $this->verbindlichkeit_edit(); + } + } + + public function verbindlichkeit_minidetail($parsetarget='',$menu=true) { + + $id = $this->app->Secure->GetGET('id'); + + $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS + v.id, + v.belegnr, + v.status_beleg, + v.schreibschutz, + v.rechnung, + ".$this->app->erp->FormatDate('v.zahlbarbis', 'zahlbarbis').", + v.betrag, + v.umsatzsteuer, + v.ustid, + v.summenormal, + v.summeermaessigt, + v.summesatz3, + v.summesatz4, + v.steuersatzname3, + v.steuersatzname4, + v.skonto, + ".$this->app->erp->FormatDate('v.skontobis', 'skontobis').", + v.skontofestsetzen, + v.freigabe, + v.freigabemitarbeiter, + v.bestellung, + p.abkuerzung AS projekt, + v.teilprojekt, + v.auftrag, + v.status, + v.bezahlt, + v.kontoauszuege, + v.firma, + v.logdatei, + v.waehrung, + v.zahlungsweise, + ".$this->app->erp->FormatDate('v.eingangsdatum', 'eingangsdatum').", + ".$this->app->erp->FormatDate('v.rechnungsdatum', 'rechnungsdatum').", + v.rechnungsfreigabe, + k.nummer as kostenstelle, + v.beschreibung, + v.sachkonto, + v.art, + v.verwendungszweck, + v.dta_datei, + v.frachtkosten, + v.internebemerkung, + v.ustnormal, + v.ustermaessigt, + v.uststuer3, + v.uststuer4, + v.betragbezahlt, + v.bezahltam, + v.klaerfall, + v.klaergrund, + v.skonto_erhalten, + v.kurs, + v.sprache, + v.id, + CONCAT(a.lieferantennummer,' ',a.name) AS adresse + FROM verbindlichkeit v + LEFT JOIN adresse a ON a.id = v.adresse + LEFT JOIN projekt p ON a.projekt = p.id + LEFT JOIN kostenstellen k ON v.kostenstelle = k.id + WHERE v.id='$id'"); + + foreach ($result[0] as $key => $value) { + $this->app->Tpl->Set(strtoupper($key), $value); + } + + if (!empty($result[0])) { + $verbindlichkeit_from_db = $result[0]; + } + + $tmp = new EasyTable($this->app); + $tmp->Query("SELECT zeit,bearbeiter,grund FROM verbindlichkeit_protokoll WHERE verbindlichkeit='$id' ORDER by zeit DESC",0,""); + $tmp->DisplayNew('PROTOKOLL',"Protokoll","noAction"); + + if($parsetarget=='') + { + $this->app->Tpl->Output('verbindlichkeit_minidetail.tpl'); + $this->app->ExitXentral(); + } + $this->app->Tpl->Parse($parsetarget,'verbindlichkeit_minidetail.tpl'); + } + } From b18e8ff444db680857dd87d25eeacfeed70209b3 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Wed, 27 Dec 2023 18:40:36 +0100 Subject: [PATCH 07/13] view fibu_buchungen_alle --- upgrade/data/db_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/data/db_schema.json b/upgrade/data/db_schema.json index c4635b64..d7d6491e 100644 --- a/upgrade/data/db_schema.json +++ b/upgrade/data/db_schema.json @@ -118002,7 +118002,7 @@ { "name": "fibu_buchungen_alle_view", "type": "VIEW", - "Create": "CREATE VIEW `fibu_buchungen_alle_view` AS select `fb`.`buchungsart` AS `buchungsart`,`fb`.`typ` AS `typ`,`fb`.`id` AS `id`,if(`fibu_objekte_view`.`datum` <> '',`fibu_objekte_view`.`datum`,`fb`.`datum`) AS `datum`,`fb`.`gegen_typ` AS `doc_typ`,`fb`.`gegen_id` AS `doc_id`,`fibu_objekte_view`.`info` AS `doc_info`, CAST(`fb`.`soll` AS decimal(10,2)) AS `betrag`,`fb`.`waehrung` AS `waehrung`,`fb`.`edit_module` AS `edit_module`,`fb`.`edit_id` AS `edit_id` from ((select 'umsatz' AS `buchungsart`,'rechnung' AS `typ`,`rechnung`.`id` AS `id`,-`rechnung`.`soll` AS `soll`,`rechnung`.`waehrung` AS `waehrung`,'rechnung' AS `gegen_typ`,`rechnung`.`id` AS `gegen_id`,`rechnung`.`datum` AS `datum`,'rechnung' AS `edit_module`,`rechnung`.`id` AS `edit_id` from `rechnung` where `rechnung`.`belegnr` <> '' union select 'umsatz' AS `umsatz`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`soll` AS `soll`,`gutschrift`.`waehrung` AS `waehrung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `edit_module`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`belegnr` <> '' union select 'aufwand' AS `aufwand`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`betrag` AS `betrag`,`verbindlichkeit`.`waehrung` AS `waehrung`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`rechnungsdatum` AS `rechnungsdatum`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id` from `verbindlichkeit` where `verbindlichkeit`.`belegnr` <> '' union select 'zahlung' AS `zahlung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`soll` AS `soll`,`kontoauszuege`.`waehrung` AS `waehrung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`buchung` AS `buchung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id` from `kontoauszuege` where `kontoauszuege`.`importfehler` is null union select 'abbuchung' AS `abbuchung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`betrag` AS `betrag`,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,`fibu_buchungen`.`datum` AS `datum`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen` union select 'zubuchung' AS `zubuchung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,-`fibu_buchungen`.`betrag` AS `-``openxe``.``fibu_buchungen``.``betrag```,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`datum` AS `datum`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen`) `fb` left join `fibu_objekte_view` on(`fb`.`gegen_typ` = `fibu_objekte_view`.`typ` and `fb`.`gegen_id` = `fibu_objekte_view`.`id`)) where `fb`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum') and `fibu_objekte_view`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum') or `fibu_objekte_view`.`datum` = ''" + "Create": "CREATE VIEW `fibu_buchungen_alle_view` AS select `fb`.`buchungsart` AS `buchungsart`,`fb`.`typ` AS `typ`,`fb`.`id` AS `id`,if(`fibu_objekte_view`.`datum` <> '',`fibu_objekte_view`.`datum`,`fb`.`datum`) AS `datum`,`fb`.`gegen_typ` AS `doc_typ`,`fb`.`gegen_id` AS `doc_id`,`fibu_objekte_view`.`info` AS `doc_info`,cast(`fb`.`soll` as decimal(10,2)) AS `betrag`,`fb`.`waehrung` AS `waehrung`,`fb`.`edit_module` AS `edit_module`,`fb`.`edit_id` AS `edit_id` from ((select 'umsatz' AS `buchungsart`,'rechnung' AS `typ`,`rechnung`.`id` AS `id`,-`rechnung`.`soll` AS `soll`,`rechnung`.`waehrung` AS `waehrung`,'rechnung' AS `gegen_typ`,`rechnung`.`id` AS `gegen_id`,`rechnung`.`datum` AS `datum`,'rechnung' AS `edit_module`,`rechnung`.`id` AS `edit_id` from `rechnung` where `rechnung`.`belegnr` <> '' union select 'umsatz' AS `umsatz`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`soll` AS `soll`,`gutschrift`.`waehrung` AS `waehrung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `edit_module`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`belegnr` <> '' union select 'aufwand' AS `aufwand`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`betrag` AS `betrag`,`verbindlichkeit`.`waehrung` AS `waehrung`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`rechnungsdatum` AS `rechnungsdatum`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id` from `verbindlichkeit` where `verbindlichkeit`.`belegnr` <> '' union select 'zahlung' AS `zahlung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`soll` AS `soll`,`kontoauszuege`.`waehrung` AS `waehrung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`buchung` AS `buchung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id` from `kontoauszuege` where `kontoauszuege`.`importfehler` is null union select 'abbuchung' AS `abbuchung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`betrag` AS `betrag`,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,`fibu_buchungen`.`datum` AS `datum`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen` union select 'zubuchung' AS `zubuchung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,-`fibu_buchungen`.`betrag` AS `-``openxe``.``fibu_buchungen``.``betrag```,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`datum` AS `datum`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen`) `fb` left join `fibu_objekte_view` on(`fb`.`gegen_typ` = `fibu_objekte_view`.`typ` and `fb`.`gegen_id` = `fibu_objekte_view`.`id`)) where `fb`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum') and `fibu_objekte_view`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum') or `fibu_objekte_view`.`datum` = ''" } ] } From 38d0ac4c494d7e40903bf8131dd884ced0420ac1 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Wed, 27 Dec 2023 19:15:42 +0100 Subject: [PATCH 08/13] verbindlichkeit mengebetrag --- www/pages/content/verbindlichkeit_edit.tpl | 6 +- www/pages/content/verbindlichkeit_list.tpl | 2 +- www/pages/verbindlichkeit.php | 78 +++++++++++++++++++++- 3 files changed, 79 insertions(+), 7 deletions(-) diff --git a/www/pages/content/verbindlichkeit_edit.tpl b/www/pages/content/verbindlichkeit_edit.tpl index 8e908c75..615ceb94 100644 --- a/www/pages/content/verbindlichkeit_edit.tpl +++ b/www/pages/content/verbindlichkeit_edit.tpl @@ -78,7 +78,7 @@ {|Betrag brutto|}: - + @@ -87,7 +87,7 @@ {|Betrag Positionen brutto|}: - + @@ -95,7 +95,7 @@ {|Betrag Positionen netto|}: - + diff --git a/www/pages/content/verbindlichkeit_list.tpl b/www/pages/content/verbindlichkeit_list.tpl index 838328d1..b2947974 100644 --- a/www/pages/content/verbindlichkeit_list.tpl +++ b/www/pages/content/verbindlichkeit_list.tpl @@ -39,7 +39,7 @@ - +
    diff --git a/www/pages/verbindlichkeit.php b/www/pages/verbindlichkeit.php index a1483ecf..6ba4f72f 100644 --- a/www/pages/verbindlichkeit.php +++ b/www/pages/verbindlichkeit.php @@ -355,8 +355,80 @@ class Verbindlichkeit { // Load values again from database - $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; - $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS v.id, $dropnbox, v.belegnr, v.status_beleg, v.schreibschutz, v.rechnung, v.zahlbarbis, v.betrag, v.umsatzsteuer, v.ustid, v.summenormal, v.summeermaessigt, v.summesatz3, v.summesatz4, v.steuersatzname3, v.steuersatzname4, v.skonto, v.skontobis, v.skontofestsetzen, v.freigabe, v.freigabemitarbeiter, v.bestellung, v.adresse, v.projekt, v.teilprojekt, v.auftrag, v.status, v.bezahlt, v.kontoauszuege, v.firma, v.logdatei, v.bestellung1, v.bestellung1betrag, v.bestellung1bemerkung, v.bestellung1projekt, v.bestellung1kostenstelle, v.bestellung1auftrag, v.bestellung2, v.bestellung2betrag, v.bestellung2bemerkung, v.bestellung2kostenstelle, v.bestellung2auftrag, v.bestellung2projekt, v.bestellung3, v.bestellung3betrag, v.bestellung3bemerkung, v.bestellung3kostenstelle, v.bestellung3auftrag, v.bestellung3projekt, v.bestellung4, v.bestellung4betrag, v.bestellung4bemerkung, v.bestellung4kostenstelle, v.bestellung4auftrag, v.bestellung4projekt, v.bestellung5, v.bestellung5betrag, v.bestellung5bemerkung, v.bestellung5kostenstelle, v.bestellung5auftrag, v.bestellung5projekt, v.bestellung6, v.bestellung6betrag, v.bestellung6bemerkung, v.bestellung6kostenstelle, v.bestellung6auftrag, v.bestellung6projekt, v.bestellung7, v.bestellung7betrag, v.bestellung7bemerkung, v.bestellung7kostenstelle, v.bestellung7auftrag, v.bestellung7projekt, v.bestellung8, v.bestellung8betrag, v.bestellung8bemerkung, v.bestellung8kostenstelle, v.bestellung8auftrag, v.bestellung8projekt, v.bestellung9, v.bestellung9betrag, v.bestellung9bemerkung, v.bestellung9kostenstelle, v.bestellung9auftrag, v.bestellung9projekt, v.bestellung10, v.bestellung10betrag, v.bestellung10bemerkung, v.bestellung10kostenstelle, v.bestellung10auftrag, v.bestellung10projekt, v.bestellung11, v.bestellung11betrag, v.bestellung11bemerkung, v.bestellung11kostenstelle, v.bestellung11auftrag, v.bestellung11projekt, v.bestellung12, v.bestellung12betrag, v.bestellung12bemerkung, v.bestellung12projekt, v.bestellung12kostenstelle, v.bestellung12auftrag, v.bestellung13, v.bestellung13betrag, v.bestellung13bemerkung, v.bestellung13kostenstelle, v.bestellung13auftrag, v.bestellung13projekt, v.bestellung14, v.bestellung14betrag, v.bestellung14bemerkung, v.bestellung14kostenstelle, v.bestellung14auftrag, v.bestellung14projekt, v.bestellung15, v.bestellung15betrag, v.bestellung15bemerkung, v.bestellung15kostenstelle, v.bestellung15auftrag, v.bestellung15projekt, v.waehrung, v.zahlungsweise, v.eingangsdatum, v.buha_konto1, v.buha_belegfeld1, v.buha_betrag1, v.buha_konto2, v.buha_belegfeld2, v.buha_betrag2, v.buha_konto3, v.buha_belegfeld3, v.buha_betrag3, v.buha_konto4, v.buha_belegfeld4, v.buha_betrag4, v.buha_konto5, v.buha_belegfeld5, v.buha_betrag5, v.rechnungsdatum, v.rechnungsfreigabe, v.kostenstelle, v.beschreibung, v.sachkonto, v.art, v.verwendungszweck, v.dta_datei, v.frachtkosten, v.internebemerkung, v.ustnormal, v.ustermaessigt, v.uststuer3, v.uststuer4, v.betragbezahlt, v.bezahltam, v.klaerfall, v.klaergrund, v.skonto_erhalten, v.kurs, v.sprache, v.id, a.lieferantennummer, a.name AS adresse_name FROM verbindlichkeit v LEFT JOIN adresse a ON a.id = v.adresse"." WHERE v.id=$id"); + $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; + $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS v.id, + $dropnbox, + v.belegnr, + v.status_beleg, + v.schreibschutz, + v.rechnung, + v.zahlbarbis, + ".$this->app->erp->FormatMengeBetrag('v.betrag')." AS betrag, + v.umsatzsteuer, + v.ustid, + v.summenormal, + v.summeermaessigt, + v.summesatz3, + v.summesatz4, + v.steuersatzname3, + v.steuersatzname4, + v.skonto, + v.skontobis, + v.skontofestsetzen, + v.freigabe, + v.freigabemitarbeiter, + v.bestellung, + v.adresse, + v.projekt, + v.teilprojekt, + v.auftrag, + v.status, + v.bezahlt, + v.kontoauszuege, + v.firma, + v.logdatei, + v.waehrung, + v.zahlungsweise, + v.eingangsdatum, + v.buha_konto1, + v.buha_belegfeld1, + v.buha_betrag1, + v.buha_konto2, + v.buha_belegfeld2, + v.buha_betrag2, + v.buha_konto3, + v.buha_belegfeld3, + v.buha_betrag3, + v.buha_konto4, + v.buha_belegfeld4, + v.buha_betrag4, + v.buha_konto5, + v.buha_belegfeld5, + v.buha_betrag5, + v.rechnungsdatum, + v.rechnungsfreigabe, + v.kostenstelle, + v.beschreibung, + v.sachkonto, + v.art, + v.verwendungszweck, + v.dta_datei, + v.frachtkosten, + v.internebemerkung, + v.ustnormal, + v.ustermaessigt, + v.uststuer3, + v.uststuer4, + v.betragbezahlt, + v.bezahltam, + v.klaerfall, + v.klaergrund, + v.skonto_erhalten, + v.kurs, + v.sprache, + v.id, + a.lieferantennummer, + a.name AS adresse_name FROM verbindlichkeit v LEFT JOIN adresse a ON a.id = v.adresse"." WHERE v.id=$id"); foreach ($result[0] as $key => $value) { $this->app->Tpl->Set(strtoupper($key), $value); @@ -779,7 +851,7 @@ class Verbindlichkeit { v.schreibschutz, v.rechnung, ".$this->app->erp->FormatDate('v.zahlbarbis', 'zahlbarbis').", - v.betrag, + ".$this->app->erp->FormatMengeBetrag('v.betrag')." AS betrag, v.umsatzsteuer, v.ustid, v.summenormal, From ae377e452f732d4b834d8d17905e5af422c0b6b5 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Fri, 29 Dec 2023 11:14:28 +0100 Subject: [PATCH 09/13] bugfix GetZahlungsweise empty array --- www/lib/class.erpapi.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/lib/class.erpapi.php b/www/lib/class.erpapi.php index 8bb01e1b..69d3a5ec 100644 --- a/www/lib/class.erpapi.php +++ b/www/lib/class.erpapi.php @@ -26850,7 +26850,9 @@ function Firmendaten($field,$projekt="") $tmp[$extra[$i]['type']] = $extra[$i]['bezeichnung']; } if($zahlungsweise && empty($tmp[$zahlungsweise]))$tmp[$zahlungsweise] = ucfirst($zahlungsweise); - asort($tmp); + if (!empty($tmp)) { + asort($tmp); + } return $tmp; // return array('rechnung'=>'Rechnung','vorkasse'=>'Vorkasse','nachnahme'=>'Nachnahme','kreditkarte'=>'Kreditkarte','einzugsermaechtigung'=>'Einzugsermaechtigung','bar'=>'Bar','paypal'=>'PayPal','lastschrift'=>'Lastschrift'); } From f7c64bec797c33956148288476d46664024633c3 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Fri, 29 Dec 2023 12:58:38 +0100 Subject: [PATCH 10/13] Bugfix Warnung doppelte Seriennummern removed pointless SQL WHERE --- www/eproosystem.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/eproosystem.php b/www/eproosystem.php index 84d51898..b5490d73 100644 --- a/www/eproosystem.php +++ b/www/eproosystem.php @@ -1699,7 +1699,6 @@ if (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 an FROM `beleg_chargesnmhd` s INNER JOIN lieferschein_position lp ON s.doctype = 'lieferschein' AND s.pos = lp.id AND s.type = 'sn' AND s.wert <> '' INNER JOIN lieferschein l ON lp.lieferschein = l.id AND l.status <> 'storniert' - WHERE l.id NOT IN (SELECT lieferscheinid FROM retoure LIMIT 1) GROUP BY s.wert, lp.artikel ) UNION ALL ( @@ -1708,7 +1707,7 @@ if (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 an SELECT lp.artikel, s.seriennummer as wert , count(s.id) as anzahl, max(l.id) as lieferschein, max(l.belegnr) as belegnr FROM `seriennummern` s INNER JOIN lieferschein_position lp ON s.lieferscheinpos = lp.id - INNER JOIN lieferschein l ON lp.lieferschein = l.id WHERE s.seriennummer <> '' AND l.id NOT IN (SELECT lieferscheinid FROM retoure LIMIT 1) + INNER JOIN lieferschein l ON lp.lieferschein = l.id WHERE s.seriennummer <> '' GROUP BY s.seriennummer, lp.artikel From 2b95a3891a726b03a9e885263256ee8bdf61937b Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Fri, 29 Dec 2023 13:44:31 +0100 Subject: [PATCH 11/13] restored module kostenstellen --- www/pages/content/kostenstellen_edit.tpl | 119 +++++++++++++ www/pages/content/kostenstellen_list.tpl | 10 ++ www/pages/kostenstellen.php | 207 +++++++++++++++++++++++ 3 files changed, 336 insertions(+) create mode 100644 www/pages/content/kostenstellen_edit.tpl create mode 100644 www/pages/content/kostenstellen_list.tpl create mode 100644 www/pages/kostenstellen.php diff --git a/www/pages/content/kostenstellen_edit.tpl b/www/pages/content/kostenstellen_edit.tpl new file mode 100644 index 00000000..56f30def --- /dev/null +++ b/www/pages/content/kostenstellen_edit.tpl @@ -0,0 +1,119 @@ +
    +
      +
    • +
    + +
    + [MESSAGE] +
    + [FORMHANDLEREVENT] +
    +
    +
    +
    +
    + {|kostenstellen|} + + + + + + + + + + + + + + +
    + {|Nummer|}: + + +
    + {|Beschreibung|}: + + +
    + {|Internebemerkung|}: + + +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    + diff --git a/www/pages/content/kostenstellen_list.tpl b/www/pages/content/kostenstellen_list.tpl new file mode 100644 index 00000000..394c103a --- /dev/null +++ b/www/pages/content/kostenstellen_list.tpl @@ -0,0 +1,10 @@ +
    + +
    + [MESSAGE] + [TAB1] + [TAB1NEXT] +
    +
    diff --git a/www/pages/kostenstellen.php b/www/pages/kostenstellen.php new file mode 100644 index 00000000..e1a8f082 --- /dev/null +++ b/www/pages/kostenstellen.php @@ -0,0 +1,207 @@ +app = $app; + if ($intern) + return; + + $this->app->ActionHandlerInit($this); + $this->app->ActionHandler("list", "kostenstellen_list"); + $this->app->ActionHandler("create", "kostenstellen_edit"); // This automatically adds a "New" button + $this->app->ActionHandler("edit", "kostenstellen_edit"); + $this->app->ActionHandler("delete", "kostenstellen_delete"); + $this->app->DefaultActionHandler("list"); + $this->app->ActionHandlerListen($app); + } + + public function Install() { + /* Fill out manually later */ + } + + static function TableSearch(&$app, $name, $erlaubtevars) { + switch ($name) { + case "kostenstellen_list": + $allowed['kostenstellen_list'] = array('list'); + $heading = array('','','Nummer', 'Beschreibung', 'Internebemerkung', 'Menü'); + $width = array('1%','1%','10%'); // Fill out manually later + + // columns that are aligned right (numbers etc) + // $alignright = array(4,5,6,7,8); + + $findcols = array('k.id','k.id','k.nummer', 'k.beschreibung', 'k.internebemerkung'); + $searchsql = array('k.nummer', 'k.beschreibung', 'k.internebemerkung'); + + $defaultorder = 1; + $defaultorderdesc = 0; + $aligncenter = array(); + $alignright = array(); + $numbercols = array(); + $sumcol = array(); + + $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; + +// $moreinfo = true; // Allow drop down details +// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails +// $menucol = 11; // Set id col for moredata/menu + + $menu = "
    " . "Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"> " . "Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\">" . "
    "; + + $sql = "SELECT SQL_CALC_FOUND_ROWS k.id, $dropnbox, k.nummer, k.beschreibung, k.internebemerkung, k.id FROM kostenstellen k"; + + $where = "1"; + $count = "SELECT count(DISTINCT id) FROM kostenstellen WHERE $where"; +// $groupby = ""; + + break; + } + + $erg = false; + + foreach ($erlaubtevars as $k => $v) { + if (isset($$v)) { + $erg[$v] = $$v; + } + } + return $erg; + } + + function kostenstellen_list() { + $this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=list", "Übersicht"); + $this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=create", "Neu anlegen"); + + $this->app->erp->MenuEintrag("index.php", "Zurück"); + + $this->app->YUI->TableSearch('TAB1', 'kostenstellen_list', "show", "", "", basename(__FILE__), __CLASS__); + $this->app->Tpl->Parse('PAGE', "kostenstellen_list.tpl"); + } + + public function kostenstellen_delete() { + $id = (int) $this->app->Secure->GetGET('id'); + + $this->app->DB->Delete("DELETE FROM `kostenstellen` WHERE `id` = '{$id}'"); + $this->app->Tpl->Set('MESSAGE', "
    Der Eintrag wurde gelöscht.
    "); + + $this->kostenstellen_list(); + } + + /* + * Edit kostenstellen item + * If id is empty, create a new one + */ + + function kostenstellen_edit() { + $id = $this->app->Secure->GetGET('id'); + + // Check if other users are editing this id + if($this->app->erp->DisableModul('artikel',$id)) + { + return; + } + + $this->app->Tpl->Set('ID', $id); + + $this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=edit&id=$id", "Details"); + $this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=list", "Zurück zur Übersicht"); + $id = $this->app->Secure->GetGET('id'); + $input = $this->GetInput(); + $submit = $this->app->Secure->GetPOST('submit'); + + if (empty($id)) { + // New item + $id = 'NULL'; + } + + if ($submit != '') + { + + // Write to database + + // Add checks here + + // $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form? + + $columns = "id, "; + $values = "$id, "; + $update = ""; + + $fix = ""; + + foreach ($input as $key => $value) { + $columns = $columns.$fix.$key; + $values = $values.$fix."'".$value."'"; + $update = $update.$fix.$key." = '$value'"; + + $fix = ", "; + } + +// echo($columns."
    "); +// echo($values."
    "); +// echo($update."
    "); + + $sql = "INSERT INTO kostenstellen (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update; + +// echo($sql); + + $this->app->DB->Update($sql); + + if ($id == 'NULL') { + $msg = $this->app->erp->base64_url_encode("
    Das Element wurde erfolgreich angelegt.
    "); + header("Location: index.php?module=kostenstellen&action=list&msg=$msg"); + } else { + $this->app->Tpl->Set('MESSAGE', "
    Die Einstellungen wurden erfolgreich übernommen.
    "); + } + } + + + // Load values again from database + $dropnbox = "'' AS `open`, CONCAT('') AS `auswahl`"; + $result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS k.id, $dropnbox, k.nummer, k.beschreibung, k.internebemerkung, k.id FROM kostenstellen k"." WHERE id=$id"); + + foreach ($result[0] as $key => $value) { + $this->app->Tpl->Set(strtoupper($key), $value); + } + + if (!empty($result)) { + $kostenstellen_from_db = $result[0]; + } else { + return; + } + + /* + * Add displayed items later + * + + $this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email); + $this->app->Tpl->Add('EMAIL', $email); + $this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername); + + $this->app->YUI->AutoComplete("artikel", "artikelnummer"); + + */ + + $this->app->Tpl->Parse('PAGE', "kostenstellen_edit.tpl"); + } + + /** + * Get all paramters from html form and save into $input + */ + public function GetInput(): array { + $input = array(); + //$input['EMAIL'] = $this->app->Secure->GetPOST('email'); + + $input['nummer'] = $this->app->Secure->GetPOST('nummer'); + $input['beschreibung'] = $this->app->Secure->GetPOST('beschreibung'); + $input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung'); + + + return $input; + } + } From 39409b0358c612e609680088af5225025f05e089 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Fri, 29 Dec 2023 14:15:34 +0100 Subject: [PATCH 12/13] artikel readded buchhaltung options --- upgrade/data/db_schema.json | 22 + .../mysql/_gen/object.gen.artikel.php | 3008 +++++++++-------- www/widgets/_gen/widget.gen.artikel.php | 1437 ++++---- www/widgets/templates/_gen/artikel.tpl | 82 +- www/widgets/widget.artikel.php | 7 + 5 files changed, 2337 insertions(+), 2219 deletions(-) diff --git a/upgrade/data/db_schema.json b/upgrade/data/db_schema.json index d7d6491e..42b9f87c 100644 --- a/upgrade/data/db_schema.json +++ b/upgrade/data/db_schema.json @@ -16976,6 +16976,17 @@ "Extra": "", "Privileges": "select,insert,update,references", "Comment": "" + }, + { + "Field": "sachkonto", + "Type": "int(11)", + "Collation": null, + "Null": "YES", + "Key": "", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" } ], "keys": [ @@ -111226,6 +111237,17 @@ "Privileges": "select,insert,update,references", "Comment": "" }, + { + "Field": "paketdistribution", + "Type": "int(11)", + "Collation": null, + "Null": "NO", + "Key": "MUL", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" + }, { "Field": "waehrung", "Type": "varchar(255)", diff --git a/www/objectapi/mysql/_gen/object.gen.artikel.php b/www/objectapi/mysql/_gen/object.gen.artikel.php index db38306b..a12833ad 100644 --- a/www/objectapi/mysql/_gen/object.gen.artikel.php +++ b/www/objectapi/mysql/_gen/object.gen.artikel.php @@ -1,1504 +1,1510 @@ -app = $app; - } - - public function Select($id) - { - if(is_numeric($id)) - $result = $this->app->DB->SelectArr("SELECT * FROM `artikel` WHERE (`id` = '$id')"); - else - return -1; - -$result = $result[0]; - - $this->id=$result['id']; - $this->typ=$result['typ']; - $this->nummer=$result['nummer']; - $this->checksum=$result['checksum']; - $this->projekt=$result['projekt']; - $this->inaktiv=$result['inaktiv']; - $this->ausverkauft=$result['ausverkauft']; - $this->warengruppe=$result['warengruppe']; - $this->name_de=$result['name_de']; - $this->name_en=$result['name_en']; - $this->kurztext_de=$result['kurztext_de']; - $this->kurztext_en=$result['kurztext_en']; - $this->beschreibung_de=$result['beschreibung_de']; - $this->beschreibung_en=$result['beschreibung_en']; - $this->uebersicht_de=$result['uebersicht_de']; - $this->uebersicht_en=$result['uebersicht_en']; - $this->links_de=$result['links_de']; - $this->links_en=$result['links_en']; - $this->startseite_de=$result['startseite_de']; - $this->startseite_en=$result['startseite_en']; - $this->standardbild=$result['standardbild']; - $this->herstellerlink=$result['herstellerlink']; - $this->hersteller=$result['hersteller']; - $this->teilbar=$result['teilbar']; - $this->nteile=$result['nteile']; - $this->seriennummern=$result['seriennummern']; - $this->lager_platz=$result['lager_platz']; - $this->lieferzeit=$result['lieferzeit']; - $this->lieferzeitmanuell=$result['lieferzeitmanuell']; - $this->sonstiges=$result['sonstiges']; - $this->gewicht=$result['gewicht']; - $this->endmontage=$result['endmontage']; - $this->funktionstest=$result['funktionstest']; - $this->artikelcheckliste=$result['artikelcheckliste']; - $this->stueckliste=$result['stueckliste']; - $this->juststueckliste=$result['juststueckliste']; - $this->barcode=$result['barcode']; - $this->hinzugefuegt=$result['hinzugefuegt']; - $this->pcbdecal=$result['pcbdecal']; - $this->lagerartikel=$result['lagerartikel']; - $this->porto=$result['porto']; - $this->chargenverwaltung=$result['chargenverwaltung']; - $this->provisionsartikel=$result['provisionsartikel']; - $this->gesperrt=$result['gesperrt']; - $this->sperrgrund=$result['sperrgrund']; - $this->geloescht=$result['geloescht']; - $this->gueltigbis=$result['gueltigbis']; - $this->umsatzsteuer=$result['umsatzsteuer']; - $this->klasse=$result['klasse']; - $this->adresse=$result['adresse']; - $this->shopartikel=$result['shopartikel']; - $this->unishopartikel=$result['unishopartikel']; - $this->journalshopartikel=$result['journalshopartikel']; - $this->shop=$result['shop']; - $this->katalog=$result['katalog']; - $this->katalogtext_de=$result['katalogtext_de']; - $this->katalogtext_en=$result['katalogtext_en']; - $this->katalogbezeichnung_de=$result['katalogbezeichnung_de']; - $this->katalogbezeichnung_en=$result['katalogbezeichnung_en']; - $this->neu=$result['neu']; - $this->topseller=$result['topseller']; - $this->startseite=$result['startseite']; - $this->wichtig=$result['wichtig']; - $this->mindestlager=$result['mindestlager']; - $this->mindestbestellung=$result['mindestbestellung']; - $this->partnerprogramm_sperre=$result['partnerprogramm_sperre']; - $this->internerkommentar=$result['internerkommentar']; - $this->intern_gesperrt=$result['intern_gesperrt']; - $this->intern_gesperrtuser=$result['intern_gesperrtuser']; - $this->intern_gesperrtgrund=$result['intern_gesperrtgrund']; - $this->inbearbeitung=$result['inbearbeitung']; - $this->inbearbeitunguser=$result['inbearbeitunguser']; - $this->cache_lagerplatzinhaltmenge=$result['cache_lagerplatzinhaltmenge']; - $this->internkommentar=$result['internkommentar']; - $this->firma=$result['firma']; - $this->logdatei=$result['logdatei']; - $this->anabregs_text=$result['anabregs_text']; - $this->autobestellung=$result['autobestellung']; - $this->produktion=$result['produktion']; - $this->herstellernummer=$result['herstellernummer']; - $this->restmenge=$result['restmenge']; - $this->mlmdirektpraemie=$result['mlmdirektpraemie']; - $this->keineeinzelartikelanzeigen=$result['keineeinzelartikelanzeigen']; - $this->mindesthaltbarkeitsdatum=$result['mindesthaltbarkeitsdatum']; - $this->letzteseriennummer=$result['letzteseriennummer']; - $this->individualartikel=$result['individualartikel']; - $this->keinrabatterlaubt=$result['keinrabatterlaubt']; - $this->rabatt=$result['rabatt']; - $this->rabatt_prozent=$result['rabatt_prozent']; - $this->geraet=$result['geraet']; - $this->serviceartikel=$result['serviceartikel']; - $this->autoabgleicherlaubt=$result['autoabgleicherlaubt']; - $this->pseudopreis=$result['pseudopreis']; - $this->freigabenotwendig=$result['freigabenotwendig']; - $this->freigaberegel=$result['freigaberegel']; - $this->nachbestellt=$result['nachbestellt']; - $this->ean=$result['ean']; - $this->mlmpunkte=$result['mlmpunkte']; - $this->mlmbonuspunkte=$result['mlmbonuspunkte']; - $this->mlmkeinepunkteeigenkauf=$result['mlmkeinepunkteeigenkauf']; - $this->shop2=$result['shop2']; - $this->shop3=$result['shop3']; - $this->usereditid=$result['usereditid']; - $this->useredittimestamp=$result['useredittimestamp']; - $this->freifeld1=$result['freifeld1']; - $this->freifeld2=$result['freifeld2']; - $this->freifeld3=$result['freifeld3']; - $this->freifeld4=$result['freifeld4']; - $this->freifeld5=$result['freifeld5']; - $this->freifeld6=$result['freifeld6']; - $this->einheit=$result['einheit']; - $this->webid=$result['webid']; - $this->lieferzeitmanuell_en=$result['lieferzeitmanuell_en']; - $this->variante=$result['variante']; - $this->variante_von=$result['variante_von']; - $this->produktioninfo=$result['produktioninfo']; - $this->sonderaktion=$result['sonderaktion']; - $this->sonderaktion_en=$result['sonderaktion_en']; - $this->autolagerlampe=$result['autolagerlampe']; - $this->leerfeld=$result['leerfeld']; - $this->zolltarifnummer=$result['zolltarifnummer']; - $this->herkunftsland=$result['herkunftsland']; - $this->laenge=$result['laenge']; - $this->breite=$result['breite']; - $this->hoehe=$result['hoehe']; - $this->gebuehr=$result['gebuehr']; - $this->pseudolager=$result['pseudolager']; - $this->downloadartikel=$result['downloadartikel']; - $this->matrixprodukt=$result['matrixprodukt']; - $this->steuer_erloese_inland_normal=$result['steuer_erloese_inland_normal']; - $this->steuer_aufwendung_inland_normal=$result['steuer_aufwendung_inland_normal']; - $this->steuer_erloese_inland_ermaessigt=$result['steuer_erloese_inland_ermaessigt']; - $this->steuer_aufwendung_inland_ermaessigt=$result['steuer_aufwendung_inland_ermaessigt']; - $this->steuer_erloese_inland_steuerfrei=$result['steuer_erloese_inland_steuerfrei']; - $this->steuer_aufwendung_inland_steuerfrei=$result['steuer_aufwendung_inland_steuerfrei']; - $this->steuer_erloese_inland_innergemeinschaftlich=$result['steuer_erloese_inland_innergemeinschaftlich']; - $this->steuer_aufwendung_inland_innergemeinschaftlich=$result['steuer_aufwendung_inland_innergemeinschaftlich']; - $this->steuer_erloese_inland_eunormal=$result['steuer_erloese_inland_eunormal']; - $this->steuer_erloese_inland_nichtsteuerbar=$result['steuer_erloese_inland_nichtsteuerbar']; - $this->steuer_erloese_inland_euermaessigt=$result['steuer_erloese_inland_euermaessigt']; - $this->steuer_aufwendung_inland_nichtsteuerbar=$result['steuer_aufwendung_inland_nichtsteuerbar']; - $this->steuer_aufwendung_inland_eunormal=$result['steuer_aufwendung_inland_eunormal']; - $this->steuer_aufwendung_inland_euermaessigt=$result['steuer_aufwendung_inland_euermaessigt']; - $this->steuer_erloese_inland_export=$result['steuer_erloese_inland_export']; - $this->steuer_aufwendung_inland_import=$result['steuer_aufwendung_inland_import']; - $this->steuer_art_produkt=$result['steuer_art_produkt']; - $this->steuer_art_produkt_download=$result['steuer_art_produkt_download']; - $this->metadescription_de=$result['metadescription_de']; - $this->metadescription_en=$result['metadescription_en']; - $this->metakeywords_de=$result['metakeywords_de']; - $this->metakeywords_en=$result['metakeywords_en']; - $this->anabregs_text_en=$result['anabregs_text_en']; - $this->externeproduktion=$result['externeproduktion']; - $this->bildvorschau=$result['bildvorschau']; - $this->inventursperre=$result['inventursperre']; - $this->variante_kopie=$result['variante_kopie']; - $this->unikat=$result['unikat']; - $this->generierenummerbeioption=$result['generierenummerbeioption']; - $this->allelieferanten=$result['allelieferanten']; - $this->tagespreise=$result['tagespreise']; - $this->rohstoffe=$result['rohstoffe']; - $this->xvp=$result['xvp']; - $this->ohnepreisimpdf=$result['ohnepreisimpdf']; - $this->provisionssperre=$result['provisionssperre']; - $this->dienstleistung=$result['dienstleistung']; - $this->inventurekaktiv=$result['inventurekaktiv']; - $this->inventurek=$result['inventurek']; - $this->hinweis_einfuegen=$result['hinweis_einfuegen']; - $this->etikettautodruck=$result['etikettautodruck']; - $this->lagerkorrekturwert=$result['lagerkorrekturwert']; - $this->autodrucketikett=$result['autodrucketikett']; - $this->abckategorie=$result['abckategorie']; - $this->laststorage_changed=$result['laststorage_changed']; - $this->laststorage_sync=$result['laststorage_sync']; - $this->steuersatz=$result['steuersatz']; - $this->steuertext_innergemeinschaftlich=$result['steuertext_innergemeinschaftlich']; - $this->steuertext_export=$result['steuertext_export']; - $this->formelmenge=$result['formelmenge']; - $this->formelpreis=$result['formelpreis']; - $this->freifeld7=$result['freifeld7']; - $this->freifeld8=$result['freifeld8']; - $this->freifeld9=$result['freifeld9']; - $this->freifeld10=$result['freifeld10']; - $this->freifeld11=$result['freifeld11']; - $this->freifeld12=$result['freifeld12']; - $this->freifeld13=$result['freifeld13']; - $this->freifeld14=$result['freifeld14']; - $this->freifeld15=$result['freifeld15']; - $this->freifeld16=$result['freifeld16']; - $this->freifeld17=$result['freifeld17']; - $this->freifeld18=$result['freifeld18']; - $this->freifeld19=$result['freifeld19']; - $this->freifeld20=$result['freifeld20']; - $this->freifeld21=$result['freifeld21']; - $this->freifeld22=$result['freifeld22']; - $this->freifeld23=$result['freifeld23']; - $this->freifeld24=$result['freifeld24']; - $this->freifeld25=$result['freifeld25']; - $this->freifeld26=$result['freifeld26']; - $this->freifeld27=$result['freifeld27']; - $this->freifeld28=$result['freifeld28']; - $this->freifeld29=$result['freifeld29']; - $this->freifeld30=$result['freifeld30']; - $this->freifeld31=$result['freifeld31']; - $this->freifeld32=$result['freifeld32']; - $this->freifeld33=$result['freifeld33']; - $this->freifeld34=$result['freifeld34']; - $this->freifeld35=$result['freifeld35']; - $this->freifeld36=$result['freifeld36']; - $this->freifeld37=$result['freifeld37']; - $this->freifeld38=$result['freifeld38']; - $this->freifeld39=$result['freifeld39']; - $this->freifeld40=$result['freifeld40']; - $this->ursprungsregion=$result['ursprungsregion']; - $this->bestandalternativartikel=$result['bestandalternativartikel']; - $this->metatitle_de=$result['metatitle_de']; - $this->metatitle_en=$result['metatitle_en']; - $this->vkmeldungunterdruecken=$result['vkmeldungunterdruecken']; - $this->altersfreigabe=$result['altersfreigabe']; - $this->unikatbeikopie=$result['unikatbeikopie']; - $this->steuergruppe=$result['steuergruppe']; - $this->kostenstelle=$result['kostenstelle']; - $this->artikelautokalkulation=$result['artikelautokalkulation']; - $this->artikelabschliessenkalkulation=$result['artikelabschliessenkalkulation']; - $this->artikelfifokalkulation=$result['artikelfifokalkulation']; - $this->keinskonto=$result['keinskonto']; - $this->berechneterek=$result['berechneterek']; - $this->verwendeberechneterek=$result['verwendeberechneterek']; - $this->berechneterekwaehrung=$result['berechneterekwaehrung']; - $this->has_preproduced_partlist=$result['has_preproduced_partlist']; - $this->preproduced_partlist=$result['preproduced_partlist']; - $this->nettogewicht=$result['nettogewicht']; - } - - public function Create() - { - $sql = "INSERT INTO `artikel` (`id`,`typ`,`nummer`,`checksum`,`projekt`,`inaktiv`,`ausverkauft`,`warengruppe`,`name_de`,`name_en`,`kurztext_de`,`kurztext_en`,`beschreibung_de`,`beschreibung_en`,`uebersicht_de`,`uebersicht_en`,`links_de`,`links_en`,`startseite_de`,`startseite_en`,`standardbild`,`herstellerlink`,`hersteller`,`teilbar`,`nteile`,`seriennummern`,`lager_platz`,`lieferzeit`,`lieferzeitmanuell`,`sonstiges`,`gewicht`,`endmontage`,`funktionstest`,`artikelcheckliste`,`stueckliste`,`juststueckliste`,`barcode`,`hinzugefuegt`,`pcbdecal`,`lagerartikel`,`porto`,`chargenverwaltung`,`provisionsartikel`,`gesperrt`,`sperrgrund`,`geloescht`,`gueltigbis`,`umsatzsteuer`,`klasse`,`adresse`,`shopartikel`,`unishopartikel`,`journalshopartikel`,`shop`,`katalog`,`katalogtext_de`,`katalogtext_en`,`katalogbezeichnung_de`,`katalogbezeichnung_en`,`neu`,`topseller`,`startseite`,`wichtig`,`mindestlager`,`mindestbestellung`,`partnerprogramm_sperre`,`internerkommentar`,`intern_gesperrt`,`intern_gesperrtuser`,`intern_gesperrtgrund`,`inbearbeitung`,`inbearbeitunguser`,`cache_lagerplatzinhaltmenge`,`internkommentar`,`firma`,`logdatei`,`anabregs_text`,`autobestellung`,`produktion`,`herstellernummer`,`restmenge`,`mlmdirektpraemie`,`keineeinzelartikelanzeigen`,`mindesthaltbarkeitsdatum`,`letzteseriennummer`,`individualartikel`,`keinrabatterlaubt`,`rabatt`,`rabatt_prozent`,`geraet`,`serviceartikel`,`autoabgleicherlaubt`,`pseudopreis`,`freigabenotwendig`,`freigaberegel`,`nachbestellt`,`ean`,`mlmpunkte`,`mlmbonuspunkte`,`mlmkeinepunkteeigenkauf`,`shop2`,`shop3`,`usereditid`,`useredittimestamp`,`freifeld1`,`freifeld2`,`freifeld3`,`freifeld4`,`freifeld5`,`freifeld6`,`einheit`,`webid`,`lieferzeitmanuell_en`,`variante`,`variante_von`,`produktioninfo`,`sonderaktion`,`sonderaktion_en`,`autolagerlampe`,`leerfeld`,`zolltarifnummer`,`herkunftsland`,`laenge`,`breite`,`hoehe`,`gebuehr`,`pseudolager`,`downloadartikel`,`matrixprodukt`,`steuer_erloese_inland_normal`,`steuer_aufwendung_inland_normal`,`steuer_erloese_inland_ermaessigt`,`steuer_aufwendung_inland_ermaessigt`,`steuer_erloese_inland_steuerfrei`,`steuer_aufwendung_inland_steuerfrei`,`steuer_erloese_inland_innergemeinschaftlich`,`steuer_aufwendung_inland_innergemeinschaftlich`,`steuer_erloese_inland_eunormal`,`steuer_erloese_inland_nichtsteuerbar`,`steuer_erloese_inland_euermaessigt`,`steuer_aufwendung_inland_nichtsteuerbar`,`steuer_aufwendung_inland_eunormal`,`steuer_aufwendung_inland_euermaessigt`,`steuer_erloese_inland_export`,`steuer_aufwendung_inland_import`,`steuer_art_produkt`,`steuer_art_produkt_download`,`metadescription_de`,`metadescription_en`,`metakeywords_de`,`metakeywords_en`,`anabregs_text_en`,`externeproduktion`,`bildvorschau`,`inventursperre`,`variante_kopie`,`unikat`,`generierenummerbeioption`,`allelieferanten`,`tagespreise`,`rohstoffe`,`xvp`,`ohnepreisimpdf`,`provisionssperre`,`dienstleistung`,`inventurekaktiv`,`inventurek`,`hinweis_einfuegen`,`etikettautodruck`,`lagerkorrekturwert`,`autodrucketikett`,`abckategorie`,`laststorage_changed`,`laststorage_sync`,`steuersatz`,`steuertext_innergemeinschaftlich`,`steuertext_export`,`formelmenge`,`formelpreis`,`freifeld7`,`freifeld8`,`freifeld9`,`freifeld10`,`freifeld11`,`freifeld12`,`freifeld13`,`freifeld14`,`freifeld15`,`freifeld16`,`freifeld17`,`freifeld18`,`freifeld19`,`freifeld20`,`freifeld21`,`freifeld22`,`freifeld23`,`freifeld24`,`freifeld25`,`freifeld26`,`freifeld27`,`freifeld28`,`freifeld29`,`freifeld30`,`freifeld31`,`freifeld32`,`freifeld33`,`freifeld34`,`freifeld35`,`freifeld36`,`freifeld37`,`freifeld38`,`freifeld39`,`freifeld40`,`ursprungsregion`,`bestandalternativartikel`,`metatitle_de`,`metatitle_en`,`vkmeldungunterdruecken`,`altersfreigabe`,`unikatbeikopie`,`steuergruppe`,`kostenstelle`,`artikelautokalkulation`,`artikelabschliessenkalkulation`,`artikelfifokalkulation`,`keinskonto`,`berechneterek`,`verwendeberechneterek`,`berechneterekwaehrung`,`has_preproduced_partlist`,`preproduced_partlist`,`nettogewicht`) - VALUES(NULL,'{$this->typ}','{$this->nummer}','{$this->checksum}','{$this->projekt}','{$this->inaktiv}','{$this->ausverkauft}','{$this->warengruppe}','{$this->name_de}','{$this->name_en}','{$this->kurztext_de}','{$this->kurztext_en}','{$this->beschreibung_de}','{$this->beschreibung_en}','{$this->uebersicht_de}','{$this->uebersicht_en}','{$this->links_de}','{$this->links_en}','{$this->startseite_de}','{$this->startseite_en}','{$this->standardbild}','{$this->herstellerlink}','{$this->hersteller}','{$this->teilbar}','{$this->nteile}','{$this->seriennummern}','{$this->lager_platz}','{$this->lieferzeit}','{$this->lieferzeitmanuell}','{$this->sonstiges}','{$this->gewicht}','{$this->endmontage}','{$this->funktionstest}','{$this->artikelcheckliste}','{$this->stueckliste}','{$this->juststueckliste}','{$this->barcode}','{$this->hinzugefuegt}','{$this->pcbdecal}','{$this->lagerartikel}','{$this->porto}','{$this->chargenverwaltung}','{$this->provisionsartikel}','{$this->gesperrt}','{$this->sperrgrund}','{$this->geloescht}','{$this->gueltigbis}','{$this->umsatzsteuer}','{$this->klasse}','{$this->adresse}','{$this->shopartikel}','{$this->unishopartikel}','{$this->journalshopartikel}','{$this->shop}','{$this->katalog}','{$this->katalogtext_de}','{$this->katalogtext_en}','{$this->katalogbezeichnung_de}','{$this->katalogbezeichnung_en}','{$this->neu}','{$this->topseller}','{$this->startseite}','{$this->wichtig}','{$this->mindestlager}','{$this->mindestbestellung}','{$this->partnerprogramm_sperre}','{$this->internerkommentar}','{$this->intern_gesperrt}','{$this->intern_gesperrtuser}','{$this->intern_gesperrtgrund}','{$this->inbearbeitung}','{$this->inbearbeitunguser}','{$this->cache_lagerplatzinhaltmenge}','{$this->internkommentar}','{$this->firma}','{$this->logdatei}','{$this->anabregs_text}','{$this->autobestellung}','{$this->produktion}','{$this->herstellernummer}','{$this->restmenge}','{$this->mlmdirektpraemie}','{$this->keineeinzelartikelanzeigen}','{$this->mindesthaltbarkeitsdatum}','{$this->letzteseriennummer}','{$this->individualartikel}','{$this->keinrabatterlaubt}','{$this->rabatt}','{$this->rabatt_prozent}','{$this->geraet}','{$this->serviceartikel}','{$this->autoabgleicherlaubt}','{$this->pseudopreis}','{$this->freigabenotwendig}','{$this->freigaberegel}','{$this->nachbestellt}','{$this->ean}','{$this->mlmpunkte}','{$this->mlmbonuspunkte}','{$this->mlmkeinepunkteeigenkauf}','{$this->shop2}','{$this->shop3}','{$this->usereditid}','{$this->useredittimestamp}','{$this->freifeld1}','{$this->freifeld2}','{$this->freifeld3}','{$this->freifeld4}','{$this->freifeld5}','{$this->freifeld6}','{$this->einheit}','{$this->webid}','{$this->lieferzeitmanuell_en}','{$this->variante}','{$this->variante_von}','{$this->produktioninfo}','{$this->sonderaktion}','{$this->sonderaktion_en}','{$this->autolagerlampe}','{$this->leerfeld}','{$this->zolltarifnummer}','{$this->herkunftsland}','{$this->laenge}','{$this->breite}','{$this->hoehe}','{$this->gebuehr}','{$this->pseudolager}','{$this->downloadartikel}','{$this->matrixprodukt}','{$this->steuer_erloese_inland_normal}','{$this->steuer_aufwendung_inland_normal}','{$this->steuer_erloese_inland_ermaessigt}','{$this->steuer_aufwendung_inland_ermaessigt}','{$this->steuer_erloese_inland_steuerfrei}','{$this->steuer_aufwendung_inland_steuerfrei}','{$this->steuer_erloese_inland_innergemeinschaftlich}','{$this->steuer_aufwendung_inland_innergemeinschaftlich}','{$this->steuer_erloese_inland_eunormal}','{$this->steuer_erloese_inland_nichtsteuerbar}','{$this->steuer_erloese_inland_euermaessigt}','{$this->steuer_aufwendung_inland_nichtsteuerbar}','{$this->steuer_aufwendung_inland_eunormal}','{$this->steuer_aufwendung_inland_euermaessigt}','{$this->steuer_erloese_inland_export}','{$this->steuer_aufwendung_inland_import}','{$this->steuer_art_produkt}','{$this->steuer_art_produkt_download}','{$this->metadescription_de}','{$this->metadescription_en}','{$this->metakeywords_de}','{$this->metakeywords_en}','{$this->anabregs_text_en}','{$this->externeproduktion}','{$this->bildvorschau}','{$this->inventursperre}','{$this->variante_kopie}','{$this->unikat}','{$this->generierenummerbeioption}','{$this->allelieferanten}','{$this->tagespreise}','{$this->rohstoffe}','{$this->xvp}','{$this->ohnepreisimpdf}','{$this->provisionssperre}','{$this->dienstleistung}','{$this->inventurekaktiv}','{$this->inventurek}','{$this->hinweis_einfuegen}','{$this->etikettautodruck}','{$this->lagerkorrekturwert}','{$this->autodrucketikett}','{$this->abckategorie}','{$this->laststorage_changed}','{$this->laststorage_sync}','{$this->steuersatz}','{$this->steuertext_innergemeinschaftlich}','{$this->steuertext_export}','{$this->formelmenge}','{$this->formelpreis}','{$this->freifeld7}','{$this->freifeld8}','{$this->freifeld9}','{$this->freifeld10}','{$this->freifeld11}','{$this->freifeld12}','{$this->freifeld13}','{$this->freifeld14}','{$this->freifeld15}','{$this->freifeld16}','{$this->freifeld17}','{$this->freifeld18}','{$this->freifeld19}','{$this->freifeld20}','{$this->freifeld21}','{$this->freifeld22}','{$this->freifeld23}','{$this->freifeld24}','{$this->freifeld25}','{$this->freifeld26}','{$this->freifeld27}','{$this->freifeld28}','{$this->freifeld29}','{$this->freifeld30}','{$this->freifeld31}','{$this->freifeld32}','{$this->freifeld33}','{$this->freifeld34}','{$this->freifeld35}','{$this->freifeld36}','{$this->freifeld37}','{$this->freifeld38}','{$this->freifeld39}','{$this->freifeld40}','{$this->ursprungsregion}','{$this->bestandalternativartikel}','{$this->metatitle_de}','{$this->metatitle_en}','{$this->vkmeldungunterdruecken}','{$this->altersfreigabe}','{$this->unikatbeikopie}','{$this->steuergruppe}','{$this->kostenstelle}','{$this->artikelautokalkulation}','{$this->artikelabschliessenkalkulation}','{$this->artikelfifokalkulation}','{$this->keinskonto}','{$this->berechneterek}','{$this->verwendeberechneterek}','{$this->berechneterekwaehrung}','{$this->has_preproduced_partlist}','{$this->preproduced_partlist}','{$this->nettogewicht}')"; - - $this->app->DB->Insert($sql); - $this->id = $this->app->DB->GetInsertID(); - } - - public function Update() - { - if(!is_numeric($this->id)) { - return -1; - } - - $sql = "UPDATE `artikel` SET - `typ`='{$this->typ}', - `nummer`='{$this->nummer}', - `checksum`='{$this->checksum}', - `projekt`='{$this->projekt}', - `inaktiv`='{$this->inaktiv}', - `ausverkauft`='{$this->ausverkauft}', - `warengruppe`='{$this->warengruppe}', - `name_de`='{$this->name_de}', - `name_en`='{$this->name_en}', - `kurztext_de`='{$this->kurztext_de}', - `kurztext_en`='{$this->kurztext_en}', - `beschreibung_de`='{$this->beschreibung_de}', - `beschreibung_en`='{$this->beschreibung_en}', - `uebersicht_de`='{$this->uebersicht_de}', - `uebersicht_en`='{$this->uebersicht_en}', - `links_de`='{$this->links_de}', - `links_en`='{$this->links_en}', - `startseite_de`='{$this->startseite_de}', - `startseite_en`='{$this->startseite_en}', - `standardbild`='{$this->standardbild}', - `herstellerlink`='{$this->herstellerlink}', - `hersteller`='{$this->hersteller}', - `teilbar`='{$this->teilbar}', - `nteile`='{$this->nteile}', - `seriennummern`='{$this->seriennummern}', - `lager_platz`='{$this->lager_platz}', - `lieferzeit`='{$this->lieferzeit}', - `lieferzeitmanuell`='{$this->lieferzeitmanuell}', - `sonstiges`='{$this->sonstiges}', - `gewicht`='{$this->gewicht}', - `endmontage`='{$this->endmontage}', - `funktionstest`='{$this->funktionstest}', - `artikelcheckliste`='{$this->artikelcheckliste}', - `stueckliste`='{$this->stueckliste}', - `juststueckliste`='{$this->juststueckliste}', - `barcode`='{$this->barcode}', - `hinzugefuegt`='{$this->hinzugefuegt}', - `pcbdecal`='{$this->pcbdecal}', - `lagerartikel`='{$this->lagerartikel}', - `porto`='{$this->porto}', - `chargenverwaltung`='{$this->chargenverwaltung}', - `provisionsartikel`='{$this->provisionsartikel}', - `gesperrt`='{$this->gesperrt}', - `sperrgrund`='{$this->sperrgrund}', - `geloescht`='{$this->geloescht}', - `gueltigbis`='{$this->gueltigbis}', - `umsatzsteuer`='{$this->umsatzsteuer}', - `klasse`='{$this->klasse}', - `adresse`='{$this->adresse}', - `shopartikel`='{$this->shopartikel}', - `unishopartikel`='{$this->unishopartikel}', - `journalshopartikel`='{$this->journalshopartikel}', - `shop`='{$this->shop}', - `katalog`='{$this->katalog}', - `katalogtext_de`='{$this->katalogtext_de}', - `katalogtext_en`='{$this->katalogtext_en}', - `katalogbezeichnung_de`='{$this->katalogbezeichnung_de}', - `katalogbezeichnung_en`='{$this->katalogbezeichnung_en}', - `neu`='{$this->neu}', - `topseller`='{$this->topseller}', - `startseite`='{$this->startseite}', - `wichtig`='{$this->wichtig}', - `mindestlager`='{$this->mindestlager}', - `mindestbestellung`='{$this->mindestbestellung}', - `partnerprogramm_sperre`='{$this->partnerprogramm_sperre}', - `internerkommentar`='{$this->internerkommentar}', - `intern_gesperrt`='{$this->intern_gesperrt}', - `intern_gesperrtuser`='{$this->intern_gesperrtuser}', - `intern_gesperrtgrund`='{$this->intern_gesperrtgrund}', - `inbearbeitung`='{$this->inbearbeitung}', - `inbearbeitunguser`='{$this->inbearbeitunguser}', - `cache_lagerplatzinhaltmenge`='{$this->cache_lagerplatzinhaltmenge}', - `internkommentar`='{$this->internkommentar}', - `firma`='{$this->firma}', - `logdatei`='{$this->logdatei}', - `anabregs_text`='{$this->anabregs_text}', - `autobestellung`='{$this->autobestellung}', - `produktion`='{$this->produktion}', - `herstellernummer`='{$this->herstellernummer}', - `restmenge`='{$this->restmenge}', - `mlmdirektpraemie`='{$this->mlmdirektpraemie}', - `keineeinzelartikelanzeigen`='{$this->keineeinzelartikelanzeigen}', - `mindesthaltbarkeitsdatum`='{$this->mindesthaltbarkeitsdatum}', - `letzteseriennummer`='{$this->letzteseriennummer}', - `individualartikel`='{$this->individualartikel}', - `keinrabatterlaubt`='{$this->keinrabatterlaubt}', - `rabatt`='{$this->rabatt}', - `rabatt_prozent`='{$this->rabatt_prozent}', - `geraet`='{$this->geraet}', - `serviceartikel`='{$this->serviceartikel}', - `autoabgleicherlaubt`='{$this->autoabgleicherlaubt}', - `pseudopreis`='{$this->pseudopreis}', - `freigabenotwendig`='{$this->freigabenotwendig}', - `freigaberegel`='{$this->freigaberegel}', - `nachbestellt`='{$this->nachbestellt}', - `ean`='{$this->ean}', - `mlmpunkte`='{$this->mlmpunkte}', - `mlmbonuspunkte`='{$this->mlmbonuspunkte}', - `mlmkeinepunkteeigenkauf`='{$this->mlmkeinepunkteeigenkauf}', - `shop2`='{$this->shop2}', - `shop3`='{$this->shop3}', - `usereditid`='{$this->usereditid}', - `useredittimestamp`='{$this->useredittimestamp}', - `freifeld1`='{$this->freifeld1}', - `freifeld2`='{$this->freifeld2}', - `freifeld3`='{$this->freifeld3}', - `freifeld4`='{$this->freifeld4}', - `freifeld5`='{$this->freifeld5}', - `freifeld6`='{$this->freifeld6}', - `einheit`='{$this->einheit}', - `webid`='{$this->webid}', - `lieferzeitmanuell_en`='{$this->lieferzeitmanuell_en}', - `variante`='{$this->variante}', - `variante_von`='{$this->variante_von}', - `produktioninfo`='{$this->produktioninfo}', - `sonderaktion`='{$this->sonderaktion}', - `sonderaktion_en`='{$this->sonderaktion_en}', - `autolagerlampe`='{$this->autolagerlampe}', - `leerfeld`='{$this->leerfeld}', - `zolltarifnummer`='{$this->zolltarifnummer}', - `herkunftsland`='{$this->herkunftsland}', - `laenge`='{$this->laenge}', - `breite`='{$this->breite}', - `hoehe`='{$this->hoehe}', - `gebuehr`='{$this->gebuehr}', - `pseudolager`='{$this->pseudolager}', - `downloadartikel`='{$this->downloadartikel}', - `matrixprodukt`='{$this->matrixprodukt}', - `steuer_erloese_inland_normal`='{$this->steuer_erloese_inland_normal}', - `steuer_aufwendung_inland_normal`='{$this->steuer_aufwendung_inland_normal}', - `steuer_erloese_inland_ermaessigt`='{$this->steuer_erloese_inland_ermaessigt}', - `steuer_aufwendung_inland_ermaessigt`='{$this->steuer_aufwendung_inland_ermaessigt}', - `steuer_erloese_inland_steuerfrei`='{$this->steuer_erloese_inland_steuerfrei}', - `steuer_aufwendung_inland_steuerfrei`='{$this->steuer_aufwendung_inland_steuerfrei}', - `steuer_erloese_inland_innergemeinschaftlich`='{$this->steuer_erloese_inland_innergemeinschaftlich}', - `steuer_aufwendung_inland_innergemeinschaftlich`='{$this->steuer_aufwendung_inland_innergemeinschaftlich}', - `steuer_erloese_inland_eunormal`='{$this->steuer_erloese_inland_eunormal}', - `steuer_erloese_inland_nichtsteuerbar`='{$this->steuer_erloese_inland_nichtsteuerbar}', - `steuer_erloese_inland_euermaessigt`='{$this->steuer_erloese_inland_euermaessigt}', - `steuer_aufwendung_inland_nichtsteuerbar`='{$this->steuer_aufwendung_inland_nichtsteuerbar}', - `steuer_aufwendung_inland_eunormal`='{$this->steuer_aufwendung_inland_eunormal}', - `steuer_aufwendung_inland_euermaessigt`='{$this->steuer_aufwendung_inland_euermaessigt}', - `steuer_erloese_inland_export`='{$this->steuer_erloese_inland_export}', - `steuer_aufwendung_inland_import`='{$this->steuer_aufwendung_inland_import}', - `steuer_art_produkt`='{$this->steuer_art_produkt}', - `steuer_art_produkt_download`='{$this->steuer_art_produkt_download}', - `metadescription_de`='{$this->metadescription_de}', - `metadescription_en`='{$this->metadescription_en}', - `metakeywords_de`='{$this->metakeywords_de}', - `metakeywords_en`='{$this->metakeywords_en}', - `anabregs_text_en`='{$this->anabregs_text_en}', - `externeproduktion`='{$this->externeproduktion}', - `bildvorschau`='{$this->bildvorschau}', - `inventursperre`='{$this->inventursperre}', - `variante_kopie`='{$this->variante_kopie}', - `unikat`='{$this->unikat}', - `generierenummerbeioption`='{$this->generierenummerbeioption}', - `allelieferanten`='{$this->allelieferanten}', - `tagespreise`='{$this->tagespreise}', - `rohstoffe`='{$this->rohstoffe}', - `xvp`='{$this->xvp}', - `ohnepreisimpdf`='{$this->ohnepreisimpdf}', - `provisionssperre`='{$this->provisionssperre}', - `dienstleistung`='{$this->dienstleistung}', - `inventurekaktiv`='{$this->inventurekaktiv}', - `inventurek`='{$this->inventurek}', - `hinweis_einfuegen`='{$this->hinweis_einfuegen}', - `etikettautodruck`='{$this->etikettautodruck}', - `lagerkorrekturwert`='{$this->lagerkorrekturwert}', - `autodrucketikett`='{$this->autodrucketikett}', - `abckategorie`='{$this->abckategorie}', - `laststorage_changed`='{$this->laststorage_changed}', - `laststorage_sync`='{$this->laststorage_sync}', - `steuersatz`='{$this->steuersatz}', - `steuertext_innergemeinschaftlich`='{$this->steuertext_innergemeinschaftlich}', - `steuertext_export`='{$this->steuertext_export}', - `formelmenge`='{$this->formelmenge}', - `formelpreis`='{$this->formelpreis}', - `freifeld7`='{$this->freifeld7}', - `freifeld8`='{$this->freifeld8}', - `freifeld9`='{$this->freifeld9}', - `freifeld10`='{$this->freifeld10}', - `freifeld11`='{$this->freifeld11}', - `freifeld12`='{$this->freifeld12}', - `freifeld13`='{$this->freifeld13}', - `freifeld14`='{$this->freifeld14}', - `freifeld15`='{$this->freifeld15}', - `freifeld16`='{$this->freifeld16}', - `freifeld17`='{$this->freifeld17}', - `freifeld18`='{$this->freifeld18}', - `freifeld19`='{$this->freifeld19}', - `freifeld20`='{$this->freifeld20}', - `freifeld21`='{$this->freifeld21}', - `freifeld22`='{$this->freifeld22}', - `freifeld23`='{$this->freifeld23}', - `freifeld24`='{$this->freifeld24}', - `freifeld25`='{$this->freifeld25}', - `freifeld26`='{$this->freifeld26}', - `freifeld27`='{$this->freifeld27}', - `freifeld28`='{$this->freifeld28}', - `freifeld29`='{$this->freifeld29}', - `freifeld30`='{$this->freifeld30}', - `freifeld31`='{$this->freifeld31}', - `freifeld32`='{$this->freifeld32}', - `freifeld33`='{$this->freifeld33}', - `freifeld34`='{$this->freifeld34}', - `freifeld35`='{$this->freifeld35}', - `freifeld36`='{$this->freifeld36}', - `freifeld37`='{$this->freifeld37}', - `freifeld38`='{$this->freifeld38}', - `freifeld39`='{$this->freifeld39}', - `freifeld40`='{$this->freifeld40}', - `ursprungsregion`='{$this->ursprungsregion}', - `bestandalternativartikel`='{$this->bestandalternativartikel}', - `metatitle_de`='{$this->metatitle_de}', - `metatitle_en`='{$this->metatitle_en}', - `vkmeldungunterdruecken`='{$this->vkmeldungunterdruecken}', - `altersfreigabe`='{$this->altersfreigabe}', - `unikatbeikopie`='{$this->unikatbeikopie}', - `steuergruppe`='{$this->steuergruppe}', - `kostenstelle`='{$this->kostenstelle}', - `artikelautokalkulation`='{$this->artikelautokalkulation}', - `artikelabschliessenkalkulation`='{$this->artikelabschliessenkalkulation}', - `artikelfifokalkulation`='{$this->artikelfifokalkulation}', - `keinskonto`='{$this->keinskonto}', - `berechneterek`='{$this->berechneterek}', - `verwendeberechneterek`='{$this->verwendeberechneterek}', - `berechneterekwaehrung`='{$this->berechneterekwaehrung}', - `has_preproduced_partlist`='{$this->has_preproduced_partlist}', - `preproduced_partlist`='{$this->preproduced_partlist}', - `nettogewicht`='{$this->nettogewicht}' - WHERE (`id`='{$this->id}')"; - - $this->app->DB->Update($sql); - } - - public function Delete($id='') - { - if(is_numeric($id)) - { - $this->id=$id; - } - else - return -1; - - $sql = "DELETE FROM `artikel` WHERE (`id`='{$this->id}')"; - $this->app->DB->Delete($sql); - - $this->id=''; - $this->typ=''; - $this->nummer=''; - $this->checksum=''; - $this->projekt=''; - $this->inaktiv=''; - $this->ausverkauft=''; - $this->warengruppe=''; - $this->name_de=''; - $this->name_en=''; - $this->kurztext_de=''; - $this->kurztext_en=''; - $this->beschreibung_de=''; - $this->beschreibung_en=''; - $this->uebersicht_de=''; - $this->uebersicht_en=''; - $this->links_de=''; - $this->links_en=''; - $this->startseite_de=''; - $this->startseite_en=''; - $this->standardbild=''; - $this->herstellerlink=''; - $this->hersteller=''; - $this->teilbar=''; - $this->nteile=''; - $this->seriennummern=''; - $this->lager_platz=''; - $this->lieferzeit=''; - $this->lieferzeitmanuell=''; - $this->sonstiges=''; - $this->gewicht=''; - $this->endmontage=''; - $this->funktionstest=''; - $this->artikelcheckliste=''; - $this->stueckliste=''; - $this->juststueckliste=''; - $this->barcode=''; - $this->hinzugefuegt=''; - $this->pcbdecal=''; - $this->lagerartikel=''; - $this->porto=''; - $this->chargenverwaltung=''; - $this->provisionsartikel=''; - $this->gesperrt=''; - $this->sperrgrund=''; - $this->geloescht=''; - $this->gueltigbis=''; - $this->umsatzsteuer=''; - $this->klasse=''; - $this->adresse=''; - $this->shopartikel=''; - $this->unishopartikel=''; - $this->journalshopartikel=''; - $this->shop=''; - $this->katalog=''; - $this->katalogtext_de=''; - $this->katalogtext_en=''; - $this->katalogbezeichnung_de=''; - $this->katalogbezeichnung_en=''; - $this->neu=''; - $this->topseller=''; - $this->startseite=''; - $this->wichtig=''; - $this->mindestlager=''; - $this->mindestbestellung=''; - $this->partnerprogramm_sperre=''; - $this->internerkommentar=''; - $this->intern_gesperrt=''; - $this->intern_gesperrtuser=''; - $this->intern_gesperrtgrund=''; - $this->inbearbeitung=''; - $this->inbearbeitunguser=''; - $this->cache_lagerplatzinhaltmenge=''; - $this->internkommentar=''; - $this->firma=''; - $this->logdatei=''; - $this->anabregs_text=''; - $this->autobestellung=''; - $this->produktion=''; - $this->herstellernummer=''; - $this->restmenge=''; - $this->mlmdirektpraemie=''; - $this->keineeinzelartikelanzeigen=''; - $this->mindesthaltbarkeitsdatum=''; - $this->letzteseriennummer=''; - $this->individualartikel=''; - $this->keinrabatterlaubt=''; - $this->rabatt=''; - $this->rabatt_prozent=''; - $this->geraet=''; - $this->serviceartikel=''; - $this->autoabgleicherlaubt=''; - $this->pseudopreis=''; - $this->freigabenotwendig=''; - $this->freigaberegel=''; - $this->nachbestellt=''; - $this->ean=''; - $this->mlmpunkte=''; - $this->mlmbonuspunkte=''; - $this->mlmkeinepunkteeigenkauf=''; - $this->shop2=''; - $this->shop3=''; - $this->usereditid=''; - $this->useredittimestamp=''; - $this->freifeld1=''; - $this->freifeld2=''; - $this->freifeld3=''; - $this->freifeld4=''; - $this->freifeld5=''; - $this->freifeld6=''; - $this->einheit=''; - $this->webid=''; - $this->lieferzeitmanuell_en=''; - $this->variante=''; - $this->variante_von=''; - $this->produktioninfo=''; - $this->sonderaktion=''; - $this->sonderaktion_en=''; - $this->autolagerlampe=''; - $this->leerfeld=''; - $this->zolltarifnummer=''; - $this->herkunftsland=''; - $this->laenge=''; - $this->breite=''; - $this->hoehe=''; - $this->gebuehr=''; - $this->pseudolager=''; - $this->downloadartikel=''; - $this->matrixprodukt=''; - $this->steuer_erloese_inland_normal=''; - $this->steuer_aufwendung_inland_normal=''; - $this->steuer_erloese_inland_ermaessigt=''; - $this->steuer_aufwendung_inland_ermaessigt=''; - $this->steuer_erloese_inland_steuerfrei=''; - $this->steuer_aufwendung_inland_steuerfrei=''; - $this->steuer_erloese_inland_innergemeinschaftlich=''; - $this->steuer_aufwendung_inland_innergemeinschaftlich=''; - $this->steuer_erloese_inland_eunormal=''; - $this->steuer_erloese_inland_nichtsteuerbar=''; - $this->steuer_erloese_inland_euermaessigt=''; - $this->steuer_aufwendung_inland_nichtsteuerbar=''; - $this->steuer_aufwendung_inland_eunormal=''; - $this->steuer_aufwendung_inland_euermaessigt=''; - $this->steuer_erloese_inland_export=''; - $this->steuer_aufwendung_inland_import=''; - $this->steuer_art_produkt=''; - $this->steuer_art_produkt_download=''; - $this->metadescription_de=''; - $this->metadescription_en=''; - $this->metakeywords_de=''; - $this->metakeywords_en=''; - $this->anabregs_text_en=''; - $this->externeproduktion=''; - $this->bildvorschau=''; - $this->inventursperre=''; - $this->variante_kopie=''; - $this->unikat=''; - $this->generierenummerbeioption=''; - $this->allelieferanten=''; - $this->tagespreise=''; - $this->rohstoffe=''; - $this->xvp=''; - $this->ohnepreisimpdf=''; - $this->provisionssperre=''; - $this->dienstleistung=''; - $this->inventurekaktiv=''; - $this->inventurek=''; - $this->hinweis_einfuegen=''; - $this->etikettautodruck=''; - $this->lagerkorrekturwert=''; - $this->autodrucketikett=''; - $this->abckategorie=''; - $this->laststorage_changed=''; - $this->laststorage_sync=''; - $this->steuersatz=''; - $this->steuertext_innergemeinschaftlich=''; - $this->steuertext_export=''; - $this->formelmenge=''; - $this->formelpreis=''; - $this->freifeld7=''; - $this->freifeld8=''; - $this->freifeld9=''; - $this->freifeld10=''; - $this->freifeld11=''; - $this->freifeld12=''; - $this->freifeld13=''; - $this->freifeld14=''; - $this->freifeld15=''; - $this->freifeld16=''; - $this->freifeld17=''; - $this->freifeld18=''; - $this->freifeld19=''; - $this->freifeld20=''; - $this->freifeld21=''; - $this->freifeld22=''; - $this->freifeld23=''; - $this->freifeld24=''; - $this->freifeld25=''; - $this->freifeld26=''; - $this->freifeld27=''; - $this->freifeld28=''; - $this->freifeld29=''; - $this->freifeld30=''; - $this->freifeld31=''; - $this->freifeld32=''; - $this->freifeld33=''; - $this->freifeld34=''; - $this->freifeld35=''; - $this->freifeld36=''; - $this->freifeld37=''; - $this->freifeld38=''; - $this->freifeld39=''; - $this->freifeld40=''; - $this->ursprungsregion=''; - $this->bestandalternativartikel=''; - $this->metatitle_de=''; - $this->metatitle_en=''; - $this->vkmeldungunterdruecken=''; - $this->altersfreigabe=''; - $this->unikatbeikopie=''; - $this->steuergruppe=''; - $this->kostenstelle=''; - $this->artikelautokalkulation=''; - $this->artikelabschliessenkalkulation=''; - $this->artikelfifokalkulation=''; - $this->keinskonto=''; - $this->berechneterek=''; - $this->verwendeberechneterek=''; - $this->berechneterekwaehrung=''; - $this->has_preproduced_partlist=''; - $this->preproduced_partlist=''; - $this->nettogewicht=''; - } - - public function Copy() - { - $this->id = ''; - $this->Create(); - } - - /** - Mit dieser Funktion kann man einen Datensatz suchen - dafuer muss man die Attribute setzen nach denen gesucht werden soll - dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt - zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen - **/ - - public function Find() - { - //TODO Suche mit den werten machen - } - - public function FindNext() - { - //TODO Suche mit den alten werten fortsetzen machen - } - - /** Funktionen um durch die Tabelle iterieren zu koennen */ - - public function Next() - { - //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer - } - - public function First() - { - //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer - } - - /** dank dieser funktionen kann man die tatsaechlichen werte einfach - ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/ - - public function SetId($value) { $this->id=$value; } - public function GetId() { return $this->id; } - public function SetTyp($value) { $this->typ=$value; } - public function GetTyp() { return $this->typ; } - public function SetNummer($value) { $this->nummer=$value; } - public function GetNummer() { return $this->nummer; } - public function SetChecksum($value) { $this->checksum=$value; } - public function GetChecksum() { return $this->checksum; } - public function SetProjekt($value) { $this->projekt=$value; } - public function GetProjekt() { return $this->projekt; } - public function SetInaktiv($value) { $this->inaktiv=$value; } - public function GetInaktiv() { return $this->inaktiv; } - public function SetAusverkauft($value) { $this->ausverkauft=$value; } - public function GetAusverkauft() { return $this->ausverkauft; } - public function SetWarengruppe($value) { $this->warengruppe=$value; } - public function GetWarengruppe() { return $this->warengruppe; } - public function SetName_De($value) { $this->name_de=$value; } - public function GetName_De() { return $this->name_de; } - public function SetName_En($value) { $this->name_en=$value; } - public function GetName_En() { return $this->name_en; } - public function SetKurztext_De($value) { $this->kurztext_de=$value; } - public function GetKurztext_De() { return $this->kurztext_de; } - public function SetKurztext_En($value) { $this->kurztext_en=$value; } - public function GetKurztext_En() { return $this->kurztext_en; } - public function SetBeschreibung_De($value) { $this->beschreibung_de=$value; } - public function GetBeschreibung_De() { return $this->beschreibung_de; } - public function SetBeschreibung_En($value) { $this->beschreibung_en=$value; } - public function GetBeschreibung_En() { return $this->beschreibung_en; } - public function SetUebersicht_De($value) { $this->uebersicht_de=$value; } - public function GetUebersicht_De() { return $this->uebersicht_de; } - public function SetUebersicht_En($value) { $this->uebersicht_en=$value; } - public function GetUebersicht_En() { return $this->uebersicht_en; } - public function SetLinks_De($value) { $this->links_de=$value; } - public function GetLinks_De() { return $this->links_de; } - public function SetLinks_En($value) { $this->links_en=$value; } - public function GetLinks_En() { return $this->links_en; } - public function SetStartseite_De($value) { $this->startseite_de=$value; } - public function GetStartseite_De() { return $this->startseite_de; } - public function SetStartseite_En($value) { $this->startseite_en=$value; } - public function GetStartseite_En() { return $this->startseite_en; } - public function SetStandardbild($value) { $this->standardbild=$value; } - public function GetStandardbild() { return $this->standardbild; } - public function SetHerstellerlink($value) { $this->herstellerlink=$value; } - public function GetHerstellerlink() { return $this->herstellerlink; } - public function SetHersteller($value) { $this->hersteller=$value; } - public function GetHersteller() { return $this->hersteller; } - public function SetTeilbar($value) { $this->teilbar=$value; } - public function GetTeilbar() { return $this->teilbar; } - public function SetNteile($value) { $this->nteile=$value; } - public function GetNteile() { return $this->nteile; } - public function SetSeriennummern($value) { $this->seriennummern=$value; } - public function GetSeriennummern() { return $this->seriennummern; } - public function SetLager_Platz($value) { $this->lager_platz=$value; } - public function GetLager_Platz() { return $this->lager_platz; } - public function SetLieferzeit($value) { $this->lieferzeit=$value; } - public function GetLieferzeit() { return $this->lieferzeit; } - public function SetLieferzeitmanuell($value) { $this->lieferzeitmanuell=$value; } - public function GetLieferzeitmanuell() { return $this->lieferzeitmanuell; } - public function SetSonstiges($value) { $this->sonstiges=$value; } - public function GetSonstiges() { return $this->sonstiges; } - public function SetGewicht($value) { $this->gewicht=$value; } - public function GetGewicht() { return $this->gewicht; } - public function SetEndmontage($value) { $this->endmontage=$value; } - public function GetEndmontage() { return $this->endmontage; } - public function SetFunktionstest($value) { $this->funktionstest=$value; } - public function GetFunktionstest() { return $this->funktionstest; } - public function SetArtikelcheckliste($value) { $this->artikelcheckliste=$value; } - public function GetArtikelcheckliste() { return $this->artikelcheckliste; } - public function SetStueckliste($value) { $this->stueckliste=$value; } - public function GetStueckliste() { return $this->stueckliste; } - public function SetJuststueckliste($value) { $this->juststueckliste=$value; } - public function GetJuststueckliste() { return $this->juststueckliste; } - public function SetBarcode($value) { $this->barcode=$value; } - public function GetBarcode() { return $this->barcode; } - public function SetHinzugefuegt($value) { $this->hinzugefuegt=$value; } - public function GetHinzugefuegt() { return $this->hinzugefuegt; } - public function SetPcbdecal($value) { $this->pcbdecal=$value; } - public function GetPcbdecal() { return $this->pcbdecal; } - public function SetLagerartikel($value) { $this->lagerartikel=$value; } - public function GetLagerartikel() { return $this->lagerartikel; } - public function SetPorto($value) { $this->porto=$value; } - public function GetPorto() { return $this->porto; } - public function SetChargenverwaltung($value) { $this->chargenverwaltung=$value; } - public function GetChargenverwaltung() { return $this->chargenverwaltung; } - public function SetProvisionsartikel($value) { $this->provisionsartikel=$value; } - public function GetProvisionsartikel() { return $this->provisionsartikel; } - public function SetGesperrt($value) { $this->gesperrt=$value; } - public function GetGesperrt() { return $this->gesperrt; } - public function SetSperrgrund($value) { $this->sperrgrund=$value; } - public function GetSperrgrund() { return $this->sperrgrund; } - public function SetGeloescht($value) { $this->geloescht=$value; } - public function GetGeloescht() { return $this->geloescht; } - public function SetGueltigbis($value) { $this->gueltigbis=$value; } - public function GetGueltigbis() { return $this->gueltigbis; } - public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; } - public function GetUmsatzsteuer() { return $this->umsatzsteuer; } - public function SetKlasse($value) { $this->klasse=$value; } - public function GetKlasse() { return $this->klasse; } - public function SetAdresse($value) { $this->adresse=$value; } - public function GetAdresse() { return $this->adresse; } - public function SetShopartikel($value) { $this->shopartikel=$value; } - public function GetShopartikel() { return $this->shopartikel; } - public function SetUnishopartikel($value) { $this->unishopartikel=$value; } - public function GetUnishopartikel() { return $this->unishopartikel; } - public function SetJournalshopartikel($value) { $this->journalshopartikel=$value; } - public function GetJournalshopartikel() { return $this->journalshopartikel; } - public function SetShop($value) { $this->shop=$value; } - public function GetShop() { return $this->shop; } - public function SetKatalog($value) { $this->katalog=$value; } - public function GetKatalog() { return $this->katalog; } - public function SetKatalogtext_De($value) { $this->katalogtext_de=$value; } - public function GetKatalogtext_De() { return $this->katalogtext_de; } - public function SetKatalogtext_En($value) { $this->katalogtext_en=$value; } - public function GetKatalogtext_En() { return $this->katalogtext_en; } - public function SetKatalogbezeichnung_De($value) { $this->katalogbezeichnung_de=$value; } - public function GetKatalogbezeichnung_De() { return $this->katalogbezeichnung_de; } - public function SetKatalogbezeichnung_En($value) { $this->katalogbezeichnung_en=$value; } - public function GetKatalogbezeichnung_En() { return $this->katalogbezeichnung_en; } - public function SetNeu($value) { $this->neu=$value; } - public function GetNeu() { return $this->neu; } - public function SetTopseller($value) { $this->topseller=$value; } - public function GetTopseller() { return $this->topseller; } - public function SetStartseite($value) { $this->startseite=$value; } - public function GetStartseite() { return $this->startseite; } - public function SetWichtig($value) { $this->wichtig=$value; } - public function GetWichtig() { return $this->wichtig; } - public function SetMindestlager($value) { $this->mindestlager=$value; } - public function GetMindestlager() { return $this->mindestlager; } - public function SetMindestbestellung($value) { $this->mindestbestellung=$value; } - public function GetMindestbestellung() { return $this->mindestbestellung; } - public function SetPartnerprogramm_Sperre($value) { $this->partnerprogramm_sperre=$value; } - public function GetPartnerprogramm_Sperre() { return $this->partnerprogramm_sperre; } - public function SetInternerkommentar($value) { $this->internerkommentar=$value; } - public function GetInternerkommentar() { return $this->internerkommentar; } - public function SetIntern_Gesperrt($value) { $this->intern_gesperrt=$value; } - public function GetIntern_Gesperrt() { return $this->intern_gesperrt; } - public function SetIntern_Gesperrtuser($value) { $this->intern_gesperrtuser=$value; } - public function GetIntern_Gesperrtuser() { return $this->intern_gesperrtuser; } - public function SetIntern_Gesperrtgrund($value) { $this->intern_gesperrtgrund=$value; } - public function GetIntern_Gesperrtgrund() { return $this->intern_gesperrtgrund; } - public function SetInbearbeitung($value) { $this->inbearbeitung=$value; } - public function GetInbearbeitung() { return $this->inbearbeitung; } - public function SetInbearbeitunguser($value) { $this->inbearbeitunguser=$value; } - public function GetInbearbeitunguser() { return $this->inbearbeitunguser; } - public function SetCache_Lagerplatzinhaltmenge($value) { $this->cache_lagerplatzinhaltmenge=$value; } - public function GetCache_Lagerplatzinhaltmenge() { return $this->cache_lagerplatzinhaltmenge; } - public function SetInternkommentar($value) { $this->internkommentar=$value; } - public function GetInternkommentar() { return $this->internkommentar; } - public function SetFirma($value) { $this->firma=$value; } - public function GetFirma() { return $this->firma; } - public function SetLogdatei($value) { $this->logdatei=$value; } - public function GetLogdatei() { return $this->logdatei; } - public function SetAnabregs_Text($value) { $this->anabregs_text=$value; } - public function GetAnabregs_Text() { return $this->anabregs_text; } - public function SetAutobestellung($value) { $this->autobestellung=$value; } - public function GetAutobestellung() { return $this->autobestellung; } - public function SetProduktion($value) { $this->produktion=$value; } - public function GetProduktion() { return $this->produktion; } - public function SetHerstellernummer($value) { $this->herstellernummer=$value; } - public function GetHerstellernummer() { return $this->herstellernummer; } - public function SetRestmenge($value) { $this->restmenge=$value; } - public function GetRestmenge() { return $this->restmenge; } - public function SetMlmdirektpraemie($value) { $this->mlmdirektpraemie=$value; } - public function GetMlmdirektpraemie() { return $this->mlmdirektpraemie; } - public function SetKeineeinzelartikelanzeigen($value) { $this->keineeinzelartikelanzeigen=$value; } - public function GetKeineeinzelartikelanzeigen() { return $this->keineeinzelartikelanzeigen; } - public function SetMindesthaltbarkeitsdatum($value) { $this->mindesthaltbarkeitsdatum=$value; } - public function GetMindesthaltbarkeitsdatum() { return $this->mindesthaltbarkeitsdatum; } - public function SetLetzteseriennummer($value) { $this->letzteseriennummer=$value; } - public function GetLetzteseriennummer() { return $this->letzteseriennummer; } - public function SetIndividualartikel($value) { $this->individualartikel=$value; } - public function GetIndividualartikel() { return $this->individualartikel; } - public function SetKeinrabatterlaubt($value) { $this->keinrabatterlaubt=$value; } - public function GetKeinrabatterlaubt() { return $this->keinrabatterlaubt; } - public function SetRabatt($value) { $this->rabatt=$value; } - public function GetRabatt() { return $this->rabatt; } - public function SetRabatt_Prozent($value) { $this->rabatt_prozent=$value; } - public function GetRabatt_Prozent() { return $this->rabatt_prozent; } - public function SetGeraet($value) { $this->geraet=$value; } - public function GetGeraet() { return $this->geraet; } - public function SetServiceartikel($value) { $this->serviceartikel=$value; } - public function GetServiceartikel() { return $this->serviceartikel; } - public function SetAutoabgleicherlaubt($value) { $this->autoabgleicherlaubt=$value; } - public function GetAutoabgleicherlaubt() { return $this->autoabgleicherlaubt; } - public function SetPseudopreis($value) { $this->pseudopreis=$value; } - public function GetPseudopreis() { return $this->pseudopreis; } - public function SetFreigabenotwendig($value) { $this->freigabenotwendig=$value; } - public function GetFreigabenotwendig() { return $this->freigabenotwendig; } - public function SetFreigaberegel($value) { $this->freigaberegel=$value; } - public function GetFreigaberegel() { return $this->freigaberegel; } - public function SetNachbestellt($value) { $this->nachbestellt=$value; } - public function GetNachbestellt() { return $this->nachbestellt; } - public function SetEan($value) { $this->ean=$value; } - public function GetEan() { return $this->ean; } - public function SetMlmpunkte($value) { $this->mlmpunkte=$value; } - public function GetMlmpunkte() { return $this->mlmpunkte; } - public function SetMlmbonuspunkte($value) { $this->mlmbonuspunkte=$value; } - public function GetMlmbonuspunkte() { return $this->mlmbonuspunkte; } - public function SetMlmkeinepunkteeigenkauf($value) { $this->mlmkeinepunkteeigenkauf=$value; } - public function GetMlmkeinepunkteeigenkauf() { return $this->mlmkeinepunkteeigenkauf; } - public function SetShop2($value) { $this->shop2=$value; } - public function GetShop2() { return $this->shop2; } - public function SetShop3($value) { $this->shop3=$value; } - public function GetShop3() { return $this->shop3; } - public function SetUsereditid($value) { $this->usereditid=$value; } - public function GetUsereditid() { return $this->usereditid; } - public function SetUseredittimestamp($value) { $this->useredittimestamp=$value; } - public function GetUseredittimestamp() { return $this->useredittimestamp; } - public function SetFreifeld1($value) { $this->freifeld1=$value; } - public function GetFreifeld1() { return $this->freifeld1; } - public function SetFreifeld2($value) { $this->freifeld2=$value; } - public function GetFreifeld2() { return $this->freifeld2; } - public function SetFreifeld3($value) { $this->freifeld3=$value; } - public function GetFreifeld3() { return $this->freifeld3; } - public function SetFreifeld4($value) { $this->freifeld4=$value; } - public function GetFreifeld4() { return $this->freifeld4; } - public function SetFreifeld5($value) { $this->freifeld5=$value; } - public function GetFreifeld5() { return $this->freifeld5; } - public function SetFreifeld6($value) { $this->freifeld6=$value; } - public function GetFreifeld6() { return $this->freifeld6; } - public function SetEinheit($value) { $this->einheit=$value; } - public function GetEinheit() { return $this->einheit; } - public function SetWebid($value) { $this->webid=$value; } - public function GetWebid() { return $this->webid; } - public function SetLieferzeitmanuell_En($value) { $this->lieferzeitmanuell_en=$value; } - public function GetLieferzeitmanuell_En() { return $this->lieferzeitmanuell_en; } - public function SetVariante($value) { $this->variante=$value; } - public function GetVariante() { return $this->variante; } - public function SetVariante_Von($value) { $this->variante_von=$value; } - public function GetVariante_Von() { return $this->variante_von; } - public function SetProduktioninfo($value) { $this->produktioninfo=$value; } - public function GetProduktioninfo() { return $this->produktioninfo; } - public function SetSonderaktion($value) { $this->sonderaktion=$value; } - public function GetSonderaktion() { return $this->sonderaktion; } - public function SetSonderaktion_En($value) { $this->sonderaktion_en=$value; } - public function GetSonderaktion_En() { return $this->sonderaktion_en; } - public function SetAutolagerlampe($value) { $this->autolagerlampe=$value; } - public function GetAutolagerlampe() { return $this->autolagerlampe; } - public function SetLeerfeld($value) { $this->leerfeld=$value; } - public function GetLeerfeld() { return $this->leerfeld; } - public function SetZolltarifnummer($value) { $this->zolltarifnummer=$value; } - public function GetZolltarifnummer() { return $this->zolltarifnummer; } - public function SetHerkunftsland($value) { $this->herkunftsland=$value; } - public function GetHerkunftsland() { return $this->herkunftsland; } - public function SetLaenge($value) { $this->laenge=$value; } - public function GetLaenge() { return $this->laenge; } - public function SetBreite($value) { $this->breite=$value; } - public function GetBreite() { return $this->breite; } - public function SetHoehe($value) { $this->hoehe=$value; } - public function GetHoehe() { return $this->hoehe; } - public function SetGebuehr($value) { $this->gebuehr=$value; } - public function GetGebuehr() { return $this->gebuehr; } - public function SetPseudolager($value) { $this->pseudolager=$value; } - public function GetPseudolager() { return $this->pseudolager; } - public function SetDownloadartikel($value) { $this->downloadartikel=$value; } - public function GetDownloadartikel() { return $this->downloadartikel; } - public function SetMatrixprodukt($value) { $this->matrixprodukt=$value; } - public function GetMatrixprodukt() { return $this->matrixprodukt; } - public function SetSteuer_Erloese_Inland_Normal($value) { $this->steuer_erloese_inland_normal=$value; } - public function GetSteuer_Erloese_Inland_Normal() { return $this->steuer_erloese_inland_normal; } - public function SetSteuer_Aufwendung_Inland_Normal($value) { $this->steuer_aufwendung_inland_normal=$value; } - public function GetSteuer_Aufwendung_Inland_Normal() { return $this->steuer_aufwendung_inland_normal; } - public function SetSteuer_Erloese_Inland_Ermaessigt($value) { $this->steuer_erloese_inland_ermaessigt=$value; } - public function GetSteuer_Erloese_Inland_Ermaessigt() { return $this->steuer_erloese_inland_ermaessigt; } - public function SetSteuer_Aufwendung_Inland_Ermaessigt($value) { $this->steuer_aufwendung_inland_ermaessigt=$value; } - public function GetSteuer_Aufwendung_Inland_Ermaessigt() { return $this->steuer_aufwendung_inland_ermaessigt; } - public function SetSteuer_Erloese_Inland_Steuerfrei($value) { $this->steuer_erloese_inland_steuerfrei=$value; } - public function GetSteuer_Erloese_Inland_Steuerfrei() { return $this->steuer_erloese_inland_steuerfrei; } - public function SetSteuer_Aufwendung_Inland_Steuerfrei($value) { $this->steuer_aufwendung_inland_steuerfrei=$value; } - public function GetSteuer_Aufwendung_Inland_Steuerfrei() { return $this->steuer_aufwendung_inland_steuerfrei; } - public function SetSteuer_Erloese_Inland_Innergemeinschaftlich($value) { $this->steuer_erloese_inland_innergemeinschaftlich=$value; } - public function GetSteuer_Erloese_Inland_Innergemeinschaftlich() { return $this->steuer_erloese_inland_innergemeinschaftlich; } - public function SetSteuer_Aufwendung_Inland_Innergemeinschaftlich($value) { $this->steuer_aufwendung_inland_innergemeinschaftlich=$value; } - public function GetSteuer_Aufwendung_Inland_Innergemeinschaftlich() { return $this->steuer_aufwendung_inland_innergemeinschaftlich; } - public function SetSteuer_Erloese_Inland_Eunormal($value) { $this->steuer_erloese_inland_eunormal=$value; } - public function GetSteuer_Erloese_Inland_Eunormal() { return $this->steuer_erloese_inland_eunormal; } - public function SetSteuer_Erloese_Inland_Nichtsteuerbar($value) { $this->steuer_erloese_inland_nichtsteuerbar=$value; } - public function GetSteuer_Erloese_Inland_Nichtsteuerbar() { return $this->steuer_erloese_inland_nichtsteuerbar; } - public function SetSteuer_Erloese_Inland_Euermaessigt($value) { $this->steuer_erloese_inland_euermaessigt=$value; } - public function GetSteuer_Erloese_Inland_Euermaessigt() { return $this->steuer_erloese_inland_euermaessigt; } - public function SetSteuer_Aufwendung_Inland_Nichtsteuerbar($value) { $this->steuer_aufwendung_inland_nichtsteuerbar=$value; } - public function GetSteuer_Aufwendung_Inland_Nichtsteuerbar() { return $this->steuer_aufwendung_inland_nichtsteuerbar; } - public function SetSteuer_Aufwendung_Inland_Eunormal($value) { $this->steuer_aufwendung_inland_eunormal=$value; } - public function GetSteuer_Aufwendung_Inland_Eunormal() { return $this->steuer_aufwendung_inland_eunormal; } - public function SetSteuer_Aufwendung_Inland_Euermaessigt($value) { $this->steuer_aufwendung_inland_euermaessigt=$value; } - public function GetSteuer_Aufwendung_Inland_Euermaessigt() { return $this->steuer_aufwendung_inland_euermaessigt; } - public function SetSteuer_Erloese_Inland_Export($value) { $this->steuer_erloese_inland_export=$value; } - public function GetSteuer_Erloese_Inland_Export() { return $this->steuer_erloese_inland_export; } - public function SetSteuer_Aufwendung_Inland_Import($value) { $this->steuer_aufwendung_inland_import=$value; } - public function GetSteuer_Aufwendung_Inland_Import() { return $this->steuer_aufwendung_inland_import; } - public function SetSteuer_Art_Produkt($value) { $this->steuer_art_produkt=$value; } - public function GetSteuer_Art_Produkt() { return $this->steuer_art_produkt; } - public function SetSteuer_Art_Produkt_Download($value) { $this->steuer_art_produkt_download=$value; } - public function GetSteuer_Art_Produkt_Download() { return $this->steuer_art_produkt_download; } - public function SetMetadescription_De($value) { $this->metadescription_de=$value; } - public function GetMetadescription_De() { return $this->metadescription_de; } - public function SetMetadescription_En($value) { $this->metadescription_en=$value; } - public function GetMetadescription_En() { return $this->metadescription_en; } - public function SetMetakeywords_De($value) { $this->metakeywords_de=$value; } - public function GetMetakeywords_De() { return $this->metakeywords_de; } - public function SetMetakeywords_En($value) { $this->metakeywords_en=$value; } - public function GetMetakeywords_En() { return $this->metakeywords_en; } - public function SetAnabregs_Text_En($value) { $this->anabregs_text_en=$value; } - public function GetAnabregs_Text_En() { return $this->anabregs_text_en; } - public function SetExterneproduktion($value) { $this->externeproduktion=$value; } - public function GetExterneproduktion() { return $this->externeproduktion; } - public function SetBildvorschau($value) { $this->bildvorschau=$value; } - public function GetBildvorschau() { return $this->bildvorschau; } - public function SetInventursperre($value) { $this->inventursperre=$value; } - public function GetInventursperre() { return $this->inventursperre; } - public function SetVariante_Kopie($value) { $this->variante_kopie=$value; } - public function GetVariante_Kopie() { return $this->variante_kopie; } - public function SetUnikat($value) { $this->unikat=$value; } - public function GetUnikat() { return $this->unikat; } - public function SetGenerierenummerbeioption($value) { $this->generierenummerbeioption=$value; } - public function GetGenerierenummerbeioption() { return $this->generierenummerbeioption; } - public function SetAllelieferanten($value) { $this->allelieferanten=$value; } - public function GetAllelieferanten() { return $this->allelieferanten; } - public function SetTagespreise($value) { $this->tagespreise=$value; } - public function GetTagespreise() { return $this->tagespreise; } - public function SetRohstoffe($value) { $this->rohstoffe=$value; } - public function GetRohstoffe() { return $this->rohstoffe; } - public function SetXvp($value) { $this->xvp=$value; } - public function GetXvp() { return $this->xvp; } - public function SetOhnepreisimpdf($value) { $this->ohnepreisimpdf=$value; } - public function GetOhnepreisimpdf() { return $this->ohnepreisimpdf; } - public function SetProvisionssperre($value) { $this->provisionssperre=$value; } - public function GetProvisionssperre() { return $this->provisionssperre; } - public function SetDienstleistung($value) { $this->dienstleistung=$value; } - public function GetDienstleistung() { return $this->dienstleistung; } - public function SetInventurekaktiv($value) { $this->inventurekaktiv=$value; } - public function GetInventurekaktiv() { return $this->inventurekaktiv; } - public function SetInventurek($value) { $this->inventurek=$value; } - public function GetInventurek() { return $this->inventurek; } - public function SetHinweis_Einfuegen($value) { $this->hinweis_einfuegen=$value; } - public function GetHinweis_Einfuegen() { return $this->hinweis_einfuegen; } - public function SetEtikettautodruck($value) { $this->etikettautodruck=$value; } - public function GetEtikettautodruck() { return $this->etikettautodruck; } - public function SetLagerkorrekturwert($value) { $this->lagerkorrekturwert=$value; } - public function GetLagerkorrekturwert() { return $this->lagerkorrekturwert; } - public function SetAutodrucketikett($value) { $this->autodrucketikett=$value; } - public function GetAutodrucketikett() { return $this->autodrucketikett; } - public function SetAbckategorie($value) { $this->abckategorie=$value; } - public function GetAbckategorie() { return $this->abckategorie; } - public function SetLaststorage_Changed($value) { $this->laststorage_changed=$value; } - public function GetLaststorage_Changed() { return $this->laststorage_changed; } - public function SetLaststorage_Sync($value) { $this->laststorage_sync=$value; } - public function GetLaststorage_Sync() { return $this->laststorage_sync; } - public function SetSteuersatz($value) { $this->steuersatz=$value; } - public function GetSteuersatz() { return $this->steuersatz; } - public function SetSteuertext_Innergemeinschaftlich($value) { $this->steuertext_innergemeinschaftlich=$value; } - public function GetSteuertext_Innergemeinschaftlich() { return $this->steuertext_innergemeinschaftlich; } - public function SetSteuertext_Export($value) { $this->steuertext_export=$value; } - public function GetSteuertext_Export() { return $this->steuertext_export; } - public function SetFormelmenge($value) { $this->formelmenge=$value; } - public function GetFormelmenge() { return $this->formelmenge; } - public function SetFormelpreis($value) { $this->formelpreis=$value; } - public function GetFormelpreis() { return $this->formelpreis; } - public function SetFreifeld7($value) { $this->freifeld7=$value; } - public function GetFreifeld7() { return $this->freifeld7; } - public function SetFreifeld8($value) { $this->freifeld8=$value; } - public function GetFreifeld8() { return $this->freifeld8; } - public function SetFreifeld9($value) { $this->freifeld9=$value; } - public function GetFreifeld9() { return $this->freifeld9; } - public function SetFreifeld10($value) { $this->freifeld10=$value; } - public function GetFreifeld10() { return $this->freifeld10; } - public function SetFreifeld11($value) { $this->freifeld11=$value; } - public function GetFreifeld11() { return $this->freifeld11; } - public function SetFreifeld12($value) { $this->freifeld12=$value; } - public function GetFreifeld12() { return $this->freifeld12; } - public function SetFreifeld13($value) { $this->freifeld13=$value; } - public function GetFreifeld13() { return $this->freifeld13; } - public function SetFreifeld14($value) { $this->freifeld14=$value; } - public function GetFreifeld14() { return $this->freifeld14; } - public function SetFreifeld15($value) { $this->freifeld15=$value; } - public function GetFreifeld15() { return $this->freifeld15; } - public function SetFreifeld16($value) { $this->freifeld16=$value; } - public function GetFreifeld16() { return $this->freifeld16; } - public function SetFreifeld17($value) { $this->freifeld17=$value; } - public function GetFreifeld17() { return $this->freifeld17; } - public function SetFreifeld18($value) { $this->freifeld18=$value; } - public function GetFreifeld18() { return $this->freifeld18; } - public function SetFreifeld19($value) { $this->freifeld19=$value; } - public function GetFreifeld19() { return $this->freifeld19; } - public function SetFreifeld20($value) { $this->freifeld20=$value; } - public function GetFreifeld20() { return $this->freifeld20; } - public function SetFreifeld21($value) { $this->freifeld21=$value; } - public function GetFreifeld21() { return $this->freifeld21; } - public function SetFreifeld22($value) { $this->freifeld22=$value; } - public function GetFreifeld22() { return $this->freifeld22; } - public function SetFreifeld23($value) { $this->freifeld23=$value; } - public function GetFreifeld23() { return $this->freifeld23; } - public function SetFreifeld24($value) { $this->freifeld24=$value; } - public function GetFreifeld24() { return $this->freifeld24; } - public function SetFreifeld25($value) { $this->freifeld25=$value; } - public function GetFreifeld25() { return $this->freifeld25; } - public function SetFreifeld26($value) { $this->freifeld26=$value; } - public function GetFreifeld26() { return $this->freifeld26; } - public function SetFreifeld27($value) { $this->freifeld27=$value; } - public function GetFreifeld27() { return $this->freifeld27; } - public function SetFreifeld28($value) { $this->freifeld28=$value; } - public function GetFreifeld28() { return $this->freifeld28; } - public function SetFreifeld29($value) { $this->freifeld29=$value; } - public function GetFreifeld29() { return $this->freifeld29; } - public function SetFreifeld30($value) { $this->freifeld30=$value; } - public function GetFreifeld30() { return $this->freifeld30; } - public function SetFreifeld31($value) { $this->freifeld31=$value; } - public function GetFreifeld31() { return $this->freifeld31; } - public function SetFreifeld32($value) { $this->freifeld32=$value; } - public function GetFreifeld32() { return $this->freifeld32; } - public function SetFreifeld33($value) { $this->freifeld33=$value; } - public function GetFreifeld33() { return $this->freifeld33; } - public function SetFreifeld34($value) { $this->freifeld34=$value; } - public function GetFreifeld34() { return $this->freifeld34; } - public function SetFreifeld35($value) { $this->freifeld35=$value; } - public function GetFreifeld35() { return $this->freifeld35; } - public function SetFreifeld36($value) { $this->freifeld36=$value; } - public function GetFreifeld36() { return $this->freifeld36; } - public function SetFreifeld37($value) { $this->freifeld37=$value; } - public function GetFreifeld37() { return $this->freifeld37; } - public function SetFreifeld38($value) { $this->freifeld38=$value; } - public function GetFreifeld38() { return $this->freifeld38; } - public function SetFreifeld39($value) { $this->freifeld39=$value; } - public function GetFreifeld39() { return $this->freifeld39; } - public function SetFreifeld40($value) { $this->freifeld40=$value; } - public function GetFreifeld40() { return $this->freifeld40; } - public function SetUrsprungsregion($value) { $this->ursprungsregion=$value; } - public function GetUrsprungsregion() { return $this->ursprungsregion; } - public function SetBestandalternativartikel($value) { $this->bestandalternativartikel=$value; } - public function GetBestandalternativartikel() { return $this->bestandalternativartikel; } - public function SetMetatitle_De($value) { $this->metatitle_de=$value; } - public function GetMetatitle_De() { return $this->metatitle_de; } - public function SetMetatitle_En($value) { $this->metatitle_en=$value; } - public function GetMetatitle_En() { return $this->metatitle_en; } - public function SetVkmeldungunterdruecken($value) { $this->vkmeldungunterdruecken=$value; } - public function GetVkmeldungunterdruecken() { return $this->vkmeldungunterdruecken; } - public function SetAltersfreigabe($value) { $this->altersfreigabe=$value; } - public function GetAltersfreigabe() { return $this->altersfreigabe; } - public function SetUnikatbeikopie($value) { $this->unikatbeikopie=$value; } - public function GetUnikatbeikopie() { return $this->unikatbeikopie; } - public function SetSteuergruppe($value) { $this->steuergruppe=$value; } - public function GetSteuergruppe() { return $this->steuergruppe; } - public function SetKostenstelle($value) { $this->kostenstelle=$value; } - public function GetKostenstelle() { return $this->kostenstelle; } - public function SetArtikelautokalkulation($value) { $this->artikelautokalkulation=$value; } - public function GetArtikelautokalkulation() { return $this->artikelautokalkulation; } - public function SetArtikelabschliessenkalkulation($value) { $this->artikelabschliessenkalkulation=$value; } - public function GetArtikelabschliessenkalkulation() { return $this->artikelabschliessenkalkulation; } - public function SetArtikelfifokalkulation($value) { $this->artikelfifokalkulation=$value; } - public function GetArtikelfifokalkulation() { return $this->artikelfifokalkulation; } - public function SetKeinskonto($value) { $this->keinskonto=$value; } - public function GetKeinskonto() { return $this->keinskonto; } - public function SetBerechneterek($value) { $this->berechneterek=$value; } - public function GetBerechneterek() { return $this->berechneterek; } - public function SetVerwendeberechneterek($value) { $this->verwendeberechneterek=$value; } - public function GetVerwendeberechneterek() { return $this->verwendeberechneterek; } - public function SetBerechneterekwaehrung($value) { $this->berechneterekwaehrung=$value; } - public function GetBerechneterekwaehrung() { return $this->berechneterekwaehrung; } - public function SetHas_Preproduced_Partlist($value) { $this->has_preproduced_partlist=$value; } - public function GetHas_Preproduced_Partlist() { return $this->has_preproduced_partlist; } - public function SetPreproduced_Partlist($value) { $this->preproduced_partlist=$value; } - public function GetPreproduced_Partlist() { return $this->preproduced_partlist; } - public function SetNettogewicht($value) { $this->nettogewicht=$value; } - public function GetNettogewicht() { return $this->nettogewicht; } - -} +app = $app; + } + + public function Select($id) + { + if(is_numeric($id)) + $result = $this->app->DB->SelectArr("SELECT * FROM `artikel` WHERE (`id` = '$id')"); + else + return -1; + +$result = $result[0]; + + $this->id=$result['id']; + $this->typ=$result['typ']; + $this->nummer=$result['nummer']; + $this->checksum=$result['checksum']; + $this->projekt=$result['projekt']; + $this->inaktiv=$result['inaktiv']; + $this->ausverkauft=$result['ausverkauft']; + $this->warengruppe=$result['warengruppe']; + $this->name_de=$result['name_de']; + $this->name_en=$result['name_en']; + $this->kurztext_de=$result['kurztext_de']; + $this->kurztext_en=$result['kurztext_en']; + $this->beschreibung_de=$result['beschreibung_de']; + $this->beschreibung_en=$result['beschreibung_en']; + $this->uebersicht_de=$result['uebersicht_de']; + $this->uebersicht_en=$result['uebersicht_en']; + $this->links_de=$result['links_de']; + $this->links_en=$result['links_en']; + $this->startseite_de=$result['startseite_de']; + $this->startseite_en=$result['startseite_en']; + $this->standardbild=$result['standardbild']; + $this->herstellerlink=$result['herstellerlink']; + $this->hersteller=$result['hersteller']; + $this->teilbar=$result['teilbar']; + $this->nteile=$result['nteile']; + $this->seriennummern=$result['seriennummern']; + $this->lager_platz=$result['lager_platz']; + $this->lieferzeit=$result['lieferzeit']; + $this->lieferzeitmanuell=$result['lieferzeitmanuell']; + $this->sonstiges=$result['sonstiges']; + $this->gewicht=$result['gewicht']; + $this->endmontage=$result['endmontage']; + $this->funktionstest=$result['funktionstest']; + $this->artikelcheckliste=$result['artikelcheckliste']; + $this->stueckliste=$result['stueckliste']; + $this->juststueckliste=$result['juststueckliste']; + $this->barcode=$result['barcode']; + $this->hinzugefuegt=$result['hinzugefuegt']; + $this->pcbdecal=$result['pcbdecal']; + $this->lagerartikel=$result['lagerartikel']; + $this->porto=$result['porto']; + $this->chargenverwaltung=$result['chargenverwaltung']; + $this->provisionsartikel=$result['provisionsartikel']; + $this->gesperrt=$result['gesperrt']; + $this->sperrgrund=$result['sperrgrund']; + $this->geloescht=$result['geloescht']; + $this->gueltigbis=$result['gueltigbis']; + $this->umsatzsteuer=$result['umsatzsteuer']; + $this->klasse=$result['klasse']; + $this->adresse=$result['adresse']; + $this->shopartikel=$result['shopartikel']; + $this->unishopartikel=$result['unishopartikel']; + $this->journalshopartikel=$result['journalshopartikel']; + $this->shop=$result['shop']; + $this->katalog=$result['katalog']; + $this->katalogtext_de=$result['katalogtext_de']; + $this->katalogtext_en=$result['katalogtext_en']; + $this->katalogbezeichnung_de=$result['katalogbezeichnung_de']; + $this->katalogbezeichnung_en=$result['katalogbezeichnung_en']; + $this->neu=$result['neu']; + $this->topseller=$result['topseller']; + $this->startseite=$result['startseite']; + $this->wichtig=$result['wichtig']; + $this->mindestlager=$result['mindestlager']; + $this->mindestbestellung=$result['mindestbestellung']; + $this->partnerprogramm_sperre=$result['partnerprogramm_sperre']; + $this->internerkommentar=$result['internerkommentar']; + $this->intern_gesperrt=$result['intern_gesperrt']; + $this->intern_gesperrtuser=$result['intern_gesperrtuser']; + $this->intern_gesperrtgrund=$result['intern_gesperrtgrund']; + $this->inbearbeitung=$result['inbearbeitung']; + $this->inbearbeitunguser=$result['inbearbeitunguser']; + $this->cache_lagerplatzinhaltmenge=$result['cache_lagerplatzinhaltmenge']; + $this->internkommentar=$result['internkommentar']; + $this->firma=$result['firma']; + $this->logdatei=$result['logdatei']; + $this->anabregs_text=$result['anabregs_text']; + $this->autobestellung=$result['autobestellung']; + $this->produktion=$result['produktion']; + $this->herstellernummer=$result['herstellernummer']; + $this->restmenge=$result['restmenge']; + $this->mlmdirektpraemie=$result['mlmdirektpraemie']; + $this->keineeinzelartikelanzeigen=$result['keineeinzelartikelanzeigen']; + $this->mindesthaltbarkeitsdatum=$result['mindesthaltbarkeitsdatum']; + $this->letzteseriennummer=$result['letzteseriennummer']; + $this->individualartikel=$result['individualartikel']; + $this->keinrabatterlaubt=$result['keinrabatterlaubt']; + $this->rabatt=$result['rabatt']; + $this->rabatt_prozent=$result['rabatt_prozent']; + $this->geraet=$result['geraet']; + $this->serviceartikel=$result['serviceartikel']; + $this->autoabgleicherlaubt=$result['autoabgleicherlaubt']; + $this->pseudopreis=$result['pseudopreis']; + $this->freigabenotwendig=$result['freigabenotwendig']; + $this->freigaberegel=$result['freigaberegel']; + $this->nachbestellt=$result['nachbestellt']; + $this->ean=$result['ean']; + $this->mlmpunkte=$result['mlmpunkte']; + $this->mlmbonuspunkte=$result['mlmbonuspunkte']; + $this->mlmkeinepunkteeigenkauf=$result['mlmkeinepunkteeigenkauf']; + $this->shop2=$result['shop2']; + $this->shop3=$result['shop3']; + $this->usereditid=$result['usereditid']; + $this->useredittimestamp=$result['useredittimestamp']; + $this->freifeld1=$result['freifeld1']; + $this->freifeld2=$result['freifeld2']; + $this->freifeld3=$result['freifeld3']; + $this->freifeld4=$result['freifeld4']; + $this->freifeld5=$result['freifeld5']; + $this->freifeld6=$result['freifeld6']; + $this->einheit=$result['einheit']; + $this->webid=$result['webid']; + $this->lieferzeitmanuell_en=$result['lieferzeitmanuell_en']; + $this->variante=$result['variante']; + $this->variante_von=$result['variante_von']; + $this->produktioninfo=$result['produktioninfo']; + $this->sonderaktion=$result['sonderaktion']; + $this->sonderaktion_en=$result['sonderaktion_en']; + $this->autolagerlampe=$result['autolagerlampe']; + $this->leerfeld=$result['leerfeld']; + $this->zolltarifnummer=$result['zolltarifnummer']; + $this->herkunftsland=$result['herkunftsland']; + $this->laenge=$result['laenge']; + $this->breite=$result['breite']; + $this->hoehe=$result['hoehe']; + $this->gebuehr=$result['gebuehr']; + $this->pseudolager=$result['pseudolager']; + $this->downloadartikel=$result['downloadartikel']; + $this->matrixprodukt=$result['matrixprodukt']; + $this->steuer_erloese_inland_normal=$result['steuer_erloese_inland_normal']; + $this->steuer_aufwendung_inland_normal=$result['steuer_aufwendung_inland_normal']; + $this->steuer_erloese_inland_ermaessigt=$result['steuer_erloese_inland_ermaessigt']; + $this->steuer_aufwendung_inland_ermaessigt=$result['steuer_aufwendung_inland_ermaessigt']; + $this->steuer_erloese_inland_steuerfrei=$result['steuer_erloese_inland_steuerfrei']; + $this->steuer_aufwendung_inland_steuerfrei=$result['steuer_aufwendung_inland_steuerfrei']; + $this->steuer_erloese_inland_innergemeinschaftlich=$result['steuer_erloese_inland_innergemeinschaftlich']; + $this->steuer_aufwendung_inland_innergemeinschaftlich=$result['steuer_aufwendung_inland_innergemeinschaftlich']; + $this->steuer_erloese_inland_eunormal=$result['steuer_erloese_inland_eunormal']; + $this->steuer_erloese_inland_nichtsteuerbar=$result['steuer_erloese_inland_nichtsteuerbar']; + $this->steuer_erloese_inland_euermaessigt=$result['steuer_erloese_inland_euermaessigt']; + $this->steuer_aufwendung_inland_nichtsteuerbar=$result['steuer_aufwendung_inland_nichtsteuerbar']; + $this->steuer_aufwendung_inland_eunormal=$result['steuer_aufwendung_inland_eunormal']; + $this->steuer_aufwendung_inland_euermaessigt=$result['steuer_aufwendung_inland_euermaessigt']; + $this->steuer_erloese_inland_export=$result['steuer_erloese_inland_export']; + $this->steuer_aufwendung_inland_import=$result['steuer_aufwendung_inland_import']; + $this->steuer_art_produkt=$result['steuer_art_produkt']; + $this->steuer_art_produkt_download=$result['steuer_art_produkt_download']; + $this->metadescription_de=$result['metadescription_de']; + $this->metadescription_en=$result['metadescription_en']; + $this->metakeywords_de=$result['metakeywords_de']; + $this->metakeywords_en=$result['metakeywords_en']; + $this->anabregs_text_en=$result['anabregs_text_en']; + $this->externeproduktion=$result['externeproduktion']; + $this->bildvorschau=$result['bildvorschau']; + $this->inventursperre=$result['inventursperre']; + $this->variante_kopie=$result['variante_kopie']; + $this->unikat=$result['unikat']; + $this->generierenummerbeioption=$result['generierenummerbeioption']; + $this->allelieferanten=$result['allelieferanten']; + $this->tagespreise=$result['tagespreise']; + $this->rohstoffe=$result['rohstoffe']; + $this->xvp=$result['xvp']; + $this->ohnepreisimpdf=$result['ohnepreisimpdf']; + $this->provisionssperre=$result['provisionssperre']; + $this->dienstleistung=$result['dienstleistung']; + $this->inventurekaktiv=$result['inventurekaktiv']; + $this->inventurek=$result['inventurek']; + $this->hinweis_einfuegen=$result['hinweis_einfuegen']; + $this->etikettautodruck=$result['etikettautodruck']; + $this->lagerkorrekturwert=$result['lagerkorrekturwert']; + $this->autodrucketikett=$result['autodrucketikett']; + $this->abckategorie=$result['abckategorie']; + $this->laststorage_changed=$result['laststorage_changed']; + $this->laststorage_sync=$result['laststorage_sync']; + $this->steuersatz=$result['steuersatz']; + $this->steuertext_innergemeinschaftlich=$result['steuertext_innergemeinschaftlich']; + $this->steuertext_export=$result['steuertext_export']; + $this->formelmenge=$result['formelmenge']; + $this->formelpreis=$result['formelpreis']; + $this->freifeld7=$result['freifeld7']; + $this->freifeld8=$result['freifeld8']; + $this->freifeld9=$result['freifeld9']; + $this->freifeld10=$result['freifeld10']; + $this->freifeld11=$result['freifeld11']; + $this->freifeld12=$result['freifeld12']; + $this->freifeld13=$result['freifeld13']; + $this->freifeld14=$result['freifeld14']; + $this->freifeld15=$result['freifeld15']; + $this->freifeld16=$result['freifeld16']; + $this->freifeld17=$result['freifeld17']; + $this->freifeld18=$result['freifeld18']; + $this->freifeld19=$result['freifeld19']; + $this->freifeld20=$result['freifeld20']; + $this->freifeld21=$result['freifeld21']; + $this->freifeld22=$result['freifeld22']; + $this->freifeld23=$result['freifeld23']; + $this->freifeld24=$result['freifeld24']; + $this->freifeld25=$result['freifeld25']; + $this->freifeld26=$result['freifeld26']; + $this->freifeld27=$result['freifeld27']; + $this->freifeld28=$result['freifeld28']; + $this->freifeld29=$result['freifeld29']; + $this->freifeld30=$result['freifeld30']; + $this->freifeld31=$result['freifeld31']; + $this->freifeld32=$result['freifeld32']; + $this->freifeld33=$result['freifeld33']; + $this->freifeld34=$result['freifeld34']; + $this->freifeld35=$result['freifeld35']; + $this->freifeld36=$result['freifeld36']; + $this->freifeld37=$result['freifeld37']; + $this->freifeld38=$result['freifeld38']; + $this->freifeld39=$result['freifeld39']; + $this->freifeld40=$result['freifeld40']; + $this->ursprungsregion=$result['ursprungsregion']; + $this->bestandalternativartikel=$result['bestandalternativartikel']; + $this->metatitle_de=$result['metatitle_de']; + $this->metatitle_en=$result['metatitle_en']; + $this->vkmeldungunterdruecken=$result['vkmeldungunterdruecken']; + $this->altersfreigabe=$result['altersfreigabe']; + $this->unikatbeikopie=$result['unikatbeikopie']; + $this->steuergruppe=$result['steuergruppe']; + $this->sachkonto=$result['sachkonto']; + $this->kostenstelle=$result['kostenstelle']; + $this->artikelautokalkulation=$result['artikelautokalkulation']; + $this->artikelabschliessenkalkulation=$result['artikelabschliessenkalkulation']; + $this->artikelfifokalkulation=$result['artikelfifokalkulation']; + $this->keinskonto=$result['keinskonto']; + $this->berechneterek=$result['berechneterek']; + $this->verwendeberechneterek=$result['verwendeberechneterek']; + $this->berechneterekwaehrung=$result['berechneterekwaehrung']; + $this->has_preproduced_partlist=$result['has_preproduced_partlist']; + $this->preproduced_partlist=$result['preproduced_partlist']; + $this->nettogewicht=$result['nettogewicht']; + } + + public function Create() + { + $sql = "INSERT INTO `artikel` (`id`,`typ`,`nummer`,`checksum`,`projekt`,`inaktiv`,`ausverkauft`,`warengruppe`,`name_de`,`name_en`,`kurztext_de`,`kurztext_en`,`beschreibung_de`,`beschreibung_en`,`uebersicht_de`,`uebersicht_en`,`links_de`,`links_en`,`startseite_de`,`startseite_en`,`standardbild`,`herstellerlink`,`hersteller`,`teilbar`,`nteile`,`seriennummern`,`lager_platz`,`lieferzeit`,`lieferzeitmanuell`,`sonstiges`,`gewicht`,`endmontage`,`funktionstest`,`artikelcheckliste`,`stueckliste`,`juststueckliste`,`barcode`,`hinzugefuegt`,`pcbdecal`,`lagerartikel`,`porto`,`chargenverwaltung`,`provisionsartikel`,`gesperrt`,`sperrgrund`,`geloescht`,`gueltigbis`,`umsatzsteuer`,`klasse`,`adresse`,`shopartikel`,`unishopartikel`,`journalshopartikel`,`shop`,`katalog`,`katalogtext_de`,`katalogtext_en`,`katalogbezeichnung_de`,`katalogbezeichnung_en`,`neu`,`topseller`,`startseite`,`wichtig`,`mindestlager`,`mindestbestellung`,`partnerprogramm_sperre`,`internerkommentar`,`intern_gesperrt`,`intern_gesperrtuser`,`intern_gesperrtgrund`,`inbearbeitung`,`inbearbeitunguser`,`cache_lagerplatzinhaltmenge`,`internkommentar`,`firma`,`logdatei`,`anabregs_text`,`autobestellung`,`produktion`,`herstellernummer`,`restmenge`,`mlmdirektpraemie`,`keineeinzelartikelanzeigen`,`mindesthaltbarkeitsdatum`,`letzteseriennummer`,`individualartikel`,`keinrabatterlaubt`,`rabatt`,`rabatt_prozent`,`geraet`,`serviceartikel`,`autoabgleicherlaubt`,`pseudopreis`,`freigabenotwendig`,`freigaberegel`,`nachbestellt`,`ean`,`mlmpunkte`,`mlmbonuspunkte`,`mlmkeinepunkteeigenkauf`,`shop2`,`shop3`,`usereditid`,`useredittimestamp`,`freifeld1`,`freifeld2`,`freifeld3`,`freifeld4`,`freifeld5`,`freifeld6`,`einheit`,`webid`,`lieferzeitmanuell_en`,`variante`,`variante_von`,`produktioninfo`,`sonderaktion`,`sonderaktion_en`,`autolagerlampe`,`leerfeld`,`zolltarifnummer`,`herkunftsland`,`laenge`,`breite`,`hoehe`,`gebuehr`,`pseudolager`,`downloadartikel`,`matrixprodukt`,`steuer_erloese_inland_normal`,`steuer_aufwendung_inland_normal`,`steuer_erloese_inland_ermaessigt`,`steuer_aufwendung_inland_ermaessigt`,`steuer_erloese_inland_steuerfrei`,`steuer_aufwendung_inland_steuerfrei`,`steuer_erloese_inland_innergemeinschaftlich`,`steuer_aufwendung_inland_innergemeinschaftlich`,`steuer_erloese_inland_eunormal`,`steuer_erloese_inland_nichtsteuerbar`,`steuer_erloese_inland_euermaessigt`,`steuer_aufwendung_inland_nichtsteuerbar`,`steuer_aufwendung_inland_eunormal`,`steuer_aufwendung_inland_euermaessigt`,`steuer_erloese_inland_export`,`steuer_aufwendung_inland_import`,`steuer_art_produkt`,`steuer_art_produkt_download`,`metadescription_de`,`metadescription_en`,`metakeywords_de`,`metakeywords_en`,`anabregs_text_en`,`externeproduktion`,`bildvorschau`,`inventursperre`,`variante_kopie`,`unikat`,`generierenummerbeioption`,`allelieferanten`,`tagespreise`,`rohstoffe`,`xvp`,`ohnepreisimpdf`,`provisionssperre`,`dienstleistung`,`inventurekaktiv`,`inventurek`,`hinweis_einfuegen`,`etikettautodruck`,`lagerkorrekturwert`,`autodrucketikett`,`abckategorie`,`laststorage_changed`,`laststorage_sync`,`steuersatz`,`steuertext_innergemeinschaftlich`,`steuertext_export`,`formelmenge`,`formelpreis`,`freifeld7`,`freifeld8`,`freifeld9`,`freifeld10`,`freifeld11`,`freifeld12`,`freifeld13`,`freifeld14`,`freifeld15`,`freifeld16`,`freifeld17`,`freifeld18`,`freifeld19`,`freifeld20`,`freifeld21`,`freifeld22`,`freifeld23`,`freifeld24`,`freifeld25`,`freifeld26`,`freifeld27`,`freifeld28`,`freifeld29`,`freifeld30`,`freifeld31`,`freifeld32`,`freifeld33`,`freifeld34`,`freifeld35`,`freifeld36`,`freifeld37`,`freifeld38`,`freifeld39`,`freifeld40`,`ursprungsregion`,`bestandalternativartikel`,`metatitle_de`,`metatitle_en`,`vkmeldungunterdruecken`,`altersfreigabe`,`unikatbeikopie`,`steuergruppe`,`sachkonto`,`kostenstelle`,`artikelautokalkulation`,`artikelabschliessenkalkulation`,`artikelfifokalkulation`,`keinskonto`,`berechneterek`,`verwendeberechneterek`,`berechneterekwaehrung`,`has_preproduced_partlist`,`preproduced_partlist`,`nettogewicht`) + VALUES(NULL,'{$this->typ}','{$this->nummer}','{$this->checksum}','{$this->projekt}','{$this->inaktiv}','{$this->ausverkauft}','{$this->warengruppe}','{$this->name_de}','{$this->name_en}','{$this->kurztext_de}','{$this->kurztext_en}','{$this->beschreibung_de}','{$this->beschreibung_en}','{$this->uebersicht_de}','{$this->uebersicht_en}','{$this->links_de}','{$this->links_en}','{$this->startseite_de}','{$this->startseite_en}','{$this->standardbild}','{$this->herstellerlink}','{$this->hersteller}','{$this->teilbar}','{$this->nteile}','{$this->seriennummern}','{$this->lager_platz}','{$this->lieferzeit}','{$this->lieferzeitmanuell}','{$this->sonstiges}','{$this->gewicht}','{$this->endmontage}','{$this->funktionstest}','{$this->artikelcheckliste}','{$this->stueckliste}','{$this->juststueckliste}','{$this->barcode}','{$this->hinzugefuegt}','{$this->pcbdecal}','{$this->lagerartikel}','{$this->porto}','{$this->chargenverwaltung}','{$this->provisionsartikel}','{$this->gesperrt}','{$this->sperrgrund}','{$this->geloescht}','{$this->gueltigbis}','{$this->umsatzsteuer}','{$this->klasse}','{$this->adresse}','{$this->shopartikel}','{$this->unishopartikel}','{$this->journalshopartikel}','{$this->shop}','{$this->katalog}','{$this->katalogtext_de}','{$this->katalogtext_en}','{$this->katalogbezeichnung_de}','{$this->katalogbezeichnung_en}','{$this->neu}','{$this->topseller}','{$this->startseite}','{$this->wichtig}','{$this->mindestlager}','{$this->mindestbestellung}','{$this->partnerprogramm_sperre}','{$this->internerkommentar}','{$this->intern_gesperrt}','{$this->intern_gesperrtuser}','{$this->intern_gesperrtgrund}','{$this->inbearbeitung}','{$this->inbearbeitunguser}','{$this->cache_lagerplatzinhaltmenge}','{$this->internkommentar}','{$this->firma}','{$this->logdatei}','{$this->anabregs_text}','{$this->autobestellung}','{$this->produktion}','{$this->herstellernummer}','{$this->restmenge}','{$this->mlmdirektpraemie}','{$this->keineeinzelartikelanzeigen}','{$this->mindesthaltbarkeitsdatum}','{$this->letzteseriennummer}','{$this->individualartikel}','{$this->keinrabatterlaubt}','{$this->rabatt}','{$this->rabatt_prozent}','{$this->geraet}','{$this->serviceartikel}','{$this->autoabgleicherlaubt}','{$this->pseudopreis}','{$this->freigabenotwendig}','{$this->freigaberegel}','{$this->nachbestellt}','{$this->ean}','{$this->mlmpunkte}','{$this->mlmbonuspunkte}','{$this->mlmkeinepunkteeigenkauf}','{$this->shop2}','{$this->shop3}','{$this->usereditid}','{$this->useredittimestamp}','{$this->freifeld1}','{$this->freifeld2}','{$this->freifeld3}','{$this->freifeld4}','{$this->freifeld5}','{$this->freifeld6}','{$this->einheit}','{$this->webid}','{$this->lieferzeitmanuell_en}','{$this->variante}','{$this->variante_von}','{$this->produktioninfo}','{$this->sonderaktion}','{$this->sonderaktion_en}','{$this->autolagerlampe}','{$this->leerfeld}','{$this->zolltarifnummer}','{$this->herkunftsland}','{$this->laenge}','{$this->breite}','{$this->hoehe}','{$this->gebuehr}','{$this->pseudolager}','{$this->downloadartikel}','{$this->matrixprodukt}','{$this->steuer_erloese_inland_normal}','{$this->steuer_aufwendung_inland_normal}','{$this->steuer_erloese_inland_ermaessigt}','{$this->steuer_aufwendung_inland_ermaessigt}','{$this->steuer_erloese_inland_steuerfrei}','{$this->steuer_aufwendung_inland_steuerfrei}','{$this->steuer_erloese_inland_innergemeinschaftlich}','{$this->steuer_aufwendung_inland_innergemeinschaftlich}','{$this->steuer_erloese_inland_eunormal}','{$this->steuer_erloese_inland_nichtsteuerbar}','{$this->steuer_erloese_inland_euermaessigt}','{$this->steuer_aufwendung_inland_nichtsteuerbar}','{$this->steuer_aufwendung_inland_eunormal}','{$this->steuer_aufwendung_inland_euermaessigt}','{$this->steuer_erloese_inland_export}','{$this->steuer_aufwendung_inland_import}','{$this->steuer_art_produkt}','{$this->steuer_art_produkt_download}','{$this->metadescription_de}','{$this->metadescription_en}','{$this->metakeywords_de}','{$this->metakeywords_en}','{$this->anabregs_text_en}','{$this->externeproduktion}','{$this->bildvorschau}','{$this->inventursperre}','{$this->variante_kopie}','{$this->unikat}','{$this->generierenummerbeioption}','{$this->allelieferanten}','{$this->tagespreise}','{$this->rohstoffe}','{$this->xvp}','{$this->ohnepreisimpdf}','{$this->provisionssperre}','{$this->dienstleistung}','{$this->inventurekaktiv}','{$this->inventurek}','{$this->hinweis_einfuegen}','{$this->etikettautodruck}','{$this->lagerkorrekturwert}','{$this->autodrucketikett}','{$this->abckategorie}','{$this->laststorage_changed}','{$this->laststorage_sync}','{$this->steuersatz}','{$this->steuertext_innergemeinschaftlich}','{$this->steuertext_export}','{$this->formelmenge}','{$this->formelpreis}','{$this->freifeld7}','{$this->freifeld8}','{$this->freifeld9}','{$this->freifeld10}','{$this->freifeld11}','{$this->freifeld12}','{$this->freifeld13}','{$this->freifeld14}','{$this->freifeld15}','{$this->freifeld16}','{$this->freifeld17}','{$this->freifeld18}','{$this->freifeld19}','{$this->freifeld20}','{$this->freifeld21}','{$this->freifeld22}','{$this->freifeld23}','{$this->freifeld24}','{$this->freifeld25}','{$this->freifeld26}','{$this->freifeld27}','{$this->freifeld28}','{$this->freifeld29}','{$this->freifeld30}','{$this->freifeld31}','{$this->freifeld32}','{$this->freifeld33}','{$this->freifeld34}','{$this->freifeld35}','{$this->freifeld36}','{$this->freifeld37}','{$this->freifeld38}','{$this->freifeld39}','{$this->freifeld40}','{$this->ursprungsregion}','{$this->bestandalternativartikel}','{$this->metatitle_de}','{$this->metatitle_en}','{$this->vkmeldungunterdruecken}','{$this->altersfreigabe}','{$this->unikatbeikopie}','{$this->steuergruppe}','{$this->sachkonto}','{$this->kostenstelle}','{$this->artikelautokalkulation}','{$this->artikelabschliessenkalkulation}','{$this->artikelfifokalkulation}','{$this->keinskonto}','{$this->berechneterek}','{$this->verwendeberechneterek}','{$this->berechneterekwaehrung}','{$this->has_preproduced_partlist}','{$this->preproduced_partlist}','{$this->nettogewicht}')"; + + $this->app->DB->Insert($sql); + $this->id = $this->app->DB->GetInsertID(); + } + + public function Update() + { + if(!is_numeric($this->id)) { + return -1; + } + + $sql = "UPDATE `artikel` SET + `typ`='{$this->typ}', + `nummer`='{$this->nummer}', + `checksum`='{$this->checksum}', + `projekt`='{$this->projekt}', + `inaktiv`='{$this->inaktiv}', + `ausverkauft`='{$this->ausverkauft}', + `warengruppe`='{$this->warengruppe}', + `name_de`='{$this->name_de}', + `name_en`='{$this->name_en}', + `kurztext_de`='{$this->kurztext_de}', + `kurztext_en`='{$this->kurztext_en}', + `beschreibung_de`='{$this->beschreibung_de}', + `beschreibung_en`='{$this->beschreibung_en}', + `uebersicht_de`='{$this->uebersicht_de}', + `uebersicht_en`='{$this->uebersicht_en}', + `links_de`='{$this->links_de}', + `links_en`='{$this->links_en}', + `startseite_de`='{$this->startseite_de}', + `startseite_en`='{$this->startseite_en}', + `standardbild`='{$this->standardbild}', + `herstellerlink`='{$this->herstellerlink}', + `hersteller`='{$this->hersteller}', + `teilbar`='{$this->teilbar}', + `nteile`='{$this->nteile}', + `seriennummern`='{$this->seriennummern}', + `lager_platz`='{$this->lager_platz}', + `lieferzeit`='{$this->lieferzeit}', + `lieferzeitmanuell`='{$this->lieferzeitmanuell}', + `sonstiges`='{$this->sonstiges}', + `gewicht`='{$this->gewicht}', + `endmontage`='{$this->endmontage}', + `funktionstest`='{$this->funktionstest}', + `artikelcheckliste`='{$this->artikelcheckliste}', + `stueckliste`='{$this->stueckliste}', + `juststueckliste`='{$this->juststueckliste}', + `barcode`='{$this->barcode}', + `hinzugefuegt`='{$this->hinzugefuegt}', + `pcbdecal`='{$this->pcbdecal}', + `lagerartikel`='{$this->lagerartikel}', + `porto`='{$this->porto}', + `chargenverwaltung`='{$this->chargenverwaltung}', + `provisionsartikel`='{$this->provisionsartikel}', + `gesperrt`='{$this->gesperrt}', + `sperrgrund`='{$this->sperrgrund}', + `geloescht`='{$this->geloescht}', + `gueltigbis`='{$this->gueltigbis}', + `umsatzsteuer`='{$this->umsatzsteuer}', + `klasse`='{$this->klasse}', + `adresse`='{$this->adresse}', + `shopartikel`='{$this->shopartikel}', + `unishopartikel`='{$this->unishopartikel}', + `journalshopartikel`='{$this->journalshopartikel}', + `shop`='{$this->shop}', + `katalog`='{$this->katalog}', + `katalogtext_de`='{$this->katalogtext_de}', + `katalogtext_en`='{$this->katalogtext_en}', + `katalogbezeichnung_de`='{$this->katalogbezeichnung_de}', + `katalogbezeichnung_en`='{$this->katalogbezeichnung_en}', + `neu`='{$this->neu}', + `topseller`='{$this->topseller}', + `startseite`='{$this->startseite}', + `wichtig`='{$this->wichtig}', + `mindestlager`='{$this->mindestlager}', + `mindestbestellung`='{$this->mindestbestellung}', + `partnerprogramm_sperre`='{$this->partnerprogramm_sperre}', + `internerkommentar`='{$this->internerkommentar}', + `intern_gesperrt`='{$this->intern_gesperrt}', + `intern_gesperrtuser`='{$this->intern_gesperrtuser}', + `intern_gesperrtgrund`='{$this->intern_gesperrtgrund}', + `inbearbeitung`='{$this->inbearbeitung}', + `inbearbeitunguser`='{$this->inbearbeitunguser}', + `cache_lagerplatzinhaltmenge`='{$this->cache_lagerplatzinhaltmenge}', + `internkommentar`='{$this->internkommentar}', + `firma`='{$this->firma}', + `logdatei`='{$this->logdatei}', + `anabregs_text`='{$this->anabregs_text}', + `autobestellung`='{$this->autobestellung}', + `produktion`='{$this->produktion}', + `herstellernummer`='{$this->herstellernummer}', + `restmenge`='{$this->restmenge}', + `mlmdirektpraemie`='{$this->mlmdirektpraemie}', + `keineeinzelartikelanzeigen`='{$this->keineeinzelartikelanzeigen}', + `mindesthaltbarkeitsdatum`='{$this->mindesthaltbarkeitsdatum}', + `letzteseriennummer`='{$this->letzteseriennummer}', + `individualartikel`='{$this->individualartikel}', + `keinrabatterlaubt`='{$this->keinrabatterlaubt}', + `rabatt`='{$this->rabatt}', + `rabatt_prozent`='{$this->rabatt_prozent}', + `geraet`='{$this->geraet}', + `serviceartikel`='{$this->serviceartikel}', + `autoabgleicherlaubt`='{$this->autoabgleicherlaubt}', + `pseudopreis`='{$this->pseudopreis}', + `freigabenotwendig`='{$this->freigabenotwendig}', + `freigaberegel`='{$this->freigaberegel}', + `nachbestellt`='{$this->nachbestellt}', + `ean`='{$this->ean}', + `mlmpunkte`='{$this->mlmpunkte}', + `mlmbonuspunkte`='{$this->mlmbonuspunkte}', + `mlmkeinepunkteeigenkauf`='{$this->mlmkeinepunkteeigenkauf}', + `shop2`='{$this->shop2}', + `shop3`='{$this->shop3}', + `usereditid`='{$this->usereditid}', + `useredittimestamp`='{$this->useredittimestamp}', + `freifeld1`='{$this->freifeld1}', + `freifeld2`='{$this->freifeld2}', + `freifeld3`='{$this->freifeld3}', + `freifeld4`='{$this->freifeld4}', + `freifeld5`='{$this->freifeld5}', + `freifeld6`='{$this->freifeld6}', + `einheit`='{$this->einheit}', + `webid`='{$this->webid}', + `lieferzeitmanuell_en`='{$this->lieferzeitmanuell_en}', + `variante`='{$this->variante}', + `variante_von`='{$this->variante_von}', + `produktioninfo`='{$this->produktioninfo}', + `sonderaktion`='{$this->sonderaktion}', + `sonderaktion_en`='{$this->sonderaktion_en}', + `autolagerlampe`='{$this->autolagerlampe}', + `leerfeld`='{$this->leerfeld}', + `zolltarifnummer`='{$this->zolltarifnummer}', + `herkunftsland`='{$this->herkunftsland}', + `laenge`='{$this->laenge}', + `breite`='{$this->breite}', + `hoehe`='{$this->hoehe}', + `gebuehr`='{$this->gebuehr}', + `pseudolager`='{$this->pseudolager}', + `downloadartikel`='{$this->downloadartikel}', + `matrixprodukt`='{$this->matrixprodukt}', + `steuer_erloese_inland_normal`='{$this->steuer_erloese_inland_normal}', + `steuer_aufwendung_inland_normal`='{$this->steuer_aufwendung_inland_normal}', + `steuer_erloese_inland_ermaessigt`='{$this->steuer_erloese_inland_ermaessigt}', + `steuer_aufwendung_inland_ermaessigt`='{$this->steuer_aufwendung_inland_ermaessigt}', + `steuer_erloese_inland_steuerfrei`='{$this->steuer_erloese_inland_steuerfrei}', + `steuer_aufwendung_inland_steuerfrei`='{$this->steuer_aufwendung_inland_steuerfrei}', + `steuer_erloese_inland_innergemeinschaftlich`='{$this->steuer_erloese_inland_innergemeinschaftlich}', + `steuer_aufwendung_inland_innergemeinschaftlich`='{$this->steuer_aufwendung_inland_innergemeinschaftlich}', + `steuer_erloese_inland_eunormal`='{$this->steuer_erloese_inland_eunormal}', + `steuer_erloese_inland_nichtsteuerbar`='{$this->steuer_erloese_inland_nichtsteuerbar}', + `steuer_erloese_inland_euermaessigt`='{$this->steuer_erloese_inland_euermaessigt}', + `steuer_aufwendung_inland_nichtsteuerbar`='{$this->steuer_aufwendung_inland_nichtsteuerbar}', + `steuer_aufwendung_inland_eunormal`='{$this->steuer_aufwendung_inland_eunormal}', + `steuer_aufwendung_inland_euermaessigt`='{$this->steuer_aufwendung_inland_euermaessigt}', + `steuer_erloese_inland_export`='{$this->steuer_erloese_inland_export}', + `steuer_aufwendung_inland_import`='{$this->steuer_aufwendung_inland_import}', + `steuer_art_produkt`='{$this->steuer_art_produkt}', + `steuer_art_produkt_download`='{$this->steuer_art_produkt_download}', + `metadescription_de`='{$this->metadescription_de}', + `metadescription_en`='{$this->metadescription_en}', + `metakeywords_de`='{$this->metakeywords_de}', + `metakeywords_en`='{$this->metakeywords_en}', + `anabregs_text_en`='{$this->anabregs_text_en}', + `externeproduktion`='{$this->externeproduktion}', + `bildvorschau`='{$this->bildvorschau}', + `inventursperre`='{$this->inventursperre}', + `variante_kopie`='{$this->variante_kopie}', + `unikat`='{$this->unikat}', + `generierenummerbeioption`='{$this->generierenummerbeioption}', + `allelieferanten`='{$this->allelieferanten}', + `tagespreise`='{$this->tagespreise}', + `rohstoffe`='{$this->rohstoffe}', + `xvp`='{$this->xvp}', + `ohnepreisimpdf`='{$this->ohnepreisimpdf}', + `provisionssperre`='{$this->provisionssperre}', + `dienstleistung`='{$this->dienstleistung}', + `inventurekaktiv`='{$this->inventurekaktiv}', + `inventurek`='{$this->inventurek}', + `hinweis_einfuegen`='{$this->hinweis_einfuegen}', + `etikettautodruck`='{$this->etikettautodruck}', + `lagerkorrekturwert`='{$this->lagerkorrekturwert}', + `autodrucketikett`='{$this->autodrucketikett}', + `abckategorie`='{$this->abckategorie}', + `laststorage_changed`='{$this->laststorage_changed}', + `laststorage_sync`='{$this->laststorage_sync}', + `steuersatz`='{$this->steuersatz}', + `steuertext_innergemeinschaftlich`='{$this->steuertext_innergemeinschaftlich}', + `steuertext_export`='{$this->steuertext_export}', + `formelmenge`='{$this->formelmenge}', + `formelpreis`='{$this->formelpreis}', + `freifeld7`='{$this->freifeld7}', + `freifeld8`='{$this->freifeld8}', + `freifeld9`='{$this->freifeld9}', + `freifeld10`='{$this->freifeld10}', + `freifeld11`='{$this->freifeld11}', + `freifeld12`='{$this->freifeld12}', + `freifeld13`='{$this->freifeld13}', + `freifeld14`='{$this->freifeld14}', + `freifeld15`='{$this->freifeld15}', + `freifeld16`='{$this->freifeld16}', + `freifeld17`='{$this->freifeld17}', + `freifeld18`='{$this->freifeld18}', + `freifeld19`='{$this->freifeld19}', + `freifeld20`='{$this->freifeld20}', + `freifeld21`='{$this->freifeld21}', + `freifeld22`='{$this->freifeld22}', + `freifeld23`='{$this->freifeld23}', + `freifeld24`='{$this->freifeld24}', + `freifeld25`='{$this->freifeld25}', + `freifeld26`='{$this->freifeld26}', + `freifeld27`='{$this->freifeld27}', + `freifeld28`='{$this->freifeld28}', + `freifeld29`='{$this->freifeld29}', + `freifeld30`='{$this->freifeld30}', + `freifeld31`='{$this->freifeld31}', + `freifeld32`='{$this->freifeld32}', + `freifeld33`='{$this->freifeld33}', + `freifeld34`='{$this->freifeld34}', + `freifeld35`='{$this->freifeld35}', + `freifeld36`='{$this->freifeld36}', + `freifeld37`='{$this->freifeld37}', + `freifeld38`='{$this->freifeld38}', + `freifeld39`='{$this->freifeld39}', + `freifeld40`='{$this->freifeld40}', + `ursprungsregion`='{$this->ursprungsregion}', + `bestandalternativartikel`='{$this->bestandalternativartikel}', + `metatitle_de`='{$this->metatitle_de}', + `metatitle_en`='{$this->metatitle_en}', + `vkmeldungunterdruecken`='{$this->vkmeldungunterdruecken}', + `altersfreigabe`='{$this->altersfreigabe}', + `unikatbeikopie`='{$this->unikatbeikopie}', + `steuergruppe`='{$this->steuergruppe}', + `sachkonto`='{$this->sachkonto}', + `kostenstelle`='{$this->kostenstelle}', + `artikelautokalkulation`='{$this->artikelautokalkulation}', + `artikelabschliessenkalkulation`='{$this->artikelabschliessenkalkulation}', + `artikelfifokalkulation`='{$this->artikelfifokalkulation}', + `keinskonto`='{$this->keinskonto}', + `berechneterek`='{$this->berechneterek}', + `verwendeberechneterek`='{$this->verwendeberechneterek}', + `berechneterekwaehrung`='{$this->berechneterekwaehrung}', + `has_preproduced_partlist`='{$this->has_preproduced_partlist}', + `preproduced_partlist`='{$this->preproduced_partlist}', + `nettogewicht`='{$this->nettogewicht}' + WHERE (`id`='{$this->id}')"; + + $this->app->DB->Update($sql); + } + + public function Delete($id='') + { + if(is_numeric($id)) + { + $this->id=$id; + } + else + return -1; + + $sql = "DELETE FROM `artikel` WHERE (`id`='{$this->id}')"; + $this->app->DB->Delete($sql); + + $this->id=''; + $this->typ=''; + $this->nummer=''; + $this->checksum=''; + $this->projekt=''; + $this->inaktiv=''; + $this->ausverkauft=''; + $this->warengruppe=''; + $this->name_de=''; + $this->name_en=''; + $this->kurztext_de=''; + $this->kurztext_en=''; + $this->beschreibung_de=''; + $this->beschreibung_en=''; + $this->uebersicht_de=''; + $this->uebersicht_en=''; + $this->links_de=''; + $this->links_en=''; + $this->startseite_de=''; + $this->startseite_en=''; + $this->standardbild=''; + $this->herstellerlink=''; + $this->hersteller=''; + $this->teilbar=''; + $this->nteile=''; + $this->seriennummern=''; + $this->lager_platz=''; + $this->lieferzeit=''; + $this->lieferzeitmanuell=''; + $this->sonstiges=''; + $this->gewicht=''; + $this->endmontage=''; + $this->funktionstest=''; + $this->artikelcheckliste=''; + $this->stueckliste=''; + $this->juststueckliste=''; + $this->barcode=''; + $this->hinzugefuegt=''; + $this->pcbdecal=''; + $this->lagerartikel=''; + $this->porto=''; + $this->chargenverwaltung=''; + $this->provisionsartikel=''; + $this->gesperrt=''; + $this->sperrgrund=''; + $this->geloescht=''; + $this->gueltigbis=''; + $this->umsatzsteuer=''; + $this->klasse=''; + $this->adresse=''; + $this->shopartikel=''; + $this->unishopartikel=''; + $this->journalshopartikel=''; + $this->shop=''; + $this->katalog=''; + $this->katalogtext_de=''; + $this->katalogtext_en=''; + $this->katalogbezeichnung_de=''; + $this->katalogbezeichnung_en=''; + $this->neu=''; + $this->topseller=''; + $this->startseite=''; + $this->wichtig=''; + $this->mindestlager=''; + $this->mindestbestellung=''; + $this->partnerprogramm_sperre=''; + $this->internerkommentar=''; + $this->intern_gesperrt=''; + $this->intern_gesperrtuser=''; + $this->intern_gesperrtgrund=''; + $this->inbearbeitung=''; + $this->inbearbeitunguser=''; + $this->cache_lagerplatzinhaltmenge=''; + $this->internkommentar=''; + $this->firma=''; + $this->logdatei=''; + $this->anabregs_text=''; + $this->autobestellung=''; + $this->produktion=''; + $this->herstellernummer=''; + $this->restmenge=''; + $this->mlmdirektpraemie=''; + $this->keineeinzelartikelanzeigen=''; + $this->mindesthaltbarkeitsdatum=''; + $this->letzteseriennummer=''; + $this->individualartikel=''; + $this->keinrabatterlaubt=''; + $this->rabatt=''; + $this->rabatt_prozent=''; + $this->geraet=''; + $this->serviceartikel=''; + $this->autoabgleicherlaubt=''; + $this->pseudopreis=''; + $this->freigabenotwendig=''; + $this->freigaberegel=''; + $this->nachbestellt=''; + $this->ean=''; + $this->mlmpunkte=''; + $this->mlmbonuspunkte=''; + $this->mlmkeinepunkteeigenkauf=''; + $this->shop2=''; + $this->shop3=''; + $this->usereditid=''; + $this->useredittimestamp=''; + $this->freifeld1=''; + $this->freifeld2=''; + $this->freifeld3=''; + $this->freifeld4=''; + $this->freifeld5=''; + $this->freifeld6=''; + $this->einheit=''; + $this->webid=''; + $this->lieferzeitmanuell_en=''; + $this->variante=''; + $this->variante_von=''; + $this->produktioninfo=''; + $this->sonderaktion=''; + $this->sonderaktion_en=''; + $this->autolagerlampe=''; + $this->leerfeld=''; + $this->zolltarifnummer=''; + $this->herkunftsland=''; + $this->laenge=''; + $this->breite=''; + $this->hoehe=''; + $this->gebuehr=''; + $this->pseudolager=''; + $this->downloadartikel=''; + $this->matrixprodukt=''; + $this->steuer_erloese_inland_normal=''; + $this->steuer_aufwendung_inland_normal=''; + $this->steuer_erloese_inland_ermaessigt=''; + $this->steuer_aufwendung_inland_ermaessigt=''; + $this->steuer_erloese_inland_steuerfrei=''; + $this->steuer_aufwendung_inland_steuerfrei=''; + $this->steuer_erloese_inland_innergemeinschaftlich=''; + $this->steuer_aufwendung_inland_innergemeinschaftlich=''; + $this->steuer_erloese_inland_eunormal=''; + $this->steuer_erloese_inland_nichtsteuerbar=''; + $this->steuer_erloese_inland_euermaessigt=''; + $this->steuer_aufwendung_inland_nichtsteuerbar=''; + $this->steuer_aufwendung_inland_eunormal=''; + $this->steuer_aufwendung_inland_euermaessigt=''; + $this->steuer_erloese_inland_export=''; + $this->steuer_aufwendung_inland_import=''; + $this->steuer_art_produkt=''; + $this->steuer_art_produkt_download=''; + $this->metadescription_de=''; + $this->metadescription_en=''; + $this->metakeywords_de=''; + $this->metakeywords_en=''; + $this->anabregs_text_en=''; + $this->externeproduktion=''; + $this->bildvorschau=''; + $this->inventursperre=''; + $this->variante_kopie=''; + $this->unikat=''; + $this->generierenummerbeioption=''; + $this->allelieferanten=''; + $this->tagespreise=''; + $this->rohstoffe=''; + $this->xvp=''; + $this->ohnepreisimpdf=''; + $this->provisionssperre=''; + $this->dienstleistung=''; + $this->inventurekaktiv=''; + $this->inventurek=''; + $this->hinweis_einfuegen=''; + $this->etikettautodruck=''; + $this->lagerkorrekturwert=''; + $this->autodrucketikett=''; + $this->abckategorie=''; + $this->laststorage_changed=''; + $this->laststorage_sync=''; + $this->steuersatz=''; + $this->steuertext_innergemeinschaftlich=''; + $this->steuertext_export=''; + $this->formelmenge=''; + $this->formelpreis=''; + $this->freifeld7=''; + $this->freifeld8=''; + $this->freifeld9=''; + $this->freifeld10=''; + $this->freifeld11=''; + $this->freifeld12=''; + $this->freifeld13=''; + $this->freifeld14=''; + $this->freifeld15=''; + $this->freifeld16=''; + $this->freifeld17=''; + $this->freifeld18=''; + $this->freifeld19=''; + $this->freifeld20=''; + $this->freifeld21=''; + $this->freifeld22=''; + $this->freifeld23=''; + $this->freifeld24=''; + $this->freifeld25=''; + $this->freifeld26=''; + $this->freifeld27=''; + $this->freifeld28=''; + $this->freifeld29=''; + $this->freifeld30=''; + $this->freifeld31=''; + $this->freifeld32=''; + $this->freifeld33=''; + $this->freifeld34=''; + $this->freifeld35=''; + $this->freifeld36=''; + $this->freifeld37=''; + $this->freifeld38=''; + $this->freifeld39=''; + $this->freifeld40=''; + $this->ursprungsregion=''; + $this->bestandalternativartikel=''; + $this->metatitle_de=''; + $this->metatitle_en=''; + $this->vkmeldungunterdruecken=''; + $this->altersfreigabe=''; + $this->unikatbeikopie=''; + $this->steuergruppe=''; + $this->sachkonto=''; + $this->kostenstelle=''; + $this->artikelautokalkulation=''; + $this->artikelabschliessenkalkulation=''; + $this->artikelfifokalkulation=''; + $this->keinskonto=''; + $this->berechneterek=''; + $this->verwendeberechneterek=''; + $this->berechneterekwaehrung=''; + $this->has_preproduced_partlist=''; + $this->preproduced_partlist=''; + $this->nettogewicht=''; + } + + public function Copy() + { + $this->id = ''; + $this->Create(); + } + + /** + Mit dieser Funktion kann man einen Datensatz suchen + dafuer muss man die Attribute setzen nach denen gesucht werden soll + dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt + zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen + **/ + + public function Find() + { + //TODO Suche mit den werten machen + } + + public function FindNext() + { + //TODO Suche mit den alten werten fortsetzen machen + } + + /** Funktionen um durch die Tabelle iterieren zu koennen */ + + public function Next() + { + //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer + } + + public function First() + { + //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer + } + + /** dank dieser funktionen kann man die tatsaechlichen werte einfach + ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/ + + public function SetId($value) { $this->id=$value; } + public function GetId() { return $this->id; } + public function SetTyp($value) { $this->typ=$value; } + public function GetTyp() { return $this->typ; } + public function SetNummer($value) { $this->nummer=$value; } + public function GetNummer() { return $this->nummer; } + public function SetChecksum($value) { $this->checksum=$value; } + public function GetChecksum() { return $this->checksum; } + public function SetProjekt($value) { $this->projekt=$value; } + public function GetProjekt() { return $this->projekt; } + public function SetInaktiv($value) { $this->inaktiv=$value; } + public function GetInaktiv() { return $this->inaktiv; } + public function SetAusverkauft($value) { $this->ausverkauft=$value; } + public function GetAusverkauft() { return $this->ausverkauft; } + public function SetWarengruppe($value) { $this->warengruppe=$value; } + public function GetWarengruppe() { return $this->warengruppe; } + public function SetName_De($value) { $this->name_de=$value; } + public function GetName_De() { return $this->name_de; } + public function SetName_En($value) { $this->name_en=$value; } + public function GetName_En() { return $this->name_en; } + public function SetKurztext_De($value) { $this->kurztext_de=$value; } + public function GetKurztext_De() { return $this->kurztext_de; } + public function SetKurztext_En($value) { $this->kurztext_en=$value; } + public function GetKurztext_En() { return $this->kurztext_en; } + public function SetBeschreibung_De($value) { $this->beschreibung_de=$value; } + public function GetBeschreibung_De() { return $this->beschreibung_de; } + public function SetBeschreibung_En($value) { $this->beschreibung_en=$value; } + public function GetBeschreibung_En() { return $this->beschreibung_en; } + public function SetUebersicht_De($value) { $this->uebersicht_de=$value; } + public function GetUebersicht_De() { return $this->uebersicht_de; } + public function SetUebersicht_En($value) { $this->uebersicht_en=$value; } + public function GetUebersicht_En() { return $this->uebersicht_en; } + public function SetLinks_De($value) { $this->links_de=$value; } + public function GetLinks_De() { return $this->links_de; } + public function SetLinks_En($value) { $this->links_en=$value; } + public function GetLinks_En() { return $this->links_en; } + public function SetStartseite_De($value) { $this->startseite_de=$value; } + public function GetStartseite_De() { return $this->startseite_de; } + public function SetStartseite_En($value) { $this->startseite_en=$value; } + public function GetStartseite_En() { return $this->startseite_en; } + public function SetStandardbild($value) { $this->standardbild=$value; } + public function GetStandardbild() { return $this->standardbild; } + public function SetHerstellerlink($value) { $this->herstellerlink=$value; } + public function GetHerstellerlink() { return $this->herstellerlink; } + public function SetHersteller($value) { $this->hersteller=$value; } + public function GetHersteller() { return $this->hersteller; } + public function SetTeilbar($value) { $this->teilbar=$value; } + public function GetTeilbar() { return $this->teilbar; } + public function SetNteile($value) { $this->nteile=$value; } + public function GetNteile() { return $this->nteile; } + public function SetSeriennummern($value) { $this->seriennummern=$value; } + public function GetSeriennummern() { return $this->seriennummern; } + public function SetLager_Platz($value) { $this->lager_platz=$value; } + public function GetLager_Platz() { return $this->lager_platz; } + public function SetLieferzeit($value) { $this->lieferzeit=$value; } + public function GetLieferzeit() { return $this->lieferzeit; } + public function SetLieferzeitmanuell($value) { $this->lieferzeitmanuell=$value; } + public function GetLieferzeitmanuell() { return $this->lieferzeitmanuell; } + public function SetSonstiges($value) { $this->sonstiges=$value; } + public function GetSonstiges() { return $this->sonstiges; } + public function SetGewicht($value) { $this->gewicht=$value; } + public function GetGewicht() { return $this->gewicht; } + public function SetEndmontage($value) { $this->endmontage=$value; } + public function GetEndmontage() { return $this->endmontage; } + public function SetFunktionstest($value) { $this->funktionstest=$value; } + public function GetFunktionstest() { return $this->funktionstest; } + public function SetArtikelcheckliste($value) { $this->artikelcheckliste=$value; } + public function GetArtikelcheckliste() { return $this->artikelcheckliste; } + public function SetStueckliste($value) { $this->stueckliste=$value; } + public function GetStueckliste() { return $this->stueckliste; } + public function SetJuststueckliste($value) { $this->juststueckliste=$value; } + public function GetJuststueckliste() { return $this->juststueckliste; } + public function SetBarcode($value) { $this->barcode=$value; } + public function GetBarcode() { return $this->barcode; } + public function SetHinzugefuegt($value) { $this->hinzugefuegt=$value; } + public function GetHinzugefuegt() { return $this->hinzugefuegt; } + public function SetPcbdecal($value) { $this->pcbdecal=$value; } + public function GetPcbdecal() { return $this->pcbdecal; } + public function SetLagerartikel($value) { $this->lagerartikel=$value; } + public function GetLagerartikel() { return $this->lagerartikel; } + public function SetPorto($value) { $this->porto=$value; } + public function GetPorto() { return $this->porto; } + public function SetChargenverwaltung($value) { $this->chargenverwaltung=$value; } + public function GetChargenverwaltung() { return $this->chargenverwaltung; } + public function SetProvisionsartikel($value) { $this->provisionsartikel=$value; } + public function GetProvisionsartikel() { return $this->provisionsartikel; } + public function SetGesperrt($value) { $this->gesperrt=$value; } + public function GetGesperrt() { return $this->gesperrt; } + public function SetSperrgrund($value) { $this->sperrgrund=$value; } + public function GetSperrgrund() { return $this->sperrgrund; } + public function SetGeloescht($value) { $this->geloescht=$value; } + public function GetGeloescht() { return $this->geloescht; } + public function SetGueltigbis($value) { $this->gueltigbis=$value; } + public function GetGueltigbis() { return $this->gueltigbis; } + public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; } + public function GetUmsatzsteuer() { return $this->umsatzsteuer; } + public function SetKlasse($value) { $this->klasse=$value; } + public function GetKlasse() { return $this->klasse; } + public function SetAdresse($value) { $this->adresse=$value; } + public function GetAdresse() { return $this->adresse; } + public function SetShopartikel($value) { $this->shopartikel=$value; } + public function GetShopartikel() { return $this->shopartikel; } + public function SetUnishopartikel($value) { $this->unishopartikel=$value; } + public function GetUnishopartikel() { return $this->unishopartikel; } + public function SetJournalshopartikel($value) { $this->journalshopartikel=$value; } + public function GetJournalshopartikel() { return $this->journalshopartikel; } + public function SetShop($value) { $this->shop=$value; } + public function GetShop() { return $this->shop; } + public function SetKatalog($value) { $this->katalog=$value; } + public function GetKatalog() { return $this->katalog; } + public function SetKatalogtext_De($value) { $this->katalogtext_de=$value; } + public function GetKatalogtext_De() { return $this->katalogtext_de; } + public function SetKatalogtext_En($value) { $this->katalogtext_en=$value; } + public function GetKatalogtext_En() { return $this->katalogtext_en; } + public function SetKatalogbezeichnung_De($value) { $this->katalogbezeichnung_de=$value; } + public function GetKatalogbezeichnung_De() { return $this->katalogbezeichnung_de; } + public function SetKatalogbezeichnung_En($value) { $this->katalogbezeichnung_en=$value; } + public function GetKatalogbezeichnung_En() { return $this->katalogbezeichnung_en; } + public function SetNeu($value) { $this->neu=$value; } + public function GetNeu() { return $this->neu; } + public function SetTopseller($value) { $this->topseller=$value; } + public function GetTopseller() { return $this->topseller; } + public function SetStartseite($value) { $this->startseite=$value; } + public function GetStartseite() { return $this->startseite; } + public function SetWichtig($value) { $this->wichtig=$value; } + public function GetWichtig() { return $this->wichtig; } + public function SetMindestlager($value) { $this->mindestlager=$value; } + public function GetMindestlager() { return $this->mindestlager; } + public function SetMindestbestellung($value) { $this->mindestbestellung=$value; } + public function GetMindestbestellung() { return $this->mindestbestellung; } + public function SetPartnerprogramm_Sperre($value) { $this->partnerprogramm_sperre=$value; } + public function GetPartnerprogramm_Sperre() { return $this->partnerprogramm_sperre; } + public function SetInternerkommentar($value) { $this->internerkommentar=$value; } + public function GetInternerkommentar() { return $this->internerkommentar; } + public function SetIntern_Gesperrt($value) { $this->intern_gesperrt=$value; } + public function GetIntern_Gesperrt() { return $this->intern_gesperrt; } + public function SetIntern_Gesperrtuser($value) { $this->intern_gesperrtuser=$value; } + public function GetIntern_Gesperrtuser() { return $this->intern_gesperrtuser; } + public function SetIntern_Gesperrtgrund($value) { $this->intern_gesperrtgrund=$value; } + public function GetIntern_Gesperrtgrund() { return $this->intern_gesperrtgrund; } + public function SetInbearbeitung($value) { $this->inbearbeitung=$value; } + public function GetInbearbeitung() { return $this->inbearbeitung; } + public function SetInbearbeitunguser($value) { $this->inbearbeitunguser=$value; } + public function GetInbearbeitunguser() { return $this->inbearbeitunguser; } + public function SetCache_Lagerplatzinhaltmenge($value) { $this->cache_lagerplatzinhaltmenge=$value; } + public function GetCache_Lagerplatzinhaltmenge() { return $this->cache_lagerplatzinhaltmenge; } + public function SetInternkommentar($value) { $this->internkommentar=$value; } + public function GetInternkommentar() { return $this->internkommentar; } + public function SetFirma($value) { $this->firma=$value; } + public function GetFirma() { return $this->firma; } + public function SetLogdatei($value) { $this->logdatei=$value; } + public function GetLogdatei() { return $this->logdatei; } + public function SetAnabregs_Text($value) { $this->anabregs_text=$value; } + public function GetAnabregs_Text() { return $this->anabregs_text; } + public function SetAutobestellung($value) { $this->autobestellung=$value; } + public function GetAutobestellung() { return $this->autobestellung; } + public function SetProduktion($value) { $this->produktion=$value; } + public function GetProduktion() { return $this->produktion; } + public function SetHerstellernummer($value) { $this->herstellernummer=$value; } + public function GetHerstellernummer() { return $this->herstellernummer; } + public function SetRestmenge($value) { $this->restmenge=$value; } + public function GetRestmenge() { return $this->restmenge; } + public function SetMlmdirektpraemie($value) { $this->mlmdirektpraemie=$value; } + public function GetMlmdirektpraemie() { return $this->mlmdirektpraemie; } + public function SetKeineeinzelartikelanzeigen($value) { $this->keineeinzelartikelanzeigen=$value; } + public function GetKeineeinzelartikelanzeigen() { return $this->keineeinzelartikelanzeigen; } + public function SetMindesthaltbarkeitsdatum($value) { $this->mindesthaltbarkeitsdatum=$value; } + public function GetMindesthaltbarkeitsdatum() { return $this->mindesthaltbarkeitsdatum; } + public function SetLetzteseriennummer($value) { $this->letzteseriennummer=$value; } + public function GetLetzteseriennummer() { return $this->letzteseriennummer; } + public function SetIndividualartikel($value) { $this->individualartikel=$value; } + public function GetIndividualartikel() { return $this->individualartikel; } + public function SetKeinrabatterlaubt($value) { $this->keinrabatterlaubt=$value; } + public function GetKeinrabatterlaubt() { return $this->keinrabatterlaubt; } + public function SetRabatt($value) { $this->rabatt=$value; } + public function GetRabatt() { return $this->rabatt; } + public function SetRabatt_Prozent($value) { $this->rabatt_prozent=$value; } + public function GetRabatt_Prozent() { return $this->rabatt_prozent; } + public function SetGeraet($value) { $this->geraet=$value; } + public function GetGeraet() { return $this->geraet; } + public function SetServiceartikel($value) { $this->serviceartikel=$value; } + public function GetServiceartikel() { return $this->serviceartikel; } + public function SetAutoabgleicherlaubt($value) { $this->autoabgleicherlaubt=$value; } + public function GetAutoabgleicherlaubt() { return $this->autoabgleicherlaubt; } + public function SetPseudopreis($value) { $this->pseudopreis=$value; } + public function GetPseudopreis() { return $this->pseudopreis; } + public function SetFreigabenotwendig($value) { $this->freigabenotwendig=$value; } + public function GetFreigabenotwendig() { return $this->freigabenotwendig; } + public function SetFreigaberegel($value) { $this->freigaberegel=$value; } + public function GetFreigaberegel() { return $this->freigaberegel; } + public function SetNachbestellt($value) { $this->nachbestellt=$value; } + public function GetNachbestellt() { return $this->nachbestellt; } + public function SetEan($value) { $this->ean=$value; } + public function GetEan() { return $this->ean; } + public function SetMlmpunkte($value) { $this->mlmpunkte=$value; } + public function GetMlmpunkte() { return $this->mlmpunkte; } + public function SetMlmbonuspunkte($value) { $this->mlmbonuspunkte=$value; } + public function GetMlmbonuspunkte() { return $this->mlmbonuspunkte; } + public function SetMlmkeinepunkteeigenkauf($value) { $this->mlmkeinepunkteeigenkauf=$value; } + public function GetMlmkeinepunkteeigenkauf() { return $this->mlmkeinepunkteeigenkauf; } + public function SetShop2($value) { $this->shop2=$value; } + public function GetShop2() { return $this->shop2; } + public function SetShop3($value) { $this->shop3=$value; } + public function GetShop3() { return $this->shop3; } + public function SetUsereditid($value) { $this->usereditid=$value; } + public function GetUsereditid() { return $this->usereditid; } + public function SetUseredittimestamp($value) { $this->useredittimestamp=$value; } + public function GetUseredittimestamp() { return $this->useredittimestamp; } + public function SetFreifeld1($value) { $this->freifeld1=$value; } + public function GetFreifeld1() { return $this->freifeld1; } + public function SetFreifeld2($value) { $this->freifeld2=$value; } + public function GetFreifeld2() { return $this->freifeld2; } + public function SetFreifeld3($value) { $this->freifeld3=$value; } + public function GetFreifeld3() { return $this->freifeld3; } + public function SetFreifeld4($value) { $this->freifeld4=$value; } + public function GetFreifeld4() { return $this->freifeld4; } + public function SetFreifeld5($value) { $this->freifeld5=$value; } + public function GetFreifeld5() { return $this->freifeld5; } + public function SetFreifeld6($value) { $this->freifeld6=$value; } + public function GetFreifeld6() { return $this->freifeld6; } + public function SetEinheit($value) { $this->einheit=$value; } + public function GetEinheit() { return $this->einheit; } + public function SetWebid($value) { $this->webid=$value; } + public function GetWebid() { return $this->webid; } + public function SetLieferzeitmanuell_En($value) { $this->lieferzeitmanuell_en=$value; } + public function GetLieferzeitmanuell_En() { return $this->lieferzeitmanuell_en; } + public function SetVariante($value) { $this->variante=$value; } + public function GetVariante() { return $this->variante; } + public function SetVariante_Von($value) { $this->variante_von=$value; } + public function GetVariante_Von() { return $this->variante_von; } + public function SetProduktioninfo($value) { $this->produktioninfo=$value; } + public function GetProduktioninfo() { return $this->produktioninfo; } + public function SetSonderaktion($value) { $this->sonderaktion=$value; } + public function GetSonderaktion() { return $this->sonderaktion; } + public function SetSonderaktion_En($value) { $this->sonderaktion_en=$value; } + public function GetSonderaktion_En() { return $this->sonderaktion_en; } + public function SetAutolagerlampe($value) { $this->autolagerlampe=$value; } + public function GetAutolagerlampe() { return $this->autolagerlampe; } + public function SetLeerfeld($value) { $this->leerfeld=$value; } + public function GetLeerfeld() { return $this->leerfeld; } + public function SetZolltarifnummer($value) { $this->zolltarifnummer=$value; } + public function GetZolltarifnummer() { return $this->zolltarifnummer; } + public function SetHerkunftsland($value) { $this->herkunftsland=$value; } + public function GetHerkunftsland() { return $this->herkunftsland; } + public function SetLaenge($value) { $this->laenge=$value; } + public function GetLaenge() { return $this->laenge; } + public function SetBreite($value) { $this->breite=$value; } + public function GetBreite() { return $this->breite; } + public function SetHoehe($value) { $this->hoehe=$value; } + public function GetHoehe() { return $this->hoehe; } + public function SetGebuehr($value) { $this->gebuehr=$value; } + public function GetGebuehr() { return $this->gebuehr; } + public function SetPseudolager($value) { $this->pseudolager=$value; } + public function GetPseudolager() { return $this->pseudolager; } + public function SetDownloadartikel($value) { $this->downloadartikel=$value; } + public function GetDownloadartikel() { return $this->downloadartikel; } + public function SetMatrixprodukt($value) { $this->matrixprodukt=$value; } + public function GetMatrixprodukt() { return $this->matrixprodukt; } + public function SetSteuer_Erloese_Inland_Normal($value) { $this->steuer_erloese_inland_normal=$value; } + public function GetSteuer_Erloese_Inland_Normal() { return $this->steuer_erloese_inland_normal; } + public function SetSteuer_Aufwendung_Inland_Normal($value) { $this->steuer_aufwendung_inland_normal=$value; } + public function GetSteuer_Aufwendung_Inland_Normal() { return $this->steuer_aufwendung_inland_normal; } + public function SetSteuer_Erloese_Inland_Ermaessigt($value) { $this->steuer_erloese_inland_ermaessigt=$value; } + public function GetSteuer_Erloese_Inland_Ermaessigt() { return $this->steuer_erloese_inland_ermaessigt; } + public function SetSteuer_Aufwendung_Inland_Ermaessigt($value) { $this->steuer_aufwendung_inland_ermaessigt=$value; } + public function GetSteuer_Aufwendung_Inland_Ermaessigt() { return $this->steuer_aufwendung_inland_ermaessigt; } + public function SetSteuer_Erloese_Inland_Steuerfrei($value) { $this->steuer_erloese_inland_steuerfrei=$value; } + public function GetSteuer_Erloese_Inland_Steuerfrei() { return $this->steuer_erloese_inland_steuerfrei; } + public function SetSteuer_Aufwendung_Inland_Steuerfrei($value) { $this->steuer_aufwendung_inland_steuerfrei=$value; } + public function GetSteuer_Aufwendung_Inland_Steuerfrei() { return $this->steuer_aufwendung_inland_steuerfrei; } + public function SetSteuer_Erloese_Inland_Innergemeinschaftlich($value) { $this->steuer_erloese_inland_innergemeinschaftlich=$value; } + public function GetSteuer_Erloese_Inland_Innergemeinschaftlich() { return $this->steuer_erloese_inland_innergemeinschaftlich; } + public function SetSteuer_Aufwendung_Inland_Innergemeinschaftlich($value) { $this->steuer_aufwendung_inland_innergemeinschaftlich=$value; } + public function GetSteuer_Aufwendung_Inland_Innergemeinschaftlich() { return $this->steuer_aufwendung_inland_innergemeinschaftlich; } + public function SetSteuer_Erloese_Inland_Eunormal($value) { $this->steuer_erloese_inland_eunormal=$value; } + public function GetSteuer_Erloese_Inland_Eunormal() { return $this->steuer_erloese_inland_eunormal; } + public function SetSteuer_Erloese_Inland_Nichtsteuerbar($value) { $this->steuer_erloese_inland_nichtsteuerbar=$value; } + public function GetSteuer_Erloese_Inland_Nichtsteuerbar() { return $this->steuer_erloese_inland_nichtsteuerbar; } + public function SetSteuer_Erloese_Inland_Euermaessigt($value) { $this->steuer_erloese_inland_euermaessigt=$value; } + public function GetSteuer_Erloese_Inland_Euermaessigt() { return $this->steuer_erloese_inland_euermaessigt; } + public function SetSteuer_Aufwendung_Inland_Nichtsteuerbar($value) { $this->steuer_aufwendung_inland_nichtsteuerbar=$value; } + public function GetSteuer_Aufwendung_Inland_Nichtsteuerbar() { return $this->steuer_aufwendung_inland_nichtsteuerbar; } + public function SetSteuer_Aufwendung_Inland_Eunormal($value) { $this->steuer_aufwendung_inland_eunormal=$value; } + public function GetSteuer_Aufwendung_Inland_Eunormal() { return $this->steuer_aufwendung_inland_eunormal; } + public function SetSteuer_Aufwendung_Inland_Euermaessigt($value) { $this->steuer_aufwendung_inland_euermaessigt=$value; } + public function GetSteuer_Aufwendung_Inland_Euermaessigt() { return $this->steuer_aufwendung_inland_euermaessigt; } + public function SetSteuer_Erloese_Inland_Export($value) { $this->steuer_erloese_inland_export=$value; } + public function GetSteuer_Erloese_Inland_Export() { return $this->steuer_erloese_inland_export; } + public function SetSteuer_Aufwendung_Inland_Import($value) { $this->steuer_aufwendung_inland_import=$value; } + public function GetSteuer_Aufwendung_Inland_Import() { return $this->steuer_aufwendung_inland_import; } + public function SetSteuer_Art_Produkt($value) { $this->steuer_art_produkt=$value; } + public function GetSteuer_Art_Produkt() { return $this->steuer_art_produkt; } + public function SetSteuer_Art_Produkt_Download($value) { $this->steuer_art_produkt_download=$value; } + public function GetSteuer_Art_Produkt_Download() { return $this->steuer_art_produkt_download; } + public function SetMetadescription_De($value) { $this->metadescription_de=$value; } + public function GetMetadescription_De() { return $this->metadescription_de; } + public function SetMetadescription_En($value) { $this->metadescription_en=$value; } + public function GetMetadescription_En() { return $this->metadescription_en; } + public function SetMetakeywords_De($value) { $this->metakeywords_de=$value; } + public function GetMetakeywords_De() { return $this->metakeywords_de; } + public function SetMetakeywords_En($value) { $this->metakeywords_en=$value; } + public function GetMetakeywords_En() { return $this->metakeywords_en; } + public function SetAnabregs_Text_En($value) { $this->anabregs_text_en=$value; } + public function GetAnabregs_Text_En() { return $this->anabregs_text_en; } + public function SetExterneproduktion($value) { $this->externeproduktion=$value; } + public function GetExterneproduktion() { return $this->externeproduktion; } + public function SetBildvorschau($value) { $this->bildvorschau=$value; } + public function GetBildvorschau() { return $this->bildvorschau; } + public function SetInventursperre($value) { $this->inventursperre=$value; } + public function GetInventursperre() { return $this->inventursperre; } + public function SetVariante_Kopie($value) { $this->variante_kopie=$value; } + public function GetVariante_Kopie() { return $this->variante_kopie; } + public function SetUnikat($value) { $this->unikat=$value; } + public function GetUnikat() { return $this->unikat; } + public function SetGenerierenummerbeioption($value) { $this->generierenummerbeioption=$value; } + public function GetGenerierenummerbeioption() { return $this->generierenummerbeioption; } + public function SetAllelieferanten($value) { $this->allelieferanten=$value; } + public function GetAllelieferanten() { return $this->allelieferanten; } + public function SetTagespreise($value) { $this->tagespreise=$value; } + public function GetTagespreise() { return $this->tagespreise; } + public function SetRohstoffe($value) { $this->rohstoffe=$value; } + public function GetRohstoffe() { return $this->rohstoffe; } + public function SetXvp($value) { $this->xvp=$value; } + public function GetXvp() { return $this->xvp; } + public function SetOhnepreisimpdf($value) { $this->ohnepreisimpdf=$value; } + public function GetOhnepreisimpdf() { return $this->ohnepreisimpdf; } + public function SetProvisionssperre($value) { $this->provisionssperre=$value; } + public function GetProvisionssperre() { return $this->provisionssperre; } + public function SetDienstleistung($value) { $this->dienstleistung=$value; } + public function GetDienstleistung() { return $this->dienstleistung; } + public function SetInventurekaktiv($value) { $this->inventurekaktiv=$value; } + public function GetInventurekaktiv() { return $this->inventurekaktiv; } + public function SetInventurek($value) { $this->inventurek=$value; } + public function GetInventurek() { return $this->inventurek; } + public function SetHinweis_Einfuegen($value) { $this->hinweis_einfuegen=$value; } + public function GetHinweis_Einfuegen() { return $this->hinweis_einfuegen; } + public function SetEtikettautodruck($value) { $this->etikettautodruck=$value; } + public function GetEtikettautodruck() { return $this->etikettautodruck; } + public function SetLagerkorrekturwert($value) { $this->lagerkorrekturwert=$value; } + public function GetLagerkorrekturwert() { return $this->lagerkorrekturwert; } + public function SetAutodrucketikett($value) { $this->autodrucketikett=$value; } + public function GetAutodrucketikett() { return $this->autodrucketikett; } + public function SetAbckategorie($value) { $this->abckategorie=$value; } + public function GetAbckategorie() { return $this->abckategorie; } + public function SetLaststorage_Changed($value) { $this->laststorage_changed=$value; } + public function GetLaststorage_Changed() { return $this->laststorage_changed; } + public function SetLaststorage_Sync($value) { $this->laststorage_sync=$value; } + public function GetLaststorage_Sync() { return $this->laststorage_sync; } + public function SetSteuersatz($value) { $this->steuersatz=$value; } + public function GetSteuersatz() { return $this->steuersatz; } + public function SetSteuertext_Innergemeinschaftlich($value) { $this->steuertext_innergemeinschaftlich=$value; } + public function GetSteuertext_Innergemeinschaftlich() { return $this->steuertext_innergemeinschaftlich; } + public function SetSteuertext_Export($value) { $this->steuertext_export=$value; } + public function GetSteuertext_Export() { return $this->steuertext_export; } + public function SetFormelmenge($value) { $this->formelmenge=$value; } + public function GetFormelmenge() { return $this->formelmenge; } + public function SetFormelpreis($value) { $this->formelpreis=$value; } + public function GetFormelpreis() { return $this->formelpreis; } + public function SetFreifeld7($value) { $this->freifeld7=$value; } + public function GetFreifeld7() { return $this->freifeld7; } + public function SetFreifeld8($value) { $this->freifeld8=$value; } + public function GetFreifeld8() { return $this->freifeld8; } + public function SetFreifeld9($value) { $this->freifeld9=$value; } + public function GetFreifeld9() { return $this->freifeld9; } + public function SetFreifeld10($value) { $this->freifeld10=$value; } + public function GetFreifeld10() { return $this->freifeld10; } + public function SetFreifeld11($value) { $this->freifeld11=$value; } + public function GetFreifeld11() { return $this->freifeld11; } + public function SetFreifeld12($value) { $this->freifeld12=$value; } + public function GetFreifeld12() { return $this->freifeld12; } + public function SetFreifeld13($value) { $this->freifeld13=$value; } + public function GetFreifeld13() { return $this->freifeld13; } + public function SetFreifeld14($value) { $this->freifeld14=$value; } + public function GetFreifeld14() { return $this->freifeld14; } + public function SetFreifeld15($value) { $this->freifeld15=$value; } + public function GetFreifeld15() { return $this->freifeld15; } + public function SetFreifeld16($value) { $this->freifeld16=$value; } + public function GetFreifeld16() { return $this->freifeld16; } + public function SetFreifeld17($value) { $this->freifeld17=$value; } + public function GetFreifeld17() { return $this->freifeld17; } + public function SetFreifeld18($value) { $this->freifeld18=$value; } + public function GetFreifeld18() { return $this->freifeld18; } + public function SetFreifeld19($value) { $this->freifeld19=$value; } + public function GetFreifeld19() { return $this->freifeld19; } + public function SetFreifeld20($value) { $this->freifeld20=$value; } + public function GetFreifeld20() { return $this->freifeld20; } + public function SetFreifeld21($value) { $this->freifeld21=$value; } + public function GetFreifeld21() { return $this->freifeld21; } + public function SetFreifeld22($value) { $this->freifeld22=$value; } + public function GetFreifeld22() { return $this->freifeld22; } + public function SetFreifeld23($value) { $this->freifeld23=$value; } + public function GetFreifeld23() { return $this->freifeld23; } + public function SetFreifeld24($value) { $this->freifeld24=$value; } + public function GetFreifeld24() { return $this->freifeld24; } + public function SetFreifeld25($value) { $this->freifeld25=$value; } + public function GetFreifeld25() { return $this->freifeld25; } + public function SetFreifeld26($value) { $this->freifeld26=$value; } + public function GetFreifeld26() { return $this->freifeld26; } + public function SetFreifeld27($value) { $this->freifeld27=$value; } + public function GetFreifeld27() { return $this->freifeld27; } + public function SetFreifeld28($value) { $this->freifeld28=$value; } + public function GetFreifeld28() { return $this->freifeld28; } + public function SetFreifeld29($value) { $this->freifeld29=$value; } + public function GetFreifeld29() { return $this->freifeld29; } + public function SetFreifeld30($value) { $this->freifeld30=$value; } + public function GetFreifeld30() { return $this->freifeld30; } + public function SetFreifeld31($value) { $this->freifeld31=$value; } + public function GetFreifeld31() { return $this->freifeld31; } + public function SetFreifeld32($value) { $this->freifeld32=$value; } + public function GetFreifeld32() { return $this->freifeld32; } + public function SetFreifeld33($value) { $this->freifeld33=$value; } + public function GetFreifeld33() { return $this->freifeld33; } + public function SetFreifeld34($value) { $this->freifeld34=$value; } + public function GetFreifeld34() { return $this->freifeld34; } + public function SetFreifeld35($value) { $this->freifeld35=$value; } + public function GetFreifeld35() { return $this->freifeld35; } + public function SetFreifeld36($value) { $this->freifeld36=$value; } + public function GetFreifeld36() { return $this->freifeld36; } + public function SetFreifeld37($value) { $this->freifeld37=$value; } + public function GetFreifeld37() { return $this->freifeld37; } + public function SetFreifeld38($value) { $this->freifeld38=$value; } + public function GetFreifeld38() { return $this->freifeld38; } + public function SetFreifeld39($value) { $this->freifeld39=$value; } + public function GetFreifeld39() { return $this->freifeld39; } + public function SetFreifeld40($value) { $this->freifeld40=$value; } + public function GetFreifeld40() { return $this->freifeld40; } + public function SetUrsprungsregion($value) { $this->ursprungsregion=$value; } + public function GetUrsprungsregion() { return $this->ursprungsregion; } + public function SetBestandalternativartikel($value) { $this->bestandalternativartikel=$value; } + public function GetBestandalternativartikel() { return $this->bestandalternativartikel; } + public function SetMetatitle_De($value) { $this->metatitle_de=$value; } + public function GetMetatitle_De() { return $this->metatitle_de; } + public function SetMetatitle_En($value) { $this->metatitle_en=$value; } + public function GetMetatitle_En() { return $this->metatitle_en; } + public function SetVkmeldungunterdruecken($value) { $this->vkmeldungunterdruecken=$value; } + public function GetVkmeldungunterdruecken() { return $this->vkmeldungunterdruecken; } + public function SetAltersfreigabe($value) { $this->altersfreigabe=$value; } + public function GetAltersfreigabe() { return $this->altersfreigabe; } + public function SetUnikatbeikopie($value) { $this->unikatbeikopie=$value; } + public function GetUnikatbeikopie() { return $this->unikatbeikopie; } + public function SetSteuergruppe($value) { $this->steuergruppe=$value; } + public function GetSteuergruppe() { return $this->steuergruppe; } + public function SetSachkonto($value) { $this->sachkonto=$value; } + public function GetSachkonto() { return $this->sachkonto; } + public function SetKostenstelle($value) { $this->kostenstelle=$value; } + public function GetKostenstelle() { return $this->kostenstelle; } + public function SetArtikelautokalkulation($value) { $this->artikelautokalkulation=$value; } + public function GetArtikelautokalkulation() { return $this->artikelautokalkulation; } + public function SetArtikelabschliessenkalkulation($value) { $this->artikelabschliessenkalkulation=$value; } + public function GetArtikelabschliessenkalkulation() { return $this->artikelabschliessenkalkulation; } + public function SetArtikelfifokalkulation($value) { $this->artikelfifokalkulation=$value; } + public function GetArtikelfifokalkulation() { return $this->artikelfifokalkulation; } + public function SetKeinskonto($value) { $this->keinskonto=$value; } + public function GetKeinskonto() { return $this->keinskonto; } + public function SetBerechneterek($value) { $this->berechneterek=$value; } + public function GetBerechneterek() { return $this->berechneterek; } + public function SetVerwendeberechneterek($value) { $this->verwendeberechneterek=$value; } + public function GetVerwendeberechneterek() { return $this->verwendeberechneterek; } + public function SetBerechneterekwaehrung($value) { $this->berechneterekwaehrung=$value; } + public function GetBerechneterekwaehrung() { return $this->berechneterekwaehrung; } + public function SetHas_Preproduced_Partlist($value) { $this->has_preproduced_partlist=$value; } + public function GetHas_Preproduced_Partlist() { return $this->has_preproduced_partlist; } + public function SetPreproduced_Partlist($value) { $this->preproduced_partlist=$value; } + public function GetPreproduced_Partlist() { return $this->preproduced_partlist; } + public function SetNettogewicht($value) { $this->nettogewicht=$value; } + public function GetNettogewicht() { return $this->nettogewicht; } + +} diff --git a/www/widgets/_gen/widget.gen.artikel.php b/www/widgets/_gen/widget.gen.artikel.php index 4bb7563c..a48cc646 100644 --- a/www/widgets/_gen/widget.gen.artikel.php +++ b/www/widgets/_gen/widget.gen.artikel.php @@ -1,720 +1,723 @@ -app = $app; - $this->parsetarget = $parsetarget; - $this->Form(); - } - - public function artikelDelete() - { - - $this->form->Execute("artikel","delete"); - - $this->artikelList(); - } - - function Edit() - { - $this->form->Edit(); - } - - function Copy() - { - $this->form->Copy(); - } - - public function Create() - { - $this->form->Create(); - } - - public function Search() - { - $this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE"); - } - - public function Summary() - { - $this->app->Tpl->Set($this->parsetarget,"grosse Tabelle"); - } - - function Form() - { - $this->form = $this->app->FormHandler->CreateNew("artikel"); - $this->form->UseTable("artikel"); - $this->form->UseTemplate("artikel.tpl",$this->parsetarget); - - $field = new HTMLInput("leerfeld","hidden","","","","","","","","","","0","",""); - $this->form->NewField($field); - - - $field = new HTMLInput("name_de","text","","70","","","","","","","","0","",""); - $this->form->NewField($field); - $this->form->AddMandatory("name_de","notempty","Pflichtfeld!","MSGNAME_DE"); - - $field = new HTMLInput("nummer","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("projekt","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLSelect("typ",0,"typ","","","0"); - $this->form->NewField($field); - - $field = new HTMLInput("adresse","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLTextarea("anabregs_text",5,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("kurztext_de",2,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("internerkommentar",4,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLInput("hersteller","text","","40","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("herstellerlink","text","","40","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("herstellernummer","text","","35","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("ean","text","","35","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("zolltarifnummer","text","","35","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("herkunftsland","text","","35","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLSelect("ursprungsregion",0,"ursprungsregion","","","0"); - $field->AddOption('{|Bitte wählen|}',''); - $field->AddOption('01 Schleswig-Holstein','01'); - $field->AddOption('02 Hamburg','02'); - $field->AddOption('03 Niedersachsen','03'); - $field->AddOption('04 Bremen','04'); - $field->AddOption('05 Nordrhein-Westfalen','05'); - $field->AddOption('06 Hessen','06'); - $field->AddOption('07 Rheinland-Pfalz','07'); - $field->AddOption('08 Baden-Württemberg','08'); - $field->AddOption('09 Bayern','09'); - $field->AddOption('10 Saarland','10'); - $field->AddOption('11 Berlin','11'); - $field->AddOption('12 Brandenburg','12'); - $field->AddOption('13 Mecklenburg-Vorpommern','13'); - $field->AddOption('14 Sachsen','14'); - $field->AddOption('15 Sachsen-Anhalt','15'); - $field->AddOption('16 Thüringen','16'); - $field->AddOption('99 ausländischer Ursprung','99'); - $this->form->NewField($field); - - $field = new HTMLInput("mindestlager","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("gewicht","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("mindestbestellung","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("nettogewicht","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("lager_platz","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("laenge","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("einheit","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("breite","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("xvp","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("hoehe","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLSelect("abckategorie",0,"abckategorie","","","0"); - $field->AddOption('{|keine|}',''); - $field->AddOption('A','A'); - $field->AddOption('B','B'); - $field->AddOption('C','C'); - $this->form->NewField($field); - - $field = new HTMLCheckbox("lagerartikel","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("porto","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("rabatt","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("rabatt_prozent","text","","4","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("variante","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("variante_von","text","","35","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("matrixprodukt","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("tagespreise","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0"); - $field->AddOption('{|normal|}','normal'); - $field->AddOption('{|ermäßigt|}','ermaessigt'); - $field->AddOption('{|befreit|}','befreit'); - $this->form->NewField($field); - - $field = new HTMLCheckbox("anderersteuersatz","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("provisionssperre","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLSelect("chargenverwaltung",0,"chargenverwaltung","","","0"); - $field->AddOption('{|nein|}','0'); - $field->AddOption('{|ja|}','1'); - $field->AddOption('{|originale nutzen|}','2'); - $this->form->NewField($field); - - $field = new HTMLSelect("seriennummern",0,"seriennummern","","","0"); - $field->AddOption('{|keine|}','keine'); - $field->AddOption('{|eigene erzeugen|}','eigene'); - $field->AddOption('{|originale nutzen|}','vomprodukt'); - $field->AddOption('{|originale einlagern + nutzen|}','vomprodukteinlagern'); - $this->form->NewField($field); - - $field = new HTMLCheckbox("mindesthaltbarkeitsdatum","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("allelieferanten","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("inventursperre","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("inventurekaktiv","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("inventurek","text","","25","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("verwendeberechneterek","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("berechneterek","text","","7","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("berechneterekwaehrung","text","","6","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("vkmeldungunterdruecken","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("keinskonto","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLSelect("altersfreigabe",0,"altersfreigabe","","","0"); - $field->AddOption('',''); - $field->AddOption('{|ab 16|}','16'); - $field->AddOption('{|ab 18|}','18'); - $this->form->NewField($field); - - $field = new HTMLCheckbox("stueckliste","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("juststueckliste","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("keineeinzelartikelanzeigen","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("has_preproduced_partlist","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("preproduced_partlist","text","","","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("produktion","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("externeproduktion","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("rohstoffe","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("geraet","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("serviceartikel","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("gebuehr","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("dienstleistung","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("unikat","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("ohnepreisimpdf","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("formelmenge",2,50,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("formelpreis",2,50,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("intern_gesperrtgrund",4,50,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("intern_gesperrt","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("hinweis_einfuegen",4,50,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("freigabenotwendig","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("freigaberegel","text","","","","","","","","","","0","",""); - $this->form->NewField($field); - - - $field = new HTMLInput("name_en","text","","70","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLTextarea("kurztext_en",2,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("anabregs_text_en",5,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("uebersicht_de",2,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("uebersicht_en",2,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("beschreibung_de",3,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("beschreibung_en",3,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("links_de",2,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("links_en",2,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("startseite_de",2,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("startseite_en",2,25,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("metatitle_de",1,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("metatitle_en",1,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("metadescription_de",2,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("metadescription_en",2,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("metakeywords_de",2,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("metakeywords_en",2,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("katalog","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("katalogbezeichnung_de","text","","70","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("katalogbezeichnung_en","text","","70","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLTextarea("katalogtext_de",6,70,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("katalogtext_en",6,70,"","","","","0"); - $this->form->NewField($field); - - - $field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","",""); - $this->form->NewField($field); - - - $field = new HTMLInput("shop","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("shop2","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("shop3","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("autolagerlampe","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("restmenge","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("pseudolager",3,20,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLInput("lieferzeitmanuell","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("bestandalternativartikel","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("lagerkorrekturwert","text","","20","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("partnerprogramm_sperre","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("neu","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("topseller","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("startseite","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("downloadartikel","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("ausverkauft","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("inaktiv","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("pseudopreis","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("generierenummerbeioption","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("variante_kopie","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("unikatbeikopie","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("autoabgleicherlaubt","","","1","0","0"); - $this->form->NewField($field); - - $field = new HTMLSelect("steuer_art_produkt",0,"steuer_art_produkt","","","0"); - $field->AddOption('Physisches Produkt','1'); - $field->AddOption('Digitaler Inhalt','2'); - $field->AddOption('Dienstleistung','3'); - $this->form->NewField($field); - - $field = new HTMLSelect("steuer_art_produkt_download",0,"steuer_art_produkt_download","","","0"); - $field->AddOption('Download','1'); - $field->AddOption('eBook','2'); - $this->form->NewField($field); - - - $field = new HTMLInput("steuersatz_erloese_normal","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_normal","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_normal","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz_erloese_ermaessigt","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_ermaessigt","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_ermaessigt","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_nichtsteuerbar","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_nichtsteuerbar","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_steuerfrei","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_steuerfrei","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz_erloese_innergemeinschaftlich","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_innergemeinschaftlich","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuertext_innergemeinschaftlich","text","","30","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_innergemeinschaftlich","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz_erloese_eunormal","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_eunormal","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_eunormal","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz_erloese_euermaessigt","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_euermaessigt","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_euermaessigt","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuersatz_erloese_export","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_erloese_inland_export","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuertext_export","text","","30","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuer_aufwendung_inland_import","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("steuergruppe","text","","30","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("kostenstelle","text","","30","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("onlinshopspopup_sid","hidden","","","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("onlinshopspopup_shop","text","","40","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_aktiv","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_ausartikel","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLTextarea("onlinshopspopup_pseudolager",0,0,"","","","","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_autolagerlampe","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_restmenge","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("onlinshopspopup_lieferzeitmanuell","text","","40","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLInput("onlinshopspopup_pseudopreis","text","","40","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_generierenummerbeioption","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_variante_kopie","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_unikat","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_unikatbeikopie","","","","0","0"); - $this->form->NewField($field); - - $field = new HTMLInput("onlinshopspopup_lagerkorrekturwert","text","","10","","","","","","","","0","",""); - $this->form->NewField($field); - - $field = new HTMLCheckbox("onlinshopspopup_autoabgeleicherlaubt","","","","0","0"); - $this->form->NewField($field); - - } - -} - -?> \ No newline at end of file +app = $app; + $this->parsetarget = $parsetarget; + $this->Form(); + } + + public function artikelDelete() + { + + $this->form->Execute("artikel","delete"); + + $this->artikelList(); + } + + function Edit() + { + $this->form->Edit(); + } + + function Copy() + { + $this->form->Copy(); + } + + public function Create() + { + $this->form->Create(); + } + + public function Search() + { + $this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE"); + } + + public function Summary() + { + $this->app->Tpl->Set($this->parsetarget,"grosse Tabelle"); + } + + function Form() + { + $this->form = $this->app->FormHandler->CreateNew("artikel"); + $this->form->UseTable("artikel"); + $this->form->UseTemplate("artikel.tpl",$this->parsetarget); + + $field = new HTMLInput("leerfeld","hidden","","","","","","","","","","0","",""); + $this->form->NewField($field); + + + $field = new HTMLInput("name_de","text","","70","","","","","","","","0","",""); + $this->form->NewField($field); + $this->form->AddMandatory("name_de","notempty","Pflichtfeld!","MSGNAME_DE"); + + $field = new HTMLInput("nummer","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("projekt","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLSelect("typ",0,"typ","","","0"); + $this->form->NewField($field); + + $field = new HTMLInput("adresse","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLTextarea("anabregs_text",5,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("kurztext_de",2,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("internerkommentar",4,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLInput("hersteller","text","","40","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("herstellerlink","text","","40","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("herstellernummer","text","","35","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("ean","text","","35","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("zolltarifnummer","text","","35","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("herkunftsland","text","","35","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLSelect("ursprungsregion",0,"ursprungsregion","","","0"); + $field->AddOption('{|Bitte wählen|}',''); + $field->AddOption('01 Schleswig-Holstein','01'); + $field->AddOption('02 Hamburg','02'); + $field->AddOption('03 Niedersachsen','03'); + $field->AddOption('04 Bremen','04'); + $field->AddOption('05 Nordrhein-Westfalen','05'); + $field->AddOption('06 Hessen','06'); + $field->AddOption('07 Rheinland-Pfalz','07'); + $field->AddOption('08 Baden-Württemberg','08'); + $field->AddOption('09 Bayern','09'); + $field->AddOption('10 Saarland','10'); + $field->AddOption('11 Berlin','11'); + $field->AddOption('12 Brandenburg','12'); + $field->AddOption('13 Mecklenburg-Vorpommern','13'); + $field->AddOption('14 Sachsen','14'); + $field->AddOption('15 Sachsen-Anhalt','15'); + $field->AddOption('16 Thüringen','16'); + $field->AddOption('99 ausländischer Ursprung','99'); + $this->form->NewField($field); + + $field = new HTMLInput("mindestlager","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("gewicht","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("mindestbestellung","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("nettogewicht","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("lager_platz","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("laenge","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("einheit","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("breite","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("xvp","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("hoehe","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLSelect("abckategorie",0,"abckategorie","","","0"); + $field->AddOption('{|keine|}',''); + $field->AddOption('A','A'); + $field->AddOption('B','B'); + $field->AddOption('C','C'); + $this->form->NewField($field); + + $field = new HTMLCheckbox("lagerartikel","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("porto","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("rabatt","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("rabatt_prozent","text","","4","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("variante","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("variante_von","text","","35","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("matrixprodukt","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("tagespreise","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0"); + $field->AddOption('{|normal|}','normal'); + $field->AddOption('{|ermäßigt|}','ermaessigt'); + $field->AddOption('{|befreit|}','befreit'); + $this->form->NewField($field); + + $field = new HTMLCheckbox("anderersteuersatz","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("provisionssperre","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLSelect("chargenverwaltung",0,"chargenverwaltung","","","0"); + $field->AddOption('{|nein|}','0'); + $field->AddOption('{|ja|}','1'); + $field->AddOption('{|originale nutzen|}','2'); + $this->form->NewField($field); + + $field = new HTMLSelect("seriennummern",0,"seriennummern","","","0"); + $field->AddOption('{|keine|}','keine'); + $field->AddOption('{|eigene erzeugen|}','eigene'); + $field->AddOption('{|originale nutzen|}','vomprodukt'); + $field->AddOption('{|originale einlagern + nutzen|}','vomprodukteinlagern'); + $this->form->NewField($field); + + $field = new HTMLCheckbox("mindesthaltbarkeitsdatum","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("allelieferanten","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("inventursperre","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("inventurekaktiv","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("inventurek","text","","25","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("verwendeberechneterek","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("berechneterek","text","","7","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("berechneterekwaehrung","text","","6","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("vkmeldungunterdruecken","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("keinskonto","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLSelect("altersfreigabe",0,"altersfreigabe","","","0"); + $field->AddOption('',''); + $field->AddOption('{|ab 16|}','16'); + $field->AddOption('{|ab 18|}','18'); + $this->form->NewField($field); + + $field = new HTMLCheckbox("stueckliste","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("juststueckliste","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("keineeinzelartikelanzeigen","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("has_preproduced_partlist","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("preproduced_partlist","text","","","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("produktion","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("externeproduktion","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("rohstoffe","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("geraet","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("serviceartikel","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("gebuehr","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("dienstleistung","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("unikat","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("ohnepreisimpdf","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("formelmenge",2,50,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("formelpreis",2,50,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("intern_gesperrtgrund",4,50,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("intern_gesperrt","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("hinweis_einfuegen",4,50,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("freigabenotwendig","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("freigaberegel","text","","","","","","","","","","0","",""); + $this->form->NewField($field); + + + $field = new HTMLInput("name_en","text","","70","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLTextarea("kurztext_en",2,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("anabregs_text_en",5,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("uebersicht_de",2,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("uebersicht_en",2,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("beschreibung_de",3,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("beschreibung_en",3,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("links_de",2,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("links_en",2,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("startseite_de",2,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("startseite_en",2,25,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("metatitle_de",1,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("metatitle_en",1,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("metadescription_de",2,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("metadescription_en",2,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("metakeywords_de",2,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("metakeywords_en",2,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("katalog","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("katalogbezeichnung_de","text","","70","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("katalogbezeichnung_en","text","","70","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLTextarea("katalogtext_de",6,70,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("katalogtext_en",6,70,"","","","","0"); + $this->form->NewField($field); + + + $field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","",""); + $this->form->NewField($field); + + + $field = new HTMLInput("shop","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("shop2","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("shop3","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("autolagerlampe","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("restmenge","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("pseudolager",3,20,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLInput("lieferzeitmanuell","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("bestandalternativartikel","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("lagerkorrekturwert","text","","20","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("partnerprogramm_sperre","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("neu","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("topseller","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("startseite","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("downloadartikel","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("ausverkauft","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("inaktiv","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("pseudopreis","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("generierenummerbeioption","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("variante_kopie","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("unikatbeikopie","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("autoabgleicherlaubt","","","1","0","0"); + $this->form->NewField($field); + + $field = new HTMLSelect("steuer_art_produkt",0,"steuer_art_produkt","","","0"); + $field->AddOption('Physisches Produkt','1'); + $field->AddOption('Digitaler Inhalt','2'); + $field->AddOption('Dienstleistung','3'); + $this->form->NewField($field); + + $field = new HTMLSelect("steuer_art_produkt_download",0,"steuer_art_produkt_download","","","0"); + $field->AddOption('Download','1'); + $field->AddOption('eBook','2'); + $this->form->NewField($field); + + + $field = new HTMLInput("steuersatz_erloese_normal","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_normal","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_normal","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz_erloese_ermaessigt","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_ermaessigt","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_ermaessigt","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_nichtsteuerbar","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_nichtsteuerbar","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_steuerfrei","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_steuerfrei","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz_erloese_innergemeinschaftlich","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_innergemeinschaftlich","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuertext_innergemeinschaftlich","text","","30","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_innergemeinschaftlich","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz_erloese_eunormal","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_eunormal","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_eunormal","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz_erloese_euermaessigt","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_euermaessigt","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_euermaessigt","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuersatz_erloese_export","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_erloese_inland_export","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuertext_export","text","","30","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuer_aufwendung_inland_import","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("steuergruppe","text","","30","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("sachkonto","text","","30","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("kostenstelle","text","","30","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("onlinshopspopup_sid","hidden","","","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("onlinshopspopup_shop","text","","40","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_aktiv","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_ausartikel","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLTextarea("onlinshopspopup_pseudolager",0,0,"","","","","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_autolagerlampe","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_restmenge","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("onlinshopspopup_lieferzeitmanuell","text","","40","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLInput("onlinshopspopup_pseudopreis","text","","40","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_generierenummerbeioption","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_variante_kopie","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_unikat","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_unikatbeikopie","","","","0","0"); + $this->form->NewField($field); + + $field = new HTMLInput("onlinshopspopup_lagerkorrekturwert","text","","10","","","","","","","","0","",""); + $this->form->NewField($field); + + $field = new HTMLCheckbox("onlinshopspopup_autoabgeleicherlaubt","","","","0","0"); + $this->form->NewField($field); + + } + +} + +?> diff --git a/www/widgets/templates/_gen/artikel.tpl b/www/widgets/templates/_gen/artikel.tpl index 4cdaa479..a7cc327e 100644 --- a/www/widgets/templates/_gen/artikel.tpl +++ b/www/widgets/templates/_gen/artikel.tpl @@ -849,7 +849,87 @@ [DISABLECLOSESHOP]
    - +
    +
    +
    +
    +
    + {|Finanzbuchhaltung Export Erlöse|} + + + + + + + + + + + + + + + + + + + + + +
    Inland (normal):[STEUER_ERLOESE_INLAND_NORMAL][MSGSTEUER_ERLOESE_INLAND_NORMAL]
    Inland (ermäßigt):[STEUER_ERLOESE_INLAND_ERMAESSIGT][MSGSTEUER_ERLOESE_INLAND_ERMAESSIGT]
    Inland (steuerfrei):[STEUER_ERLOESE_INLAND_NICHTSTEUERBAR][MSGSTEUER_ERLOESE_INLAND_NICHTSTEUERBAR]
    Innergemeinschaftlich EU:[STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH][MSGSTEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH]
    EU (normal):[STEUER_ERLOESE_INLAND_EUNORMAL][MSGSTEUER_ERLOESE_INLAND_EUNORMAL]
    EU (ermäßigt):[STEUER_ERLOESE_INLAND_EUERMAESSIGT][MSGSTEUER_ERLOESE_INLAND_EUERMAESSIGT]
    Export:[STEUER_ERLOESE_INLAND_EXPORT][MSGSTEUER_ERLOESE_INLAND_EXPORT]
    +
    +
    +
    +
    +
    +
    + {|Finanzbuchhaltung Export Aufwendungen|} + + + + + + + + + + + + + + + + + + + + + + +
    Inland (normal):[STEUER_AUFWENDUNG_INLAND_NORMAL][MSGSTEUER_AUFWENDUNG_INLAND_NORMAL]
    Inland (ermäßigt):[STEUER_AUFWENDUNG_INLAND_ERMAESSIGT][MSGSTEUER_AUFWENDUNG_INLAND_ERMAESSIGT]
    Inland (steuefrei):[STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR][MSGSTEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR]
    Innergemeinschaftlich EU:[STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH][MSGSTEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH]
    EU (normal):[STEUER_AUFWENDUNG_INLAND_EUNORMAL][MSGSTEUER_AUFWENDUNG_INLAND_EUNORMAL]
    EU (ermäßigt):[STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT][MSGSTEUER_AUFWENDUNG_INLAND_EUERMAESSIGT]
    Import:[STEUER_AUFWENDUNG_INLAND_IMPORT][MSGSTEUER_AUFWENDUNG_INLAND_IMPORT]
    +
    +
    +
    +
    +
    +
    + {|Einstellungen|} + + + + + + + +
    Sachkonto für Verbindlichkeiten-Vorkontierung:[SACHKONTO]
    Kostenstelle:[KOSTENSTELLE]
    +
    +
    +
    +
    +
    +
    + +