X-Git-Url: https://git.infodrom.org/?p=misc%2Fhallinta-metro;a=blobdiff_plain;f=artikel.php;h=d7bcc76b8aec0b6f04777bb465e5384368c10b87;hp=577eae3c3ec127997fb475a12d5b6e0648fa5632;hb=44602f0fd181b7789ba4c5289d5dd4bc2526c7b1;hpb=a7c7cd8a381fbeade1d10f12a2ef49a02cb564a2
diff --git a/artikel.php b/artikel.php
index 577eae3..d7bcc76 100644
--- a/artikel.php
+++ b/artikel.php
@@ -1,13 +1,12 @@
add("
div#form_price {
padding-left: 10px;
padding-right: 10px;
font-size: 90%;
color: #555;
-}
-EOC;
+}");
$form = '
@@ -28,7 +27,7 @@ $form = '
';
-$javascript = <<add($jscode);
+$javascript->onLoad("\$('button_save').onclick = function () {return custom_save(this);};");
+$javascript->onLoad("\$('button_insert').onclick = function () {return custom_insert(this);};");
$buttons = <<
@@ -298,6 +296,10 @@ $mask = array(
'size' => 21,
'null' => true,
),
+ 'removed' => array(
+ 'name' => 'Artikel nicht mehr im Programm',
+ 'type' => 'boolean',
+ ),
'buttons' => array(
'type' => 'html',
'code' => $buttons,
@@ -308,27 +310,32 @@ $mask = array(
'title' => 'Preisverlauf',
'rows' => 5,
'table' => 'metro_artikel_preis',
+ 'table_edit' => 'metro_artikel_preis',
'where' => 'artikel = {id} ORDER BY datum DESC',
'list' => array(
'id' => array(
'name' => 'ID',
+ 'edit' => "Writeable:false, EntryType: 'H', Length: 4, isKey: true",
'visible' => false,
),
'datum' => array(
'name' => 'Datum',
'width' => 180,
+ 'edit' => "EntryType: 'T', isNullable: false, Writeable: true",
),
'steuersatz' => array(
'name' => 'Steuer',
'width' => 60,
'type' => 'number',
'specs' => "decPlaces: 2, ClassName: 'alignrightpad'",
+ 'edit' => "EntryType: 'T', isNullable: false, Writeable: true",
),
'preis' => array(
'name' => 'netto',
'width' => 60,
'type' => 'number',
'specs' => "decPlaces: 2, ClassName: 'alignrightpad'",
+ 'edit' => "EntryType: 'T', isNullable: false, Writeable: true",
),
'brutto' => array(
'name' => 'Preis',