diff --git a/www/app/entity/doc/task.php b/www/app/entity/doc/task.php index 5e49ab11d..2236fd106 100644 --- a/www/app/entity/doc/task.php +++ b/www/app/entity/doc/task.php @@ -20,7 +20,8 @@ public function generateReport() { $detail = array(); foreach ($this->unpackDetails('detaildata') as $ser) { - + if($ser->cost=="") $ser->cost=0; + if($ser->hours=="") $ser->hours=0; $detail[] = array("no" => $i++, "service_name" => $ser->service_name, "cost" => H::fa($ser->cost * $ser->qty), diff --git a/www/app/pages/reference/itemlist.php b/www/app/pages/reference/itemlist.php index cf5401bbb..e312dc549 100644 --- a/www/app/pages/reference/itemlist.php +++ b/www/app/pages/reference/itemlist.php @@ -281,6 +281,10 @@ public function OnSubmit($sender) { } $this->_item->itemname = $this->itemdetail->editname->getText(); + if(strlen($this->_item->itemname)==0) { + $this->setError('entername'); + return; + } $this->_item->shortname = $this->itemdetail->editshortname->getText(); $this->_item->cat_id = $this->itemdetail->editcat->getValue(); $this->_item->price1 = $this->itemdetail->editprice1->getText(); diff --git a/www/app/pages/reference/mflist.php b/www/app/pages/reference/mflist.php index 35b4ffd1d..ab0bc61e4 100644 --- a/www/app/pages/reference/mflist.php +++ b/www/app/pages/reference/mflist.php @@ -40,7 +40,7 @@ public function __construct() { $this->mfdetail->add(new TextInput('editmf_name')); $this->mfdetail->add(new DropDownChoice('editbranch', $this->_blist, 0)); - $this->mfdetail->add(new CheckBox('editbeznal')); + $this->mfdetail->add(new CheckBox('editbeznal'))->onChange($this,'onBeznal'); $this->mfdetail->add(new TextInput('editbtran')); $this->mfdetail->add(new TextArea('editmf_description')); $this->mfdetail->add(new TextInput('editbank')); @@ -86,7 +86,7 @@ public function editOnClick($sender) { $this->mfdetail->editmf_name->setText($this->_mf->mf_name); $this->mfdetail->editbranch->setValue($this->_mf->branch_id); $this->mfdetail->editbeznal->setChecked($this->_mf->beznal); - + $this->onBeznal($this->mfdetail->editbeznal); $this->mfdetail->editmf_description->setText($this->_mf->mf_description); $this->mfdetail->editbank->setText($this->_mf->bank); $this->mfdetail->editbankacc->setText($this->_mf->bankacc); @@ -109,6 +109,10 @@ public function saveOnClick($sender) { } $this->_mf->mf_name = $this->mfdetail->editmf_name->getText(); + if(strlen($this->_mf->mf_name)==0) { + $this->setError('entername'); + return; + } $this->_mf->btran = $this->mfdetail->editbtran->getText(); $this->_mf->bank = $this->mfdetail->editbank->getText(); $this->_mf->bankacc = $this->mfdetail->editbankacc->getText(); @@ -135,5 +139,12 @@ public function cancelOnClick($sender) { $this->mftable->setVisible(true); $this->mfdetail->setVisible(false); } + + public function onBeznal($sender) { + $b = $sender->isChecked(); + $this->mfdetail->editbank->setVisible($b); + $this->mfdetail->editbankacc->setVisible($b); + $this->mfdetail->editbtran->setVisible($b); + } } diff --git a/www/templates/pages/reference/itemlist.html b/www/templates/pages/reference/itemlist.html index e63e643a3..d96b55124 100644 --- a/www/templates/pages/reference/itemlist.html +++ b/www/templates/pages/reference/itemlist.html @@ -109,7 +109,7 @@

Редактирование товара

- +
diff --git a/www/templates/pages/reference/mflist.html b/www/templates/pages/reference/mflist.html index 7a8a4dfcc..d108f3b70 100644 --- a/www/templates/pages/reference/mflist.html +++ b/www/templates/pages/reference/mflist.html @@ -47,7 +47,7 @@

Кассы и банковские счета

- +
@@ -55,15 +55,15 @@

Кассы и банковские счета

- +
- +
- + Процент, который банк берет за перевод суммы. Учитывается как общепроизводственные расходы
diff --git a/www/templates_ua/pages/reference/itemlist.html b/www/templates_ua/pages/reference/itemlist.html index 0ace6ca88..3cec193c2 100644 --- a/www/templates_ua/pages/reference/itemlist.html +++ b/www/templates_ua/pages/reference/itemlist.html @@ -109,7 +109,7 @@

Редагування товару

- +
diff --git a/www/templates_ua/pages/reference/mflist.html b/www/templates_ua/pages/reference/mflist.html index bd664d67d..6a5133a24 100644 --- a/www/templates_ua/pages/reference/mflist.html +++ b/www/templates_ua/pages/reference/mflist.html @@ -47,7 +47,7 @@

Каси та банкiвскi рахунки

- +
@@ -55,15 +55,15 @@

Каси та банкiвскi рахунки

- +
- +
- + Процент, який банк бере за перевод суммы.