public function getPosten(GRLBM $Beleg) { $T = new HTMLTable(1, "Arbeitsbeschreibung"); $T->setTableStyle("width:100%;"); $tinyMCEID = "tinyMCE" . rand(100, 90000000); $I = new HTMLInput("textbausteinUnten", "textarea", $Beleg->A("textbausteinUnten")); $I->style("width:100%;height:300px;margin-left:10px;"); $I->id($tinyMCEID); $T->addRow(array($I)); $buttons = "undo redo | pastetext | styleselect fontsizeselect fontselect | bold italic underline forecolor | hr"; return $T . parent::getPosten($Beleg) . OnEvent::script("if(CCAuftrag.lastTextbausteinUnten != null) \$('[name=textbausteinUnten]').val(CCAuftrag.lastTextbausteinUnten); CCAuftrag.lastTextbausteinUnten = null;" . tinyMCEGUI::editorDokument($tinyMCEID, "function(content){}", $buttons, "../../styles/tinymce/email.css")); }
public function getPDF($data) { if (!$this->loggedIn) { return "TIMEOUT"; } $G = new GRLBM($data["GRLBMID"]); $Auftrag = new Auftrag($G->A("AuftragID")); $brief = $Auftrag->getLetter("", false, $data["GRLBMID"]); $brief->generate(false, null); }
public function cancelAuftrag($data) { $Beleg = new GRLBM($data["GRLBMID"]); $Auftrag = new Auftrag($Beleg->A("AuftragID")); $Beleg->deleteMe(); $Auftrag->deleteMe(); }
function handleLieferung($data) { if (!$this->loggedIn) { return "TIMEOUT"; } $GRLBMID = $data["GRLBMID"]; unset($data["GRLBMID"]); $ACP = anyC::get("Posten", "GRLBMID", $GRLBMID); $ACP->addOrderV3("PostenID"); $ACP->addAssocV3("useForLieferung", "=", "1"); while ($P = $ACP->n()) { $P->deleteMe(); } $G = new GRLBM($GRLBMID, false); $A = new Auftrag($G->A("AuftragID")); foreach ($data as $Artikel => $menge) { if ($menge == "0") { continue; } if (strpos($Artikel, "Artikel_") === false) { continue; } $ex = explode("_", $Artikel); $G->addArtikel($ex[1], $menge, null, $A->A("kundennummer")); } die("<p class=\"confirm\" style=\"margin-top:10px;\">Lieferung gespeichert!</p>"); }