diff --git a/db/db.sql b/db/db.sql index 2ffc8795a..9e277b6f6 100644 --- a/db/db.sql +++ b/db/db.sql @@ -335,7 +335,7 @@ CREATE TABLE `filesdata` ( `file_id` int(11) DEFAULT NULL, `filedata` longblob, UNIQUE KEY `file_id` (`file_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=MYISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `firms`; /*!40101 SET @saved_cs_client = @@character_set_client */; diff --git a/db/initdata.sql b/db/initdata.sql index 3ab0a982f..684ac29be 100644 --- a/db/initdata.sql +++ b/db/initdata.sql @@ -15,8 +15,8 @@ INSERT INTO `firms` ( `firm_name`, `details`, `disabled`) VALUES( 'Наша INSERT INTO `customers` ( `customer_name`, `detail`, `email`, `phone`, `status`, `city`, `leadstatus`, `leadsource`, `createdon`) VALUES( 'Физ. лицо', '000014
', '', '', 0, '', NULL, NULL, '2021-04-28'); +INSERT INTO `options` (`optname`, `optvalue`) VALUES('common', 'a:30:{s:9:"qtydigits";s:1:"0";s:8:"amdigits";s:1:"0";s:10:"dateformat";s:5:"d.m.Y";s:11:"partiontype";s:1:"1";s:4:"curr";s:2:"gr";s:6:"phonel";s:2:"10";s:6:"price1";s:18:"Розничная";s:6:"price2";s:14:"Оптовая";s:6:"price3";s:0:"";s:6:"price4";s:0:"";s:6:"price5";s:0:"";s:8:"defprice";s:2:"10";s:8:"shopname";s:20:"Наша фирма";s:8:"ts_break";s:2:"60";s:8:"ts_start";s:5:"09:00";s:6:"ts_end";s:5:"18:00";s:11:"checkslogan";s:8:"Тест";s:11:"autoarticle";i:1;s:10:"usesnumber";i:0;s:10:"usescanner";i:0;s:9:"useimages";i:0;s:15:"showactiveusers";i:0;s:10:"usecattree";i:0;s:9:"usebranch";i:0;s:10:"noallowfiz";i:0;s:10:"allowminus";i:1;s:6:"useval";i:0;s:6:"capcha";i:0;s:9:"numberttn";i:0;s:11:"salesources";a:1:{i:1620576897;O:12:"App\\DataItem":2:{s:2:"id";i:1620576897;s:9:"\0*\0fields";a:1:{s:4:"name";s:31:"Основной магазин";}}}}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('api', 'a:3:{s:3:"exp";N;s:3:"key";N;s:5:"atype";s:1:"3";}'); -INSERT INTO `options` (`optname`, `optvalue`) VALUES('common', 'a:28:{s:9:"qtydigits";s:1:"0";s:8:"amdigits";s:1:"0";s:10:"dateformat";s:5:"d.m.Y";s:11:"partiontype";s:1:"1";s:4:"curr";s:2:"gr";s:6:"phonel";s:2:"10";s:6:"price1";s:18:"Розничная";s:6:"price2";s:14:"Оптовая";s:6:"price3";s:0:"";s:6:"price4";s:0:"";s:6:"price5";s:0:"";s:8:"defprice";s:2:"10";s:8:"shopname";s:20:"Наша фирма";s:8:"ts_break";s:2:"60";s:8:"ts_start";s:5:"09:00";s:6:"ts_end";s:5:"18:00";s:11:"autoarticle";i:1;s:10:"usesnumber";i:0;s:10:"usescanner";i:0;s:9:"useimages";i:0;s:16:"usemobileprinter";i:0;s:10:"usecattree";i:0;s:9:"usebranch";i:0;s:10:"noallowfiz";i:0;s:10:"allowminus";i:1;s:6:"useval";i:0;s:6:"capcha";i:0;s:9:"numberttn";i:0;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('printer', 'a:8:{s:6:"pwidth";s:4:"100%";s:9:"pricetype";s:6:"price1";s:11:"barcodetype";s:5:"EAN13";s:9:"pfontsize";s:2:"16";s:5:"pname";i:1;s:5:"pcode";i:0;s:8:"pbarcode";i:1;s:6:"pprice";i:0;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('shop', 'a:8:{s:7:"defcust";s:1:"2";s:12:"defpricetype";s:6:"price1";s:5:"email";s:0:"";s:8:"shopname";s:17:"Наш магаз";s:12:"currencyname";s:6:"грн";s:8:"uselogin";i:0;s:9:"usefilter";i:1;s:11:"usefeedback";i:1;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('sms', 'a:7:{s:13:"turbosmstoken";s:0:"";s:12:"smssemytoken";s:0:"";s:12:"smssemydevid";s:0:"";s:11:"flysmslogin";s:0:"";s:10:"flysmspass";s:0:"";s:8:"flysmsan";s:0:"";s:7:"smstype";s:1:"0";}'); diff --git a/db/initdata_ua.sql b/db/initdata_ua.sql index 33cdc9bef..980bcdce8 100644 --- a/db/initdata_ua.sql +++ b/db/initdata_ua.sql @@ -14,8 +14,8 @@ INSERT INTO `firms` ( `firm_name`, `details`, `disabled`) VALUES( 'Наша INSERT INTO `customers` ( `customer_name`, `detail`, `email`, `phone`, `status`, `city`, `leadstatus`, `leadsource`, `createdon`) VALUES( 'Фiз. особа', '000014
', '', '', 0, '', NULL, NULL, '2021-04-28'); +INSERT INTO `options` (`optname`, `optvalue`) VALUES('common', 'a:30:{s:9:"qtydigits";s:1:"0";s:8:"amdigits";s:1:"0";s:10:"dateformat";s:5:"d.m.Y";s:11:"partiontype";s:1:"1";s:4:"curr";s:2:"gr";s:6:"phonel";s:2:"10";s:6:"price1";s:18:"Розничная";s:6:"price2";s:14:"Оптовая";s:6:"price3";s:0:"";s:6:"price4";s:0:"";s:6:"price5";s:0:"";s:8:"defprice";s:2:"10";s:8:"shopname";s:20:"Наша фирма";s:8:"ts_break";s:2:"60";s:8:"ts_start";s:5:"09:00";s:6:"ts_end";s:5:"18:00";s:11:"checkslogan";s:8:"Тест";s:11:"autoarticle";i:1;s:10:"usesnumber";i:0;s:10:"usescanner";i:0;s:9:"useimages";i:0;s:15:"showactiveusers";i:0;s:10:"usecattree";i:0;s:9:"usebranch";i:0;s:10:"noallowfiz";i:0;s:10:"allowminus";i:1;s:6:"useval";i:0;s:6:"capcha";i:0;s:9:"numberttn";i:0;s:11:"salesources";a:1:{i:1620576897;O:12:"App\\DataItem":2:{s:2:"id";i:1620576897;s:9:"\0*\0fields";a:1:{s:4:"name";s:31:"Основной магазин";}}}}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('api', 'a:3:{s:3:"exp";N;s:3:"key";N;s:5:"atype";s:1:"3";}'); -INSERT INTO `options` (`optname`, `optvalue`) VALUES('common', 'a:28:{s:9:"qtydigits";s:1:"0";s:8:"amdigits";s:1:"0";s:10:"dateformat";s:5:"d.m.Y";s:11:"partiontype";s:1:"1";s:4:"curr";s:2:"gr";s:6:"phonel";s:2:"10";s:6:"price1";s:18:"Розничная";s:6:"price2";s:14:"Оптовая";s:6:"price3";s:0:"";s:6:"price4";s:0:"";s:6:"price5";s:0:"";s:8:"defprice";s:2:"10";s:8:"shopname";s:20:"Наша фирма";s:8:"ts_break";s:2:"60";s:8:"ts_start";s:5:"09:00";s:6:"ts_end";s:5:"18:00";s:11:"autoarticle";i:1;s:10:"usesnumber";i:0;s:10:"usescanner";i:0;s:9:"useimages";i:0;s:16:"usemobileprinter";i:0;s:10:"usecattree";i:0;s:9:"usebranch";i:0;s:10:"noallowfiz";i:0;s:10:"allowminus";i:1;s:6:"useval";i:0;s:6:"capcha";i:0;s:9:"numberttn";i:0;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('printer', 'a:8:{s:6:"pwidth";s:4:"100%";s:9:"pricetype";s:6:"price1";s:11:"barcodetype";s:5:"EAN13";s:9:"pfontsize";s:2:"16";s:5:"pname";i:1;s:5:"pcode";i:0;s:8:"pbarcode";i:1;s:6:"pprice";i:0;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('shop', 'a:8:{s:7:"defcust";s:1:"2";s:12:"defpricetype";s:6:"price1";s:5:"email";s:0:"";s:8:"shopname";s:17:"Наш магаз";s:12:"currencyname";s:6:"грн";s:8:"uselogin";i:0;s:9:"usefilter";i:1;s:11:"usefeedback";i:1;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('sms', 'a:7:{s:13:"turbosmstoken";s:0:"";s:12:"smssemytoken";s:0:"";s:12:"smssemydevid";s:0:"";s:11:"flysmslogin";s:0:"";s:10:"flysmspass";s:0:"";s:8:"flysmsan";s:0:"";s:7:"smstype";s:1:"0";}'); diff --git a/db/temp.sql b/db/temp.sql index 28bb0bf38..347f06c74 100644 --- a/db/temp.sql +++ b/db/temp.sql @@ -20,6 +20,49 @@ alter VIEW `timesheet_view` AS `timesheet` `t` join `employees` `e` on `t`.`emp_id` = `e`.`employee_id` left join branches b on t.branch_id = b.branch_id; +ALTER TABLE `customers` ADD `country` VARCHAR(255) NULL ; + +ALTER VIEW `customers_view` AS + select + `customers`.`customer_id` AS `customer_id`, + `customers`.`customer_name` AS `customer_name`, + `customers`.`detail` AS `detail`, + `customers`.`email` AS `email`, + `customers`.`phone` AS `phone`, + `customers`.`status` AS `status`, + `customers`.`city` AS `city`, + `customers`.`leadsource` AS `leadsource`, + `customers`.`leadstatus` AS `leadstatus`, + `customers`.`country` AS `country`, + ( + select + count(0) + from + `messages` `m` + where + ((`m`.`item_id` = `customers`.`customer_id`) and (`m`.`item_type` = 2))) AS `mcnt`,( + select + count(0) + from + `files` `f` + where + ((`f`.`item_id` = `customers`.`customer_id`) and (`f`.`item_type` = 2))) AS `fcnt`,( + select + count(0) + from + `eventlist` `e` + where + ((`e`.`customer_id` = `customers`.`customer_id`) and (`e`.`eventdate` >= now()))) AS `ecnt` + from + `customers`; + + + + + + + + /* CREATE TABLE `empacc` ( diff --git a/www/app/api/base/restful.php b/www/app/api/base/restful.php index 43ec1816c..662eb21f2 100644 --- a/www/app/api/base/restful.php +++ b/www/app/api/base/restful.php @@ -28,19 +28,30 @@ public function Execute($params) { $this->put($params); }; } - + /** + * @param array $params + */ public function get($params) { $this->FailAnswer(); } + /** + * @param array $params + */ public function post($params) { $this->FailAnswer(); } + /** + * @param array $params + */ public function put($params) { $this->FailAnswer(); } + /** + * @param array $params + */ public function delete($params) { $this->FailAnswer(); } @@ -64,6 +75,7 @@ protected function TextAnswer($text) { header("Content-type: text/plain"); echo $text; } + protected function OKAnswer() { http_response_code(200); diff --git a/www/app/api/testclass.php b/www/app/api/testclass.php index 3e9d0b2b9..72e8974b1 100644 --- a/www/app/api/testclass.php +++ b/www/app/api/testclass.php @@ -3,8 +3,8 @@ namespace App\API; /** - * Пример использования произвольного кастомного класса в API - * пример вызова /api/TestClass/Hello/1 + * Пример использования произвольного кастомного класса возвращающего произвольные данные + * пример вызова /api/TestClass/Hello/1 (параметры всегда должны быть через /) */ class TestClass { diff --git a/www/app/api/testrest.php b/www/app/api/testrest.php index 600504127..de5007eae 100644 --- a/www/app/api/testrest.php +++ b/www/app/api/testrest.php @@ -4,7 +4,7 @@ /** * пример Rest API - * вызов /api/TestRest/1/2 + * вызов /api/TestRest/1/2 (параметры всегда должны быть через /) */ class TestRest extends \App\API\Base\RestFul { diff --git a/www/app/entity/customer.php b/www/app/entity/customer.php index e39c00a66..0e6beffcb 100644 --- a/www/app/entity/customer.php +++ b/www/app/entity/customer.php @@ -132,7 +132,7 @@ public static function getList($search = '', $type = 0) { $where .= " and (detail like '%{$type}%' or detail like '%0%' ) "; } - return Customer::findArray("customer_name", $where, "customer_name"); + return Customer::findArray("concat(customer_name,' ',phone)", $where, "customer_name"); } public static function getHoldList($type = 0) { diff --git a/www/app/entity/doc/document.php b/www/app/entity/doc/document.php index ba7dbf1ee..2172ac9d3 100644 --- a/www/app/entity/doc/document.php +++ b/www/app/entity/doc/document.php @@ -149,7 +149,7 @@ private function packData() { $this->content .= ""; } - + // select ExtractValue(@xml, '//doc/header/customer_id') from documents /** * распаковка из XML * diff --git a/www/app/entity/doc/outsalary.php b/www/app/entity/doc/outsalary.php index 64eb13c45..419d2f2a2 100644 --- a/www/app/entity/doc/outsalary.php +++ b/www/app/entity/doc/outsalary.php @@ -15,7 +15,7 @@ class OutSalary extends Document public function Execute() { - $payed = Pay::addPayment($this->document_id, $this->document_date, 0 - $this->amount, $this->headerdata['payment'], \App\Entity\Pay::PAY_SALARY_OUTCOME); + $payed = Pay::addPayment($this->document_id, $this->document_date, 0 - $this->amount, $this->headerdata['payment'], \App\Entity\Pay::PAY_SALARY_OUTCOME,$this->notes); if ($payed > 0) { $this->payed = $payed; } diff --git a/www/app/entity/entry.php b/www/app/entity/entry.php index 99d78dd1f..2569f8afa 100644 --- a/www/app/entity/entry.php +++ b/www/app/entity/entry.php @@ -18,7 +18,7 @@ class Entry extends \ZCL\DB\Entity * @param mixed $amount Сумма. * @param mixed $quantity количество */ - public function __construct($document_id = 0, $amount = 0, $quantity = 0) { + public function __construct($document_id=0 , $amount = 0, $quantity = 0) { parent::__construct(); $this->document_id = $document_id; @@ -44,13 +44,7 @@ public function setStock($stock_id) { $this->stock_id = $stock_id; } - public function setEmployee($employee_id) { - $this->employee_id = $employee_id; - } - - public function setCustomer($customer_id) { - $this->customer_id = $customer_id; - } + public function setService($service_id) { $this->service_id = $service_id; diff --git a/www/app/entity/event.php b/www/app/entity/event.php index 38da155c9..245597574 100644 --- a/www/app/entity/event.php +++ b/www/app/entity/event.php @@ -23,5 +23,13 @@ protected function init() { protected function afterLoad() { $this->eventdate = strtotime($this->eventdate); } + + + public static function isNotClosedTask($user_id){ + $conn = \ZCL\DB\DB::getConnect(); + $cnt = Event::findCnt("isdone<>1 and user_id={$user_id} "); + return $cnt; + + } } diff --git a/www/app/entity/item.php b/www/app/entity/item.php index 3d60f4f38..e5885b8b1 100644 --- a/www/app/entity/item.php +++ b/www/app/entity/item.php @@ -54,6 +54,7 @@ protected function afterLoad() { $this->weight = (string)$xml->weight[0]; $this->maxsize = (string)$xml->maxsize[0]; $this->volume = (string)$xml->volume[0]; + $this->lost = (string)$xml->lost[0]; $this->customsize = (string)$xml->customsize[0]; $this->manufacturer = (string)$xml->manufacturer[0]; $this->shortname = (string)$xml->shortname[0]; @@ -123,6 +124,7 @@ protected function beforeSave() { $this->detail .= "{$this->weight}"; $this->detail .= "{$this->maxsize}"; $this->detail .= "{$this->volume}"; + $this->detail .= "{$this->lost}"; $this->detail .= "{$this->customsize}"; $this->detail .= "{$this->sef}"; diff --git a/www/app/entity/pay.php b/www/app/entity/pay.php index 5e6ed6738..44c1dedcf 100644 --- a/www/app/entity/pay.php +++ b/www/app/entity/pay.php @@ -116,7 +116,7 @@ public static function addPayment($document_id, $paydate, $amount, $mf_id, $type $conn = \ZDB\DB::getConnect(); - $sql = "select coalesce(abs(sum(amount)),0) from paylist where document_id=" . $document_id; + $sql = "select coalesce(abs(sum(amount)),0) from paylist where paytype <> ".Pay::PAY_BANK." and document_id=" . $document_id; $payed = $conn->GetOne($sql); $conn->Execute("update documents set payed={$payed} where document_id =" . $document_id); return $payed; diff --git a/www/app/entity/stock.php b/www/app/entity/stock.php index 7c0479391..756bb41fe 100644 --- a/www/app/entity/stock.php +++ b/www/app/entity/stock.php @@ -135,6 +135,12 @@ public static function pickup($store_id, $item) { $stlist = self::find($where, ' stock_id '); + //учитываем отходы + if($item->lost >0){ + $k = 1/(1-$item->lost/100) ; + $item->quantity = \App\Helper::fqty($item->quantity*$k); + } + $qty = $item->quantity; $last = null; foreach ($stlist as $st) { diff --git a/www/app/entity/user.php b/www/app/entity/user.php index 81fbf980c..ca8f21797 100644 --- a/www/app/entity/user.php +++ b/www/app/entity/user.php @@ -20,6 +20,7 @@ protected function init() { $this->user_id = 0; $this->defstore = 0; $this->defmf = 0; + $this->defsalesource = 0; $this->deffirm = 0; $this->hidesidebar = 0; $this->pagesize = 25; @@ -87,6 +88,7 @@ protected function afterLoad() { $this->deffirm = (int)$options['deffirm']; $this->defstore = (int)$options['defstore']; $this->defmf = (int)$options['defmf']; + $this->defsalesource = (int)$options['defsalesource']; $this->pagesize = (int)$options['pagesize']; $this->phone = (string)$options['phone']; $this->viber = (string)$options['viber']; @@ -119,6 +121,7 @@ protected function beforeSave() { $options['deffirm'] = $this->deffirm; $options['defmf'] = $this->defmf; + $options['defsalesource'] = $this->defsalesource; $options['pagesize'] = $this->pagesize; $options['hidesidebar'] = $this->hidesidebar; $options['mainpage'] = $this->mainpage; diff --git a/www/app/helper.php b/www/app/helper.php index e3ec2c665..44b78a0f3 100644 --- a/www/app/helper.php +++ b/www/app/helper.php @@ -456,6 +456,45 @@ public static function getDefMF() { } return 0; } + + /** + * источники продаж + * + */ + public static function getSaleSources() { + $common = System::getOptions("common"); + if (!is_array($common)) { + $common = array(); + } + $salesourceslist = $common['salesources']; + if (is_array($salesourceslist) == false) { + $salesourceslist = array(); + } + $slist = array() ; + foreach($salesourceslist as $s){ + $slist[$s->id]=$s->name; + } + return $slist; + } + + /** + * Возвращает источник продаж по умолчанию + * + */ + public static function getDefSaleSource() { + $user = System::getUser(); + if ($user->defsalesource > 0) { + return $user->defsalesource; + } + + $slist = Helper::getSaleSources() ; + + if (count($slist) > 0) { + $keys = array_keys($slist); + return $keys[0]; + } + return 0; + } /** * Возвращает первый тип цен как по умолчанию diff --git a/www/app/modules/issue/pages/issuelist.php b/www/app/modules/issue/pages/issuelist.php index 7a40f5b8d..90e3730e9 100644 --- a/www/app/modules/issue/pages/issuelist.php +++ b/www/app/modules/issue/pages/issuelist.php @@ -112,7 +112,7 @@ public function __construct($id = 0, $project_id = 0, $new = false) { $stform->add(new DropDownChoice('ststatus', $stlist, -1)); $stform->add(new DropDownChoice('stpr', array(Issue::PRIORITY_NORMAL => 'Нормальный', Issue::PRIORITY_HIGH => 'Высокий', Issue::PRIORITY_LOW => 'Низкий'), 0)); - $stform->add(new DropDownChoice('stuser', User::findArray('username', '', 'username'), 0)); + $stform->add(new DropDownChoice('stuser', array(), 0)); $stform->onSubmit($this, "onStatus"); $msgpan->add(new DataView('stlist', new ArrayDataSource($this, '_stlist'), $this, 'stlistOnRow')); @@ -271,24 +271,31 @@ public function openIssue($issue) { if ($this->_issue->priority == Issue::PRIORITY_LOW) { $bd = "badge-warning"; }; + + $user_id = System::getUser()->user_id; + $project = Project::load($this->_issue->project_id); + $this->listpan->msgpan->mcreate->setText('Автор ' . $this->_issue->createdbyname . ' ' . \App\Helper::fd($this->_issue->createdon) . ' Проект ' . $project->project_name . ' ', true); + + $users = \App\Entity\User::findArray('username', "user_id <> {$user_id} and user_id in (select user_id from issue_projectacc where project_id={$project->project_id} )", 'username'); + foreach ($users as $k => $v) { + $this->listpan->msgpan->addmsgform->userlist->AddCheckBox($k, false, $v); + } + $this->listpan->msgpan->mtitle->setText('#' . $this->_issue->issue_id . ' ' . $this->_issue->issue_name, true); $this->listpan->msgpan->mdesc->setText($this->_issue->desc, true); $this->listpan->msgpan->stform->ststatus->setValue($this->_issue->status); $this->listpan->msgpan->stform->stpr->setValue($this->_issue->priority); + + $users = \App\Entity\User::findArray('username', " user_id in (select user_id from issue_projectacc where project_id={$project->project_id} )", 'username'); + + $this->listpan->msgpan->stform->stuser->setOptionList($users); $this->listpan->msgpan->stform->stuser->setValue($this->_issue->user_id); $this->updateStList(); $this->updateMessages(); $this->listpan->list->Reload(false); - $user_id = System::getUser()->user_id; - $project = Project::load($this->_issue->project_id); - $this->listpan->msgpan->mcreate->setText('Автор ' . $this->_issue->createdbyname . ' ' . \App\Helper::fd($this->_issue->createdon) . ' Проект ' . $project->project_name . ' ', true); - - $users = \App\Entity\User::findArray('username', "user_id <> {$user_id} and user_id in (select user_id from issue_projectacc where project_id={$project->project_id} )", 'username'); - foreach ($users as $k => $v) { - $this->listpan->msgpan->addmsgform->userlist->AddCheckBox($k, false, $v); - } + } public function deleteOnClick($sender) { @@ -458,9 +465,9 @@ public function onStatus($sender) { public function stlistOnRow($row) { $item = $row->getDataItem(); - $row->add(new Label('sttime', \App\Helper::fd($item->createdon))); - $row->add(new Label('stuser', $item->username)); - $row->add(new Label('stdesc', $item->description, true)); + $row->add(new Label('stlisttime', \App\Helper::fd($item->createdon))); + $row->add(new Label('stlistuser', $item->username)); + $row->add(new Label('stlistdesc', $item->description, true)); } public function updateStList() { diff --git a/www/app/modules/issue/pages/projectlist.php b/www/app/modules/issue/pages/projectlist.php index 748539882..fc344f4b1 100644 --- a/www/app/modules/issue/pages/projectlist.php +++ b/www/app/modules/issue/pages/projectlist.php @@ -155,8 +155,10 @@ public function addOnClick($sender) { $user = System::getUser(); $this->_project->creator_id = $user->user_id; $this->_project->creator = $user->username; - + $this->updateUsers(); + + $this->projectform->userlist->setAllChecked(0); } public function saveOnClick($sender) { @@ -175,9 +177,11 @@ public function saveOnClick($sender) { if (in_array($this->_project->creator_id, $users) == false) { $users[] = $this->_project->creator_id; } - $this->_project->setUsers($users); + - $this->_project->Save(); + $this->_project->save(); + $this->_project->setUsers($users); + $this->projectform->setVisible(false); $this->projectpanel->setVisible(true); $this->projectpanel->projectlist->Reload(); @@ -290,7 +294,7 @@ public function filelistOnRow($row) { $row->add(new ClickLink('delfile'))->onClick($this, 'deleteFileOnClick'); - if ($this->_user->rolename == 'admins' || $this->_user->user_id == $this->_issue->createdby) { + if ($this->_user->rolename == 'admins' || $this->_user->user_id == $this->_project->creator_id) { $row->delfile->setVisible(true); } else { $row->delfile->setVisible(false); diff --git a/www/app/modules/note/pages/main.php b/www/app/modules/note/pages/main.php index 44d01f413..63f0e2e94 100644 --- a/www/app/modules/note/pages/main.php +++ b/www/app/modules/note/pages/main.php @@ -29,6 +29,7 @@ class Main extends \App\Pages\Base { private $_edited = 0; + private $clipboard = array(); public $_tarr = array(); public $_sarr = array(); @@ -323,8 +324,12 @@ public function ReloadTopic($nodeid = 0) { public function onTree($sender, $id) { $this->_edited = 0; $this->_tvars['editor'] = false; - $this->topiclist->setSelectedRow(); + $this->ReloadTopic($id); + $this->_sarr = array(); + $this->searchlist->Reload(); + + } //вывод строки списка топиков @@ -332,9 +337,11 @@ public function onTree($sender, $id) { public function onRow($row) { $topic = $row->getDataitem(); $row->add(new Label('title', $topic->title)); - //$row->add(new ClickLink('title', $this,'onTopic')); + $fav = $row->add(new Label('fav')); $fav->setVisible(in_array($topic->topic_id, $this->_favorites)); + + } //клик по топику @@ -343,9 +350,10 @@ public function onTopic($row) { $topic = $row->getDataItem(); $this->_farr = Helper::findFileByTopic($topic->topic_id); $this->filelist->Reload(); - $this->topiclist->setSelectedRow($row); - $this->topiclist->Reload(); - } + + $this->topiclist->setSelectedRow($row); + $this->topiclist->Reload(false); + } //избранное public function onFav($sender) { @@ -521,16 +529,27 @@ public function onSearchRow($row) { $row->add(new Label('stitle', $item->title)); $row->add(new Label('snodes', $item->nodes())); + + } //выбор строки из результата поиска - public function onSearchTopic($sender, $tn_id) { + public function onSearchTopic($row) { - $topic = TopicNode::load($tn_id); - $this->tree->selectedNodeId($topic->node_id); - - // $this->topiclist->setSelectedRow($topic->topic_id); + $topic= $row->getDataItem() ; + $this->tree->selectedNodeId(intval($topic->node_id)); + $this->ReloadTopic($topic->node_id); + $trows = $this->topiclist->getDataRows() ; + foreach($trows as $tr) { + $t = $tr->getDataItem(); + if($t->topic_id==$topic->topic_id) { + $this->onTopic($tr) ; + } + } + + $this->searchlist->setSelectedRow($row); + $this->searchlist->Reload(false); } /** diff --git a/www/app/pages/base.php b/www/app/pages/base.php index 0eae32cce..9fbfc2d3a 100644 --- a/www/app/pages/base.php +++ b/www/app/pages/base.php @@ -67,6 +67,13 @@ public function __construct($params = null) { $this->_tvars["refmenu"] = Helper::generateMenu(4); $this->_tvars["sermenu"] = Helper::generateMenu(5); + $this->_tvars["showdocmenu"] = count($this->_tvars["docmenu"]['groups'] )>0 || count($this->_tvars["docmenu"]['items'] )>0; + $this->_tvars["showrepmenu"] = count($this->_tvars["repmenu"]['groups'] )>0 || count($this->_tvars["repmenu"]['items'] )>0; + $this->_tvars["showregmenu"] = count($this->_tvars["regmenu"]['groups'] )>0 || count($this->_tvars["regmenu"]['items'] )>0; + $this->_tvars["showrefmenu"] = count($this->_tvars["refmenu"]['groups'] )>0 || count($this->_tvars["refmenu"]['items'] )>0; + $this->_tvars["showsermenu"] = count($this->_tvars["sermenu"]['groups'] )>0 || count($this->_tvars["sermenu"]['items'] )>0; + + $this->_tvars["islogined"] = $user->user_id > 0; $this->_tvars["isadmin"] = $user->userlogin == 'admin'; $this->_tvars["isadmins"] = $user->rolename == 'admins'; @@ -86,6 +93,10 @@ public function __construct($params = null) { $this->_tvars["tecdoc"] = $_config['modules']['tecdoc'] == 1; $this->_tvars["ppo"] = $_config['modules']['ppo'] == 1; $this->_tvars["np"] = $_config['modules']['np'] == 1; + + + + //доступы к модулям if (strpos(System::getUser()->modules, 'shop') === false && System::getUser()->rolename != 'admins') { $this->_tvars["shop"] = false; @@ -112,12 +123,56 @@ public function __construct($params = null) { $this->_tvars["np"] = false; } + if($this->_tvars["shop"] || + $this->_tvars["ocstore"] || + $this->_tvars["woocomerce"] || + $this->_tvars["note"] || + $this->_tvars["issue"] || + $this->_tvars["tecdoc"] || + $this->_tvars["ppo"] || + $this->_tvars["np"] + ) { + $this->_tvars["showmodmenu"] = true; + } else { + $this->_tvars["showmodmenu"] = false; + } + + if($this->_tvars["isadmins"]){ //для роли админов видные все разделы меню + $this->_tvars["showdocmenu"] = true; + $this->_tvars["showrepmenu"] = true; + $this->_tvars["showregmenu"] = true; + $this->_tvars["showrefmenu"] = true; + $this->_tvars["showsermenu"] = true; + $this->_tvars["showmodmenu"] = true; + } + + + //скрыть боковое меню $this->_tvars["hidesidebar"] = $user->hidesidebar == 1 ? 'hold-transition sidebar-collapse' : 'hold-transition sidebar-mini sidebar-collapse'; //для скрытия блока разметки в шаблоне страниц $this->_tvars["hideblock"] = false; + //активные пользователий + $this->_tvars["activeusers"] = false; + $this->_tvars["activeuserscnt"] = 0; + $this->_tvars["aulist"] = array(); + if($options['showactiveusers'] == 1) { + $this->_tvars["activeusers"] = true ; + + $w = " ( user_id in(select user_id from docstatelog where TIME_TO_SEC(timediff(now(),createdon)) <300 ) or user_id in (select user_id from paylist where TIME_TO_SEC(timediff(now(),paydate)) <300 ) )"; + $users = \App\Entity\User::findArray('username',$w,'username') ; + foreach($users as $u){ + $this->_tvars["aulist"][]=array('ausername'=>$u); + } + + + $this->_tvars["activeuserscnt"] = count( $this->_tvars["aulist"]); + + } + + $this->generateTosats(); } @@ -172,10 +227,14 @@ final protected function isError() { public function beforeRender() { $user = System::getUser(); $this->_tvars['notcnt'] = \App\Entity\Notify::isNotify($user->user_id); + $this->_tvars['taskcnt'] = \App\Entity\Event::isNotClosedTask($user->user_id); $this->_tvars['alerterror'] = ""; if (strlen(System::getErrorMsg()) > 0) { $this->_tvars['alerterror'] = System::getErrorMsg(); - $this->goAnkor(''); + + $this->goAnkor('topankor') ; + + } } diff --git a/www/app/pages/doc/goodsissue.php b/www/app/pages/doc/goodsissue.php index abaca6d93..a27d6b507 100644 --- a/www/app/pages/doc/goodsissue.php +++ b/www/app/pages/doc/goodsissue.php @@ -50,6 +50,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->add(new Date('document_date'))->setDate(time()); $this->docform->add(new DropDownChoice('payment', MoneyFund::getList(true, true), H::getDefMF()))->onChange($this, 'OnPayment'); + $this->docform->add(new DropDownChoice('salesource', H::getSaleSources() , H::getDefSaleSource())); $this->docform->add(new Label('discount'))->setVisible(false); $this->docform->add(new TextInput('editpaydisc')); @@ -127,6 +128,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->document_date->setDate($this->_doc->document_date); $this->docform->payment->setValue($this->_doc->headerdata['payment']); + $this->docform->salesource->setValue($this->_doc->headerdata['salesource']); $this->docform->payamount->setText($this->_doc->payamount); $this->docform->editpayamount->setText($this->_doc->payamount); @@ -170,6 +172,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->customer->setKey($basedoc->customer_id); $this->docform->customer->setText($basedoc->customer_name); + $this->docform->salesource->setValue($basedoc->headerdata['salesource']); $this->docform->pricetype->setValue($basedoc->headerdata['pricetype']); // $this->docform->store->setValue($basedoc->headerdata['store']); $this->_orderid = $basedocid; @@ -251,6 +254,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->pricetype->setValue($basedoc->headerdata['pricetype']); $this->docform->store->setValue($basedoc->headerdata['store']); + $this->docform->salesource->setValue($basedoc->headerdata['salesource']); $this->docform->firm->setValue($basedoc->firm_id); @@ -541,6 +545,7 @@ public function savedocOnClick($sender) { $customer = Customer::load($this->_doc->customer_id); $this->_doc->headerdata['customer_name'] = $this->docform->customer->getText() . ' ' . $customer->phone; } + $this->_doc->headerdata['salesource'] = $this->docform->salesource->getValue(); $this->_doc->headerdata['contract_id'] = $this->docform->contract->getValue(); $this->_doc->firm_id = $this->docform->firm->getValue(); if ($this->_doc->firm_id > 0) { @@ -634,7 +639,7 @@ public function savedocOnClick($sender) { if ($isEdited) { App::RedirectBack(); } else { - App::Redirect("\\App\\Pages\\Register\\GIList"); + App::Redirect("\\App\\Pages\\Register\\GIList",$this->_doc->document_id); } } catch(\Throwable $ee) { global $logger; diff --git a/www/app/pages/doc/goodsreceipt.php b/www/app/pages/doc/goodsreceipt.php index 80308ab41..ad73a634a 100644 --- a/www/app/pages/doc/goodsreceipt.php +++ b/www/app/pages/doc/goodsreceipt.php @@ -703,13 +703,19 @@ public function savenewitemOnClick($sender) { $item->itemname = $itemname; $item->item_code = $this->editnewitem->editnewitemcode->getText(); - $itemname = Item::qstr($item->itemname); - $code = Item::qstr($item->item_code); - $cnt = Item::findCnt("item_id <> {$item->item_id} and itemname={$itemname} and item_code={$code} "); - if ($cnt > 0) { - - $this->setError('itemnamecode_exists'); - return; + if(strlen($item->item_code)>0) { + $code = Item::qstr($item->item_code); + $cnt = Item::findCnt(" item_code={$code} "); + if ($cnt > 0) { + $this->setError('itemcode_exists'); + return; + } + + } else { + if(System::getOption("common", "autoarticle") == 1) { + + $item->item_code = Item::getNextArticle() ; + } } diff --git a/www/app/pages/doc/invoice.php b/www/app/pages/doc/invoice.php index ada612f92..fc34eeb5f 100644 --- a/www/app/pages/doc/invoice.php +++ b/www/app/pages/doc/invoice.php @@ -344,7 +344,7 @@ public function savedocOnClick($sender) { if ($isEdited) { App::RedirectBack(); } else { - App::Redirect("\\App\\Pages\\Register\\GIList"); + App::Redirect("\\App\\Pages\\Register\\GIList",$this->_doc->document_id); } } catch(\Throwable $ee) { global $logger; diff --git a/www/app/pages/doc/invoicecust.php b/www/app/pages/doc/invoicecust.php index b8a482712..75fe40125 100644 --- a/www/app/pages/doc/invoicecust.php +++ b/www/app/pages/doc/invoicecust.php @@ -500,6 +500,23 @@ public function savenewitemOnClick($sender) { $item = new Item(); $item->itemname = $itemname; $item->item_code = $this->editnewitem->editnewitemcode->getText(); + + if(strlen($item->item_code)>0) { + $code = Item::qstr($item->item_code); + $cnt = Item::findCnt(" item_code={$code} "); + if ($cnt > 0) { + $this->setError('itemcode_exists'); + return; + } + + } else { + if(System::getOption("common", "autoarticle") == 1) { + + $item->item_code = Item::getNextArticle() ; + } + } + + $item->cat_id = $this->editnewitem->editnewcat->getValue(); $item->save(); $this->editdetail->edititem->setText($item->itemname); diff --git a/www/app/pages/doc/order.php b/www/app/pages/doc/order.php index 10ccb4d94..e3752a8b0 100644 --- a/www/app/pages/doc/order.php +++ b/www/app/pages/doc/order.php @@ -48,7 +48,8 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->add(new TextArea('notes')); $this->docform->add(new DropDownChoice('payment', MoneyFund::getList(true, false), MoneyFund::CREDIT))->onChange($this, 'OnPayment'); - + $this->docform->add(new DropDownChoice('salesource', H::getSaleSources() , H::getDefSaleSource())); + $this->docform->add(new TextInput('editpaydisc')); $this->docform->add(new SubmitButton('bpaydisc'))->onClick($this, 'onPayDisc'); $this->docform->add(new Label('paydisc', 0)); @@ -122,6 +123,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->OnDelivery($this->docform->delivery); $this->docform->production->setChecked($this->_doc->headerdata['production']); $this->docform->payment->setValue($this->_doc->headerdata['payment']); + $this->docform->salesource->setValue($this->_doc->headerdata['salesource']); $this->docform->total->setText($this->_doc->amount); $this->docform->payamount->setText($this->_doc->payamount); @@ -321,6 +323,7 @@ public function savedocOnClick($sender) { $this->_doc->headerdata['paydisc'] = $this->docform->paydisc->getText(); $this->_doc->headerdata['payment'] = $this->docform->payment->getValue(); + $this->_doc->headerdata['salesource'] = $this->docform->salesource->getValue(); if ($this->_doc->headerdata['payment'] == \App\Entity\MoneyFund::PREPAID) { $this->_doc->headerdata['paydisc'] = 0; @@ -656,6 +659,23 @@ public function savenewitemOnClick($sender) { $item = new Item(); $item->itemname = $itemname; $item->item_code = $this->editnewitem->editnewitemcode->getText(); + + if(strlen($item->item_code)>0) { + $code = Item::qstr($item->item_code); + $cnt = Item::findCnt(" item_code={$code} "); + if ($cnt > 0) { + $this->setError('itemcode_exists'); + return; + } + + } else { + if(\App\System::getOption("common", "autoarticle") == 1) { + + $item->item_code = Item::getNextArticle() ; + } + } + + $item->manufacturer = $this->editnewitem->editnewbrand->getText(); $item->cat_id = $this->editnewitem->editnewcat->getValue(); $item->save(); diff --git a/www/app/pages/doc/ordercust.php b/www/app/pages/doc/ordercust.php index 84e74c6c5..bbce2d05b 100644 --- a/www/app/pages/doc/ordercust.php +++ b/www/app/pages/doc/ordercust.php @@ -374,8 +374,25 @@ public function savenewitemOnClick($sender) { } $item = new Item(); $item->itemname = $itemname; + $item->cat_id = $this->editnewitem->editnewcat->getValue(); $item->item_code = $this->editnewitem->editnewitemcode->getText(); - $item->cat_id = $this->editnewitem->editnewcat->getValue(); + + if(strlen($item->item_code)>0) { + $code = Item::qstr($item->item_code); + $cnt = Item::findCnt(" item_code={$code} "); + if ($cnt > 0) { + $this->setError('itemcode_exists'); + return; + } + + } else { + if(System::getOption("common", "autoarticle") == 1) { + + $item->item_code = Item::getNextArticle() ; + } + } + + $item->save(); $this->editdetail->edititem->setText($item->itemname); $this->editdetail->edititem->setKey($item->item_id); diff --git a/www/app/pages/doc/poscheck.php b/www/app/pages/doc/poscheck.php index 7facf0ea7..155f7d119 100644 --- a/www/app/pages/doc/poscheck.php +++ b/www/app/pages/doc/poscheck.php @@ -46,6 +46,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->add(new Date('document_date'))->setDate(time()); $this->docform->add(new DropDownChoice('payment', MoneyFund::getList(true, true), H::getDefMF()))->onChange($this, 'OnPayment'); + $this->docform->add(new DropDownChoice('salesource', H::getSaleSources() , H::getDefSaleSource())); $this->docform->add(new Label('discount'))->setVisible(false); $this->docform->add(new TextInput('editpaydisc')); @@ -123,6 +124,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->_doc = Document::load($docid)->cast(); $this->docform->document_number->setText($this->_doc->document_number); + $this->docform->salesource->setValue($this->_doc->headerdata['salesource']); $this->docform->pricetype->setValue($this->_doc->headerdata['pricetype']); $this->docform->total->setText(H::fa($this->_doc->amount)); @@ -170,6 +172,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->customer->setText($basedoc->customer_name); $this->OnChangeCustomer($this->docform->customer); + $this->docform->salesource->setValue($basedoc->headerdata['salesource']); $this->docform->pricetype->setValue($basedoc->headerdata['pricetype']); $this->docform->store->setValue($basedoc->headerdata['store']); // $this->docform->pos->setValue($basedoc->headerdata['pos']); @@ -502,6 +505,7 @@ public function savedocOnClick($sender) { $this->_doc->headerdata['order'] = $this->docform->order->getText(); $this->_doc->headerdata['store'] = $this->docform->store->getValue(); + $this->_doc->headerdata['salesource'] = $this->docform->salesource->getValue(); $this->_doc->headerdata['pricetype'] = $this->docform->pricetype->getValue(); $this->_doc->headerdata['pricetypename'] = $this->docform->pricetype->getValueName(); $this->_doc->headerdata['order_id'] = $this->_order_id; @@ -606,7 +610,7 @@ public function savedocOnClick($sender) { if ($isEdited) { App::RedirectBack(); } else { - App::Redirect("\\App\\Pages\\Register\\GIList"); + App::Redirect("\\App\\Pages\\Register\\GIList",$this->_doc->document_id); } } catch(\Throwable $ee) { global $logger; diff --git a/www/app/pages/doc/ttn.php b/www/app/pages/doc/ttn.php index 284175cc6..67e2e6db9 100644 --- a/www/app/pages/doc/ttn.php +++ b/www/app/pages/doc/ttn.php @@ -56,6 +56,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->add(new SubmitLink('addcode'))->onClick($this, 'addcodeOnClick'); $this->docform->add(new DropDownChoice('store', Store::getList(), H::getDefStore())); + $this->docform->add(new DropDownChoice('salesource', H::getSaleSources() , H::getDefSaleSource())); $this->docform->add(new SubmitLink('addcust'))->onClick($this, 'addcustOnClick'); @@ -135,6 +136,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->nostore->setChecked($this->_doc->headerdata['nostore']); $this->docform->store->setValue($this->_doc->headerdata['store']); + $this->docform->salesource->setValue($this->_doc->headerdata['salesource']); $this->docform->customer->setKey($this->_doc->customer_id); if ($this->_doc->customer_id) { @@ -164,6 +166,7 @@ public function __construct($docid = 0, $basedocid = 0) { $this->docform->customer->setKey($basedoc->customer_id); $this->docform->customer->setText($basedoc->customer_name); + $this->docform->salesource->setValue($basedoc->headerdata['salesource']); $this->docform->delivery->setValue($basedoc->headerdata['delivery']); $this->docform->pricetype->setValue($basedoc->headerdata['pricetype']); @@ -255,6 +258,7 @@ public function __construct($docid = 0, $basedocid = 0) { } + $this->docform->salesource->setValue($basedoc->headerdata['salesource']); $this->docform->pricetype->setValue($basedoc->headerdata['pricetype']); $this->docform->store->setValue($basedoc->headerdata['store']); @@ -562,6 +566,7 @@ public function savedocOnClick($sender) { $this->_doc->headerdata['ship_amount'] = $this->docform->ship_amount->getText(); $this->_doc->headerdata['delivery'] = $this->docform->delivery->getValue(); $this->_doc->headerdata['delivery_name'] = $this->docform->delivery->getValueName(); + $this->_doc->headerdata['salesource'] = $this->docform->salesource->getValue(); $this->_doc->headerdata['store'] = $this->docform->store->getValue(); $this->_doc->headerdata['store_name'] = $this->docform->store->getValueName(); $this->_doc->headerdata['emp_id'] = $this->docform->emp->getValue(); diff --git a/www/app/pages/options.php b/www/app/pages/options.php index 34ba67322..b62989ee6 100644 --- a/www/app/pages/options.php +++ b/www/app/pages/options.php @@ -5,7 +5,10 @@ use App\Application as App; use App\Helper as H; use App\System; +use Zippy\Binding\PropertyBinding as Bind; +use Zippy\Html\DataList\ArrayDataSource; use Zippy\Html\DataList\DataView; + use Zippy\Html\Form\CheckBox; use Zippy\Html\Form\DropDownChoice; use Zippy\Html\Form\Form; @@ -14,6 +17,8 @@ use Zippy\Html\Form\SubmitButton; use Zippy\Html\Label; use Zippy\Html\Link\ClickLink; +use Zippy\Html\Link\SubmitLink; + use Zippy\Html\Panel; class Options extends \App\Pages\Base @@ -21,6 +26,7 @@ class Options extends \App\Pages\Base private $metadatads; public $pricelist = array(); + public $_salesourceslist = array(); public function __construct() { parent::__construct(); @@ -53,6 +59,7 @@ public function __construct() { $this->common->add(new CheckBox('usebranch')); $this->common->add(new CheckBox('usecattree')); $this->common->add(new CheckBox('usemobileprinter')); + $this->common->add(new CheckBox('showactiveusers')); $this->common->add(new CheckBox('allowminus')); $this->common->add(new CheckBox('noallowfiz')); $this->common->add(new CheckBox('capcha')); @@ -93,7 +100,7 @@ public function __construct() { $this->common->usesnumber->setChecked($common['usesnumber']); - $this->common->usemobileprinter->setChecked($common['usemobileprinter']); + $this->common->showactiveusers->setChecked($common['showactiveusers']); $this->common->usecattree->setChecked($common['usecattree']); $this->common->usescanner->setChecked($common['usescanner']); $this->common->useimages->setChecked($common['useimages']); @@ -198,6 +205,7 @@ public function __construct() { $this->onSMSType($this->sms->smstype); + //общепит $food = System::getOptions("food"); if (!is_array($food)) { $food = array( ); @@ -210,6 +218,20 @@ public function __construct() { $this->food->add(new CheckBox('foodbar',$food['bar'])); + //источники продаж + $this->add(new Form('salesourcesform')) ; + $this->salesourcesform->add(new SubmitButton('salesourcesave'))->onClick($this, 'OnSaveSaleSource'); + $this->salesourcesform->add(new SubmitLink('addnewsalesource'))->onClick($this, 'OnAddSaleSource'); + + $this->salesourcesform->add(new DataView('salesourceslist', new ArrayDataSource(new Bind($this, '_salesourceslist')), $this, 'salesourceListOnRow')); + + $this->_salesourceslist = $common['salesources']; + if (is_array($this->_salesourceslist) == false) { + $this->_salesourceslist = array(); + } + + $this->salesourcesform->salesourceslist->Reload(); + } public function saveCommonOnClick($sender) { @@ -240,7 +262,7 @@ public function saveCommonOnClick($sender) { $common['usescanner'] = $this->common->usescanner->isChecked() ? 1 : 0; $common['useimages'] = $this->common->useimages->isChecked() ? 1 : 0; - $common['usemobileprinter'] = $this->common->usemobileprinter->isChecked() ? 1 : 0; + $common['showactiveusers'] = $this->common->showactiveusers->isChecked() ? 1 : 0; $common['usecattree'] = $this->common->usecattree->isChecked() ? 1 : 0; $common['usebranch'] = $this->common->usebranch->isChecked() ? 1 : 0; $common['noallowfiz'] = $this->common->noallowfiz->isChecked() ? 1 : 0; @@ -352,5 +374,39 @@ public function onFood($sender) { System::setOptions("food", $food); $this->setSuccess('saved'); } + + + public function OnAddSaleSource($sender) { + $ls = new \App\DataItem(); + $ls->name = ''; + $ls->id = time(); + $this->_salesourceslist[$ls->id] = $ls; + $this->salesourcesform->salesourceslist->Reload(); + $this->goAnkor('salesourcesform') ; + } + + + public function salesourceListOnRow( $row) { + $item = $row->getDataItem(); + $row->add(new TextInput('salesourcename', new Bind($item, 'name'))); + $row->add(new ClickLink('delsalesource', $this, 'onDelSaleSource')); + } + + public function onDelSaleSource($sender) { + $item = $sender->getOwner()->getDataItem(); + + $this->_salesourceslist = array_diff_key($this->_salesourceslist, array($item->id => $this->_salesourceslist[$item->id])); + + $this->salesourcesform->salesourceslist->Reload(); + $this->goAnkor('salesourcesform') ; + } + public function OnSaveSaleSource($sender) { + + $options = System::getOptions('common'); + $options['salesources'] = $this->_salesourceslist; + System::setOptions('common', $options); + + $this->setSuccess('saved'); + } } diff --git a/www/app/pages/reference/customerlist.php b/www/app/pages/reference/customerlist.php index 1884c8782..7197bf5f7 100644 --- a/www/app/pages/reference/customerlist.php +++ b/www/app/pages/reference/customerlist.php @@ -71,6 +71,7 @@ public function __construct($id = 0 ) { $this->add(new Form('customerdetail'))->setVisible(false); $this->customerdetail->add(new TextInput('editaddress')); $this->customerdetail->add(new TextInput('editcity')); + $this->customerdetail->add(new TextInput('editcountry')); $this->customerdetail->add(new TextInput('editcustomername')); $this->customerdetail->add(new TextInput('editphone')); $this->customerdetail->add(new TextInput('editviber')); @@ -223,6 +224,7 @@ public function show() { $this->customerdetail->editemail->setText($this->_customer->email); $this->customerdetail->editaddress->setText($this->_customer->address); $this->customerdetail->editcity->setText($this->_customer->city); + $this->customerdetail->editcountry->setText($this->_customer->country); $this->customerdetail->discount->setText($this->_customer->discount); $this->customerdetail->bonus->setText($this->_customer->bonus); $this->customerdetail->editcomment->setText($this->_customer->comment); @@ -278,6 +280,7 @@ public function saveOnClick($sender) { $this->_customer->email = $this->customerdetail->editemail->getText(); $this->_customer->address = $this->customerdetail->editaddress->getText(); $this->_customer->city = $this->customerdetail->editcity->getText(); + $this->_customer->country = $this->customerdetail->editcountry->getText(); $this->_customer->discount = $this->customerdetail->discount->getText(); $this->_customer->bonus = $this->customerdetail->bonus->getText(); $this->_customer->comment = $this->customerdetail->editcomment->getText(); diff --git a/www/app/pages/reference/employeelist.php b/www/app/pages/reference/employeelist.php index e62133e91..19061a737 100644 --- a/www/app/pages/reference/employeelist.php +++ b/www/app/pages/reference/employeelist.php @@ -135,7 +135,14 @@ public function saveOnClick($sender) { $this->_employee->branch_id = $this->employeedetail->editbranch->getValue(); $this->_employee->disabled = $this->employeedetail->editdisabled->isChecked() ? 1 : 0; - if($this->_employee->disabled==1) $this->_employee->login=''; + if($this->_employee->disabled==1) { + $u = \App\Entity\User::getByLogin($this->_employee->login) ; + $u->userpass = ''; + $u->save(); + $this->_employee->login=''; + + } + $this->_employee->save(); $this->employeedetail->setVisible(false); diff --git a/www/app/pages/reference/itemlist.php b/www/app/pages/reference/itemlist.php index 39e8fb17b..2b1e15428 100644 --- a/www/app/pages/reference/itemlist.php +++ b/www/app/pages/reference/itemlist.php @@ -99,6 +99,7 @@ public function __construct($add = false) { $this->itemdetail->add(new TextInput('editvolume')); $this->itemdetail->add(new TextInput('editcustomsize')); $this->itemdetail->add(new TextInput('editwarranty')); + $this->itemdetail->add(new TextInput('editlost')); $this->itemdetail->add(new TextInput('editcell')); $this->itemdetail->add(new TextInput('editmsr')); @@ -129,6 +130,15 @@ public function __construct($add = false) { $this->setpanel->add(new Label('stitle')); $this->setpanel->add(new ClickLink('backtolist', $this, "onback")); + + $this->_tvars['hp1'] = strlen($common['price1'])>0 ? $common['price1'] : false; + $this->_tvars['hp2'] = strlen($common['price2'])>0 ? $common['price2'] : false; + $this->_tvars['hp3'] = strlen($common['price3'])>0 ? $common['price3'] : false; + $this->_tvars['hp4'] = strlen($common['price4'])>0 ? $common['price4'] : false; + $this->_tvars['hp5'] = strlen($common['price5'])>0 ? $common['price5'] : false; + + + if ($add == false) { $this->itemtable->itemlist->Reload(); } else { @@ -145,23 +155,13 @@ public function itemlistOnRow(\Zippy\Html\DataList\DataRow $row) { $row->add(new Label('msr', $item->msr)); $row->add(new Label('cat_name', $item->cat_name)); $row->add(new Label('manufacturer', $item->manufacturer)); - $plist = array(); - if ($item->price1 > 0) { - $plist[] = $item->price1; - } - if ($item->price2 > 0) { - $plist[] = $item->price2; - } - if ($item->price3 > 0) { - $plist[] = $item->price3; - } - if ($item->price4 > 0) { - $plist[] = $item->price4; - } - if ($item->price5 > 0) { - $plist[] = $item->price5; - } - $row->add(new Label('price', implode(', ', $plist))); + + $row->add(new Label('price1', $item->price1)); + $row->add(new Label('price2', $item->price2)); + $row->add(new Label('price3', $item->price3)); + $row->add(new Label('price4', $item->price4)); + $row->add(new Label('price5', $item->price5)); + $row->add(new Label('hasnotes'))->setVisible(strlen($item->description) > 0); $row->hasnotes->setAttribute('title', htmlspecialchars_decode($item->description)); $row->setAttribute('style', $item->disabled == 1 ? 'color: #aaa' : null); @@ -227,6 +227,7 @@ public function editOnClick($sender) { $this->itemdetail->editmsr->setText($this->_item->msr); $this->itemdetail->editmaxsize->setText($this->_item->maxsize); $this->itemdetail->editvolume->setText($this->_item->volume); + $this->itemdetail->editlost->setText($this->_item->lost); $this->itemdetail->editcustomsize->setText($this->_item->customsize); $this->itemdetail->editwarranty->setText($this->_item->warranty); $this->itemdetail->edittype->setValue($this->_item->item_type); @@ -310,6 +311,7 @@ public function OnSubmit($sender) { $this->_item->weight = $this->itemdetail->editweight->getText(); $this->_item->maxsize = $this->itemdetail->editmaxsize->getText(); $this->_item->volume = $this->itemdetail->editvolume->getText(); + $this->_item->lost = $this->itemdetail->editlost->getText(); $this->_item->customsize = $this->itemdetail->editcustomsize->getText(); $this->_item->warranty = $this->itemdetail->editwarranty->getText(); $this->_item->item_type = $this->itemdetail->edittype->getValue(); diff --git a/www/app/pages/register/gilist.php b/www/app/pages/register/gilist.php index 89938a29e..57687f3c6 100644 --- a/www/app/pages/register/gilist.php +++ b/www/app/pages/register/gilist.php @@ -47,6 +47,7 @@ public function __construct($doc = 0) { $this->listpan->filter->add(new TextInput('searchtext')); $this->listpan->filter->add(new DropDownChoice('status', array(0 => H::l('opened'), 1 => H::l('newed'), 2 => H::l('sended'), 4 => H::l('notpayed'), 3 => H::l('all')), 0)); $this->listpan->filter->add(new DropDownChoice('searchcomp', Firm::findArray('firm_name', 'disabled<>1', 'firm_name'), 0)); + $this->listpan->filter->add(new DropDownChoice('salesource', H::getSaleSources() , 0)); $doclist = $this->listpan->add(new DataView('doclist', new GoodsIssueDataSource($this), $this, 'doclistOnRow')); @@ -107,7 +108,8 @@ public function __construct($doc = 0) { if ($doc > 0) { $this->_doc = Document::load($doc); - $this->npshowOnSubmit($this->statuspan->statusform->bnp);; + $this->showOn() ; + // $this->npshowOnSubmit($this->statuspan->statusform->bnp);; } } @@ -303,12 +305,18 @@ public function updateStatusButtons() { } //просмотр + + public function showOnClick($sender) { - $this->_doc = $sender->owner->getDataItem(); if (false == \App\ACL::checkShowDoc($this->_doc, true)) { return; } + $this->showOn() ; + } + + public function showOn() { + $this->statuspan->setVisible(true); $this->statuspan->statusform->ship_number->setText($this->_doc->headerdata['ship_number']); @@ -651,6 +659,11 @@ private function getWhere() { $conn = \ZDB\DB::getConnect(); $where = " meta_name in('GoodsIssue', 'Invoice','POSCheck','ReturnIssue' ,'Warranty','TTN' ) "; + + $salesource = $this->page->listpan->filter->salesource->getValue(); + if ($salesource > 0) { + $where .= " and ExtractValue(content, '//doc/header/salesource') = ". $salesource; + } $status = $this->page->listpan->filter->status->getValue(); if ($status == 0) { diff --git a/www/app/pages/register/itemlist.php b/www/app/pages/register/itemlist.php index 89aed9766..072bb363c 100644 --- a/www/app/pages/register/itemlist.php +++ b/www/app/pages/register/itemlist.php @@ -48,6 +48,16 @@ public function __construct() { $this->detailpanel->add(new DataView('stocklist', new DetailDataSource($this), $this, 'detailistOnRow')); $this->OnFilter(null); + + $options = \App\System::getOptions('common') ; + + $this->_tvars['hp1'] = strlen($options['price1'])>0 ? $options['price1'] : false; + $this->_tvars['hp2'] = strlen($options['price2'])>0 ? $options['price2'] : false; + $this->_tvars['hp3'] = strlen($options['price3'])>0 ? $options['price3'] : false; + $this->_tvars['hp4'] = strlen($options['price4'])>0 ? $options['price4'] : false; + $this->_tvars['hp5'] = strlen($options['price5'])>0 ? $options['price5'] : false; + + } public function itemlistOnRow(\Zippy\Html\DataList\DataRow $row) { @@ -68,28 +78,13 @@ public function itemlistOnRow(\Zippy\Html\DataList\DataRow $row) { $plist = array(); - $p1 = $item->getPrice('price1', $store); - $p2 = $item->getPrice('price2', $store); - $p3 = $item->getPrice('price3', $store); - $p4 = $item->getPrice('price4', $store); - $p5 = $item->getPrice('price5', $store); - if ($p1 > 0) { - $plist[] = $p1; - } - if ($p2 > 0) { - $plist[] = $p2; - } - if ($p3 > 0) { - $plist[] = $p3; - } - if ($p4 > 0) { - $plist[] = $p4; - } - if ($p5 > 0) { - $plist[] = $p5; - } + - $row->add(new Label('iprice', implode(', ', $plist))); + $row->add(new Label('iprice1', H::fa($item->getPrice('price1', $store)))); + $row->add(new Label('iprice2', H::fa($item->getPrice('price2', $store)))); + $row->add(new Label('iprice3', H::fa($item->getPrice('price3', $store)))); + $row->add(new Label('iprice4', H::fa($item->getPrice('price4', $store)))); + $row->add(new Label('iprice5', H::fa($item->getPrice('price5', $store)))); $row->add(new ClickLink('show'))->onClick($this, 'showOnClick'); if ($qty < 0) { @@ -274,7 +269,7 @@ private function getWhere() { $conn = $conn = \ZDB\DB::getConnect(); $form = $this->page->filter; - $where = " disabled <> 1 "; + $where = " disabled <> 1 and ( select sum(st1.qty) from store_stock st1 where st1.item_id= item_id ) >0 "; $cat = $form->searchcat->getValue(); $store = $form->searchstore->getValue(); diff --git a/www/app/pages/register/orderlist.php b/www/app/pages/register/orderlist.php index 642fc8e39..46ab2f484 100644 --- a/www/app/pages/register/orderlist.php +++ b/www/app/pages/register/orderlist.php @@ -43,7 +43,8 @@ public function __construct() { $this->filter->add(new TextInput('searchnumber')); $this->filter->add(new TextInput('searchtext')); $this->filter->add(new DropDownChoice('status', array(0 => 'Открытые', 1 => 'Новые', 3 => 'Все'), 0)); - + $this->filter->add(new DropDownChoice('salesource', H::getSaleSources() , 0)); + $doclist = $this->add(new DataView('doclist', new OrderDataSource($this), $this, 'doclistOnRow')); $this->add(new Paginator('pag', $doclist)); @@ -485,6 +486,11 @@ private function getWhere() { $where = " meta_name = 'Order' "; + $salesource = $this->page->filter->salesource->getValue(); + if ($salesource > 0) { + $where .= " and ExtractValue(content, '//doc/header/salesource') = ". $salesource; + } + $status = $this->page->filter->status->getValue(); if ($status == 0) { $where .= " and state not in (9,17) "; diff --git a/www/app/pages/register/paylist.php b/www/app/pages/register/paylist.php index b17a09f20..11ccd381c 100644 --- a/www/app/pages/register/paylist.php +++ b/www/app/pages/register/paylist.php @@ -216,7 +216,8 @@ private function getWhere() { $conn = \ZDB\DB::getConnect(); - $where = " d.customer_id in(select customer_id from customers where status=0)"; + //$where = " d.customer_id in(select customer_id from customers where status=0)"; + $where = " 1=1 "; $author = $this->page->filter->fuser->getValue(); $type = $this->page->filter->ftype->getValue(); diff --git a/www/app/pages/report/outcome.php b/www/app/pages/report/outcome.php index 90bdf23c3..c95b6d194 100644 --- a/www/app/pages/report/outcome.php +++ b/www/app/pages/report/outcome.php @@ -33,6 +33,8 @@ public function __construct() { $this->filter->add(new Date('to', time())); $this->filter->add(new DropDownChoice('emp', \App\Entity\User::findArray('username', "user_id in (select user_id from documents_view where meta_name in('GoodsIssue','ServiceAct','Task','Order','POSCheck','TTN') {$br} )", 'username'), 0)); $this->filter->add(new DropDownChoice('cat', \App\Entity\Category::getList(), 0))->setVisible(false); + $this->filter->add(new DropDownChoice('salesource', H::getSaleSources() , 0))->setVisible(false); + $hlist = \App\Entity\Customer::getHoldList(); // $this->filter->add(new DropDownChoice('holding', $hlist, 0))->setVisible(false); @@ -51,6 +53,7 @@ public function __construct() { } $types[9] = H::l('repbybyfirm'); $types[10] = H::l('repbybystore'); + $types[11] = H::l('repbysalesource'); $this->filter->add(new DropDownChoice('type', $types, 1))->onChange($this, "OnType"); @@ -68,10 +71,14 @@ public function __construct() { public function OnType($sender) { $type = $this->filter->type->getValue(); $this->filter->cat->setValue(0); + $this->filter->salesource->setValue(0); $this->filter->cat->setVisible($type == 5); + $this->filter->salesource->setVisible($type == 11); $this->filter->cust->setVisible($type == 6 || $type == 7); // $this->filter->holding->setVisible($type == 7); + + } public function OnAutoItem($sender) { @@ -116,6 +123,7 @@ private function generateReport() { $type = $this->filter->type->getValue(); $user = $this->filter->emp->getValue(); $cat_id = $this->filter->cat->getValue(); + $salesource = $this->filter->salesource->getValue(); // $hold_id = $this->filter->holding->getValue(); $cust_id = $this->filter->cust->getKey(); @@ -189,7 +197,7 @@ private function generateReport() { } if ($type == 3) { //по датам $sql = " - select e.`document_date` as dt , sum(0-e.quantity*e.partion) as summa ,0 as navar + select e.`document_date` as dt , sum(0-e.`amount`) as summa, sum(e.extcode*(0-e.`quantity`)) as navar from `entrylist_view` e join `items` i on e.`item_id` = i.`item_id` @@ -298,7 +306,7 @@ private function generateReport() { join `stores` sr on sr.`store_id` = st.`store_id` join `documents_view` d on d.`document_id` = e.`document_id` - where d.`firm_id` >0 and e.`quantity` <>0 + where e.`quantity` <>0 and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN') {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " @@ -308,6 +316,26 @@ private function generateReport() { "; } + if ($type == 11) { //по источникам + + $sql = " + select i.itemname, sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + from `entrylist_view` e + + join `items` i on e.`item_id` = i.`item_id` + + join `documents_view` d on d.`document_id` = e.`document_id` + where e.`quantity` <>0 and ExtractValue(d.content, '//doc/header/salesource') = {$salesource} + and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN') + {$br} {$u} + AND DATE(e.document_date) >= " . $conn->DBDate($from) . " + AND DATE(e.document_date) <= " . $conn->DBDate($to) . " + group by i.itemname + order by i.itemname + + "; + } + $totsum = 0; $totnavar = 0; @@ -357,6 +385,7 @@ private function generateReport() { $header['_type5'] = false; $header['_type6'] = false; $header['_type7'] = false; + $header['_type8'] = false; if ($type == 1 || $type == 6 || strlen($cat) > 0) { $header['_type1'] = true; @@ -380,6 +409,9 @@ private function generateReport() { if ($type == 10) { $header['_type7'] = true; } + if ($type == 11) { + $header['_type8'] = true; + } $report = new \App\Report('report/outcome.tpl'); diff --git a/www/app/pages/service/armfood.php b/www/app/pages/service/armfood.php index 497089f75..864243018 100644 --- a/www/app/pages/service/armfood.php +++ b/www/app/pages/service/armfood.php @@ -84,9 +84,17 @@ public function __construct() { //список заказов $this->add(new Panel('orderlistpan'))->setVisible(false); + + $this->add(new ClickLink('neworder', $this, 'onNewOrder')); $this->orderlistpan->add(new DataView('orderlist', new ArrayDataSource($this, '_doclist'), $this, 'onDocRow')); + $this->orderlistpan->add(new Form('searchform'))->onSubmit($this,'updateorderlist'); + $this->orderlistpan->searchform->add(new AutocompleteTextInput('searchcust'))->onText($this, 'OnAutoCustomer'); + $this->orderlistpan->searchform->add(new TextInput('searchnumber', $filter->searchnumber)); + + + //панель статуса, просмотр $this->orderlistpan->add(new Panel('statuspan'))->setVisible(false); @@ -205,7 +213,7 @@ public function onNewOrder($sender) { $this->docpanel->listsform->itemlist->Reload(); $this->calcTotal() ; - + $this->orderlistpan->searchform->clean(); } public function onOrderList($sender) { @@ -218,7 +226,7 @@ public function onOrderList($sender) { $this->orderlistpan->setVisible(true); $this->orderlistpan->statuspan->setVisible(true); - $this->updateorderlist(); + $this->updateorderlist(null); } public function addnewposOnClick($sender) { @@ -231,16 +239,34 @@ public function addnewposOnClick($sender) { public function onDocRow($row) { $doc = $row->getDataItem(); $row->add(new ClickLink('docnumber',$this,'OnDocViewClick' ))->setValue($doc->document_number); - $row->add(new Label('state', Document::getStateName($doc->state))); - + // $row->add(new Label('state', Document::getStateName($doc->state))); + $row->add(new Label('docdate', H::fd($doc->document_date))); + $row->add(new Label('docamount', H::fa($doc->amount))); + $row->add(new Label('notes', $doc->notes)); + if ($doc->document_id == $this->_doc->document_id) { $row->setAttribute('class', 'table-success'); } } - private function updateorderlist() { + public function updateorderlist($sender) { $where = "meta_name='OrderFood' "; + if($sender instanceof Form){ + $text = trim($sender->searchnumber->getText()); + $cust = $sender->searchcust->getKey(); + if(strlen($text)>0) { + $where .= " and document_number=" .Document::qstr($text) ; + } + if(strlen($text)==0 && $cust >0) { + $where .= " and customer_id=" . $cust ; + } + + + } + + + $this->_doclist = Document::find($where, 'document_id desc'); $this->orderlistpan->orderlist->Reload(); } diff --git a/www/app/pages/service/armpos.php b/www/app/pages/service/armpos.php index 5f78c2faa..d058e8d34 100644 --- a/www/app/pages/service/armpos.php +++ b/www/app/pages/service/armpos.php @@ -36,6 +36,7 @@ class ARMPos extends \App\Pages\Base private $_rowid = 0; private $_pt = 0; private $_store_id = 0; + private $_salesource = 0; public $_doclist = array(); @@ -50,6 +51,7 @@ public function __construct() { $filter->pos = 0; $filter->store = H::getDefStore(); $filter->pricetype = H::getDefPriceType(); + $filter->salesource = H::getDefSaleSource(); @@ -62,7 +64,8 @@ public function __construct() { $this->form1->add(new DropDownChoice('pos', $plist, $filter->pos)); $this->form1->add(new DropDownChoice('store', \App\Entity\Store::getList(), $filter->store)); $this->form1->add(new DropDownChoice('pricetype', \App\Entity\Item::getPriceTypeList(), $filter->pricetype)); - + $this->form1->add(new DropDownChoice('salesource', H::getSaleSources() , $filter->salesource)); + $this->form1->add(new SubmitButton('next1'))->onClick($this, 'next1docOnClick'); @@ -71,6 +74,10 @@ public function __construct() { $this->checklistpan->add(new DataView('checklist', new ArrayDataSource($this, '_doclist'), $this, 'onDocRow')); //панель статуса, просмотр + $this->checklistpan->add(new Form('searchform'))->onSubmit($this,'updatechecklist'); + $this->checklistpan->searchform->add(new AutocompleteTextInput('searchcust'))->onText($this, 'OnAutoCustomer'); + $this->checklistpan->searchform->add(new TextInput('searchnumber', $filter->searchnumber)); + $this->checklistpan->add(new Panel('statuspan'))->setVisible(false); $this->checklistpan->statuspan->add(new \App\Widgets\DocView('docview'))->setVisible(false); @@ -86,7 +93,7 @@ public function __construct() { // ввод товаров - $this->docpanel->form2->add(new SubmitButton('next2'))->onClick($this, 'next2docOnClick'); + $this->docpanel->form2->add(new SubmitButton('topay'))->onClick($this, 'topayOnClick'); $this->docpanel->form2->add(new TextInput('barcode')); $this->docpanel->form2->add(new SubmitLink('addcode'))->onClick($this, 'addcodeOnClick'); $this->docpanel->form2->add(new SubmitLink('addrow'))->onClick($this, 'addrowOnClick'); @@ -121,10 +128,10 @@ public function __construct() { $this->docpanel->form3->add(new Label('discount')); //печать - $this->docpanel->add(new Form('form4'))->setVisible(false); - $this->docpanel->form4->add(new Label('showcheck')); - $this->docpanel->form4->add(new Button('newdoc'))->onClick($this, 'newdoc'); - $this->docpanel->form4->add(new Button('print')); + $this->docpanel->add(new Form('formcheck'))->setVisible(false); + $this->docpanel->formcheck->add(new Label('showcheck')); + $this->docpanel->formcheck->add(new Button('newdoc'))->onClick($this, 'newdoc'); + $this->docpanel->formcheck->add(new Button('print')); $this->docpanel->add(new Form('editdetail'))->setVisible(false); $this->docpanel->editdetail->add(new TextInput('editquantity'))->setText("1"); @@ -179,14 +186,14 @@ public function onCheckList($sender) { $this->docpanel->setVisible(false); $this->docpanel->form2->setVisible(false); $this->docpanel->form3->setVisible(false); - $this->docpanel->form4->setVisible(false); + $this->docpanel->formcheck->setVisible(false); $this->docpanel->editserdetail->setVisible(false); $this->docpanel->wselitem->setVisible(false); $this->docpanel->editdetail->setVisible(false); $this->checklistpan->setVisible(true); $this->checklistpan->statuspan->setVisible(true); - $this->updatechecklist(); + $this->updatechecklist(null); } @@ -201,13 +208,14 @@ public function cancel2docOnClick($sender) { public function cancel3docOnClick($sender) { $this->docpanel->form3->setVisible(true); - $this->docpanel->form4->setVisible(false); + $this->docpanel->formcheck->setVisible(false); } public function next1docOnClick($sender) { $this->pos = \App\Entity\Pos::load($this->form1->pos->getValue()); $this->_store_id = $this->form1->store->getValue(); + $this->_salesource = $this->form1->salesource->getValue(); $this->_pt = $this->form1->pricetype->getValue(); if ($this->pos == null) { @@ -229,6 +237,7 @@ public function next1docOnClick($sender) { $filter->pos = $this->form1->pos->getValue(); $filter->store = $this->_store_id; $filter->pricetype = $this->_pt; + $filter->salesource = $this->_salesource; $this->form1->setVisible(false); $this->docpanel->form2->setVisible(true); @@ -243,7 +252,7 @@ public function newdoc($sender) { $this->checklistpan->setVisible(false); - + $this->checklistpan->searchform->clean(); $this->_doc = \App\Entity\Doc\Document::create('POSCheck'); @@ -264,10 +273,10 @@ public function newdoc($sender) { $this->docpanel->form3->discount->setText(''); $this->docpanel->form2->setVisible(true); - $this->docpanel->form4->setVisible(false); + $this->docpanel->formcheck->setVisible(false); } - public function next2docOnClick($sender) { + public function topayOnClick($sender) { if (count($this->_itemlist) == 0 && count($this->_serlist) == 0) { $this->setError('noenterpos'); return; @@ -759,6 +768,7 @@ public function savedocOnClick($sender) { $this->_doc->headerdata['pos'] = $this->pos->pos_id; $this->_doc->headerdata['pos_name'] = $this->pos->pos_name; $this->_doc->headerdata['store'] = $this->_store_id; + $this->_doc->headerdata['salesource'] = $this->_salesource; $this->_doc->headerdata['pricetype'] = $this->_pt; $this->_doc->firm_id = $this->pos->firm_id; @@ -834,10 +844,10 @@ public function savedocOnClick($sender) { $this->docpanel->form3->customer->setText(''); $this->docpanel->form3->payment->setValue(H::getDefMF()); $this->docpanel->form3->setVisible(false); - $this->docpanel->form4->setVisible(true); - + $this->docpanel->formcheck->setVisible(true); + $this->docpanel->form3->notes->setText('') ; $check = $this->_doc->generatePosReport(); - $this->docpanel->form4->showcheck->setText($check, true); + $this->docpanel->formcheck->showcheck->setText($check, true); } public function OnPayment($sender) { @@ -960,19 +970,31 @@ public function closeshift() { public function onDocRow($row) { $doc = $row->getDataItem(); - $row->add(new ClickLink('docnumber',$this,'OnDocViewClick' ))->setValue($doc->document_number); - $row->add(new Label('state', Document::getStateName($doc->state))); + $row->add(new ClickLink('rownumber',$this,'OnDocViewClick' ))->setValue($doc->document_number); + $row->add(new Label('rowamount', H::fa($doc->amount))); + $row->add(new Label('rowdate', H::fd($doc->document_date))); $row->add(new Label('rownotes', $doc->notes)); - $row->add(new Label('waitpay' ))->setVisible($doc->payed < $doc->payamount && $doc->payamount>0); - + if ($doc->document_id == $this->_doc->document_id) { $row->setAttribute('class', 'table-success'); } } - private function updatechecklist() { + public function updatechecklist($sender) { $where = "meta_name='PosCheck' "; + if($sender instanceof Form){ + $text = trim($sender->searchnumber->getText()); + $cust = $sender->searchcust->getKey(); + if(strlen($text)>0) { + $where .= " and document_number=" .Document::qstr($text) ; + } + if(strlen($text)==0 && $cust >0) { + $where .= " and customer_id=" . $cust ; + } + + + } $this->_doclist = Document::find($where, 'document_id desc'); $this->checklistpan->checklist->Reload(); } diff --git a/www/app/pages/timesheet.php b/www/app/pages/timesheet.php index e2b9f4e48..3d4ec07a0 100644 --- a/www/app/pages/timesheet.php +++ b/www/app/pages/timesheet.php @@ -173,6 +173,16 @@ public function timeOnSubmit($sender) { $this->setError($v); return; } + + if($this->_tvars["usebranch"]) { + if($this->branch_id ==0) { + $this->setError('selbranch') ; + return ; + } + $time->branch_id=$this->branch_id; + } + + $time->save(); $this->updateList(); @@ -241,8 +251,14 @@ private function updateList() { $conn = \ZDB\DB::getConnect(); $t_start = $conn->DBDate($this->filter->from->getDate()); $t_end = $conn->DBDate($this->filter->to->getDate(true)); - - $this->_list = TimeItem::find("emp_id = {$emp_id} and t_start>={$t_start} and t_start<{$t_end} ", 't_start'); + $w = "emp_id = {$emp_id} and t_start>={$t_start} and t_start<{$t_end} " ; + + if($this->_tvars["usebranch"] && $this->branch_id >0) { + $w .= " and branch_id=".$this->branch_id ; + } + + + $this->_list = TimeItem::find($w, 't_start'); $this->tpanel->tagen->llist->Reload(); $tn = TimeItem::getTypeTime(); @@ -270,6 +286,7 @@ public function listOnRow($row) { $row->add(new Label('lto', date('H:i', $item->t_end))); $row->add(new Label('ltypename', $tl[$item->t_type])); $row->add(new Label('ldesc', $item->description)); + $row->add(new Label('lbranch', $item->branch_name)); $diff = $item->t_end - $item->t_start - ($item->t_break * 60); $diff = number_format($diff / 3600, 2, '.', ''); diff --git a/www/app/pages/userlogin.php b/www/app/pages/userlogin.php index cd981a4ed..f6b12ac7d 100644 --- a/www/app/pages/userlogin.php +++ b/www/app/pages/userlogin.php @@ -31,7 +31,7 @@ public function __construct() { $this->add($form); $this->setError(''); - $curver = 'v5.0.1'; + $curver = 'v5.0.2'; $this->_tvars['curversion'] = $curver; //проверка новой версии diff --git a/www/app/pages/userprofile.php b/www/app/pages/userprofile.php index a1662ad5f..bb91aef27 100644 --- a/www/app/pages/userprofile.php +++ b/www/app/pages/userprofile.php @@ -40,7 +40,9 @@ public function __construct() { $form->add(new DropDownChoice('defstore', \App\Entity\Store::getList(), $this->user->defstore)); $form->add(new DropDownChoice('defmf', \App\Entity\MoneyFund::getList(), $this->user->defmf)); $form->add(new DropDownChoice('pagesize', array(15 => 15, 25 => 25, 50 => 50, 100 => 100), $this->user->pagesize)); - + + $form->add(new DropDownChoice('defsalesource', H::getSaleSources() , $this->user->defsalesource)); + $pages = array(); foreach (\App\Entity\MetaData::find("meta_type<>1", "meta_type,description") as $m) { @@ -103,6 +105,7 @@ public function onsubmit($sender) { $this->user->deffirm = $sender->deffirm->getValue(); $this->user->defstore = $sender->defstore->getValue(); $this->user->defmf = $sender->defmf->getValue(); + $this->user->defsalesource = $sender->defsalesource->getValue(); $this->user->pagesize = $sender->pagesize->getValue(); $this->user->mainpage = $sender->mainpage->getValue(); diff --git a/www/app/pages/users.php b/www/app/pages/users.php index 346b99e0e..08ff249f7 100644 --- a/www/app/pages/users.php +++ b/www/app/pages/users.php @@ -184,6 +184,7 @@ public function OnUserRow($datarow) { $datarow->add(new \Zippy\Html\Label("userlogin", $item->userlogin)); $datarow->setAttribute('style', $item->disabled == 1 ? 'color: #aaa' : null); $datarow->add(new \Zippy\Html\Label("rolename", $item->rolename)); + $datarow->add(new \Zippy\Html\Label("empname", $item->employee_id >0 ?$item->username:'')); $datarow->add(new \Zippy\Html\Label("created", \App\Helper::fd($item->createdon))); $datarow->add(new \Zippy\Html\Label("email", $item->email)); diff --git a/www/composer.json b/www/composer.json index 8acb7718c..20e9e67ab 100644 --- a/www/composer.json +++ b/www/composer.json @@ -4,7 +4,8 @@ "homepage": "https://zippy.com.ua/", "license": "MIT" , - + "prefer-stable" : true, + "require": { "php": ">=7.2", @@ -27,7 +28,7 @@ "symfony/polyfill-mbstring": "v1.22.0", "symfony/polyfill-uuid": "v1.22.0", - "leon-mbs/zippy": "2.2.6" + "leon-mbs/zippy": "2.2.9" } } diff --git a/www/composer.lock b/www/composer.lock index ad4843f4a..70c67d831 100644 --- a/www/composer.lock +++ b/www/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4728cfc064cda9e3354789136f85c370", + "content-hash": "e5b23d3c95bc1d93cb32c8a466076553", "packages": [ { "name": "adodb/adodb-php", @@ -418,16 +418,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.8.1", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", "shasum": "" }, "require": { @@ -487,9 +487,9 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.1" + "source": "https://github.com/guzzle/psr7/tree/1.8.2" }, - "time": "2021-03-21T16:25:00+00:00" + "time": "2021-04-26T09:17:50+00:00" }, { "name": "lemmon/fetch", @@ -592,20 +592,20 @@ }, { "name": "leon-mbs/zdb", - "version": "1.2.12", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/leon-mbs/zdb.git", - "reference": "5f6a9864d48b349d2b8a0f0992f8d255f8270b57" + "reference": "9e5886c465415d927bd6fcfd16b6190ffcf3d8e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leon-mbs/zdb/zipball/5f6a9864d48b349d2b8a0f0992f8d255f8270b57", - "reference": "5f6a9864d48b349d2b8a0f0992f8d255f8270b57", + "url": "https://api.github.com/repos/leon-mbs/zdb/zipball/9e5886c465415d927bd6fcfd16b6190ffcf3d8e3", + "reference": "9e5886c465415d927bd6fcfd16b6190ffcf3d8e3", "shasum": "" }, "require": { - "adodb/adodb-php": "5.20.18", + "adodb/adodb-php": "v5.20.18", "php": ">=7.1.0" }, "type": "library", @@ -632,27 +632,27 @@ ], "support": { "issues": "https://github.com/leon-mbs/zdb/issues", - "source": "https://github.com/leon-mbs/zdb/tree/1.2.12" + "source": "https://github.com/leon-mbs/zdb/tree/1.4.1" }, - "time": "2021-03-06T21:42:19+00:00" + "time": "2021-05-07T06:44:21+00:00" }, { "name": "leon-mbs/zippy", - "version": "2.2.6", + "version": "2.2.9", "source": { "type": "git", "url": "https://github.com/leon-mbs/zippy.git", - "reference": "6641c66ad38eeca0928855ab66e7b280a510d5a6" + "reference": "18e946ffd99ae0f5cacf055ce318168bca5586f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leon-mbs/zippy/zipball/6641c66ad38eeca0928855ab66e7b280a510d5a6", - "reference": "6641c66ad38eeca0928855ab66e7b280a510d5a6", + "url": "https://api.github.com/repos/leon-mbs/zippy/zipball/18e946ffd99ae0f5cacf055ce318168bca5586f4", + "reference": "18e946ffd99ae0f5cacf055ce318168bca5586f4", "shasum": "" }, "require": { "leon-mbs/phpquery": ">=1.0.0", - "leon-mbs/zdb": "1.2.12", + "leon-mbs/zdb": "1.4.1", "mustache/mustache": "v2.13.0", "php": ">=7.2.0" }, @@ -679,9 +679,9 @@ ], "support": { "issues": "https://github.com/leon-mbs/zippy/issues", - "source": "https://github.com/leon-mbs/zippy/tree/2.2.6" + "source": "https://github.com/leon-mbs/zippy/tree/2.2.9" }, - "time": "2021-03-06T21:45:27+00:00" + "time": "2021-05-07T06:54:38+00:00" }, { "name": "lis-dev/nova-poshta-api-2", @@ -1407,16 +1407,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.4.0", + "version": "v6.4.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "050d430203105c27c30efd1dce7aa421ad882d01" + "reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/050d430203105c27c30efd1dce7aa421ad882d01", - "reference": "050d430203105c27c30efd1dce7aa421ad882d01", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d", + "reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d", "shasum": "" }, "require": { @@ -1471,7 +1471,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.1" }, "funding": [ { @@ -1479,7 +1479,7 @@ "type": "github" } ], - "time": "2021-03-31T20:06:42+00:00" + "time": "2021-04-29T12:25:04+00:00" }, { "name": "phpoffice/phpspreadsheet", @@ -1817,16 +1817,16 @@ }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -1850,7 +1850,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -1861,9 +1861,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -1966,12 +1966,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "07d2f0c0e6553fd7433f2eb7d043260d3bfd351d" + "reference": "07314cf15422b2e162d591fe8ef2b850612b808f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/07d2f0c0e6553fd7433f2eb7d043260d3bfd351d", - "reference": "07d2f0c0e6553fd7433f2eb7d043260d3bfd351d", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/07314cf15422b2e162d591fe8ef2b850612b808f", + "reference": "07314cf15422b2e162d591fe8ef2b850612b808f", "shasum": "" }, "conflict": { @@ -1988,7 +1988,8 @@ "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", "baserproject/basercms": ">=4,<=4.3.6|>=4.4,<4.4.1", - "bolt/bolt": "<3.7.1", + "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", + "bolt/bolt": "<3.7.2", "bolt/core": "<4.1.13", "brightlocal/phpwhois": "<=4.2.5", "buddypress/buddypress": "<5.1.2", @@ -1999,7 +2000,7 @@ "centreon/centreon": "<18.10.8|>=19,<19.4.5", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeigniter/framework": "<=3.0.6", - "composer/composer": "<=1-alpha.11", + "composer/composer": "<1.10.22|>=2-alpha.1,<2.0.13", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", "contao/core-bundle": ">=4,<4.4.52|>=4.5,<4.9.6|= 4.10.0", @@ -2020,6 +2021,7 @@ "dompdf/dompdf": ">=0.6,<0.6.2", "drupal/core": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", "drupal/drupal": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", + "dweeves/magmi": "<=0.7.24", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", @@ -2044,14 +2046,16 @@ "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", "fooman/tcpdf": "<6.2.22", + "forkcms/forkcms": "<5.8.3", "fossar/tcpdf-parser": "<6.2.22", + "francoisjacquet/rosariosis": "<6.5.1", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "fuel/core": "<1.8.1", - "getgrav/grav": "<1.7-beta.8", - "getkirby/cms": ">=3,<3.4.5", + "getgrav/grav": "<1.7.11", + "getkirby/cms": "<3.5.4", "getkirby/panel": "<2.5.14", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", @@ -2059,7 +2063,7 @@ "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", - "illuminate/database": "<6.20.14|>=7,<7.30.4|>=8,<8.24", + "illuminate/database": "<6.20.26|>=7,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": ">=7,<7.1.2", "impresscms/impresscms": "<=1.4.2", @@ -2072,10 +2076,10 @@ "kitodo/presentation": "<3.1.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", - "laravel/framework": "<6.20.14|>=7,<7.30.4|>=8,<8.24", + "laravel/framework": "<6.20.26|>=7,<8.40", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "league/commonmark": "<0.18.3", - "librenms/librenms": "<1.53", + "librenms/librenms": "<21.1", "livewire/livewire": ">2.2.4,<2.2.6", "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", "magento/magento1ce": "<1.9.4.3", @@ -2088,18 +2092,22 @@ "monolog/monolog": ">=1.8,<1.12", "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10,<3.10.2", "namshi/jose": "<2.2", + "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nystudio107/craft-seomatic": "<3.3", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", - "october/cms": "= 1.0.469|>=1.0.319,<1.0.469", + "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", "october/october": ">=1.0.319,<1.0.466", "october/rain": "<1.0.472|>=1.1,<1.1.2", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", + "opencart/opencart": "<=3.0.3.2", "openid/php-openid": "<2.3", - "openmage/magento-lts": "<19.4.8|>=20,<20.0.4", + "openmage/magento-lts": "<=19.4.12|>=20,<=20.0.8", "orchid/platform": ">=9,<9.4.4", "oro/crm": ">=1.7,<1.7.4", "oro/platform": ">=1.7,<1.7.4", @@ -2111,7 +2119,7 @@ "pear/archive_tar": "<1.4.12", "personnummer/personnummer": "<3.0.2", "phpfastcache/phpfastcache": ">=5,<5.0.13", - "phpmailer/phpmailer": "<6.1.6", + "phpmailer/phpmailer": "<6.1.6|>=6.1.8,<6.4.1", "phpmussel/phpmussel": ">=1,<1.6", "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3", "phpoffice/phpexcel": "<1.8.2", @@ -2134,15 +2142,18 @@ "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<0.7.19|>=1-rc.0,<=1-rc.6", "pusher/pusher-php-server": "<2.2.1", + "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", + "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.3.4", - "shopware/platform": "<=6.3.5.1", + "shopware/core": "<=6.3.5.2", + "shopware/platform": "<=6.3.5.2", + "shopware/production": "<=6.3.5.2", "shopware/shopware": "<5.6.9", "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", @@ -2219,15 +2230,17 @@ "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<9.5.25|>=10,<10.4.14|>=11,<11.1.1", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", - "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", + "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", + "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", "vrana/adminer": "<4.7.9", "wallabag/tcpdf": "<6.2.22", + "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": ">=1.1.14,<1.1.15", @@ -2239,6 +2252,7 @@ "yiisoft/yii2-jui": "<2.0.4", "yiisoft/yii2-redis": "<2.0.8", "yourls/yourls": "<1.7.4", + "zendesk/zendesk_api_client_php": "<2.2.11", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", @@ -2263,7 +2277,8 @@ "zetacomponents/mail": "<1.8.2", "zf-commons/zfc-user": "<1.2.2", "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", - "zfr/zfr-oauth2-server-module": "<0.1.2" + "zfr/zfr-oauth2-server-module": "<0.1.2", + "zoujingli/thinkadmin": "<6.0.22" }, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", @@ -2297,7 +2312,7 @@ "type": "tidelift" } ], - "time": "2021-04-07T21:01:39+00:00" + "time": "2021-05-06T19:08:33+00:00" }, { "name": "sabberworm/php-css-parser", @@ -2839,16 +2854,16 @@ }, { "name": "symfony/translation", - "version": "v5.2.6", + "version": "v5.2.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "2cc7f45d96db9adfcf89adf4401d9dfed509f4e1" + "reference": "e37ece5242564bceea54d709eafc948377ec9749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/2cc7f45d96db9adfcf89adf4401d9dfed509f4e1", - "reference": "2cc7f45d96db9adfcf89adf4401d9dfed509f4e1", + "url": "https://api.github.com/repos/symfony/translation/zipball/e37ece5242564bceea54d709eafc948377ec9749", + "reference": "e37ece5242564bceea54d709eafc948377ec9749", "shasum": "" }, "require": { @@ -2912,7 +2927,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.6" + "source": "https://github.com/symfony/translation/tree/v5.2.7" }, "funding": [ { @@ -2928,20 +2943,20 @@ "type": "tidelift" } ], - "time": "2021-03-23T19:33:48+00:00" + "time": "2021-04-01T08:15:21+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105" + "reference": "95c812666f3e91db75385749fe219c5e494c7f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e2eaa60b558f26a4b0354e1bbb25636efaaad105", - "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", + "reference": "95c812666f3e91db75385749fe219c5e494c7f95", "shasum": "" }, "require": { @@ -2953,7 +2968,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -2990,7 +3005,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.3.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" }, "funding": [ { @@ -3006,7 +3021,7 @@ "type": "tidelift" } ], - "time": "2020-09-28T13:05:58+00:00" + "time": "2021-03-23T23:28:01+00:00" } ], "packages-dev": [], @@ -3015,7 +3030,7 @@ "stability-flags": { "roave/security-advisories": 20 }, - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": ">=7.2" diff --git a/www/config/config.ini b/www/config/config.ini index e514233e7..842be1717 100644 --- a/www/config/config.ini +++ b/www/config/config.ini @@ -25,7 +25,7 @@ tls=true ocstore=0 ; интеграция с опенкарт shop=0 ; встроеный модуль онлайн каталога note=1 ; модуль органайзера(базы знаний) -issue=0 ; модуль Проекты и задачи +issue=1 ; модуль Проекты и задачи woocomerce=0 ; интеграция с вукомерсе tecdoc=0 ; поиск по базе автозапчастей ppo=0 ; фискализация diff --git a/www/templates/lang.json b/www/templates/lang.json index 4365a871b..197415d02 100644 --- a/www/templates/lang.json +++ b/www/templates/lang.json @@ -237,6 +237,7 @@ "garant": "Гарантия", "repbyitems": "По товарам", "repbycat": "По категориям", + "repbysalesource": "По источникам", "repbybyers": "По покупателям", "repbybyersitem": "Товары по покупателям", "repbydates": "По датам", diff --git a/www/templates/modules/issue/pages/issuelist.html b/www/templates/modules/issue/pages/issuelist.html index defe8553c..b60037447 100644 --- a/www/templates/modules/issue/pages/issuelist.html +++ b/www/templates/modules/issue/pages/issuelist.html @@ -148,7 +148,7 @@
Коментарии
- @@ -172,10 +172,10 @@
Коментарии

- + - +

-

+
diff --git a/www/templates/modules/note/pages/main.html b/www/templates/modules/note/pages/main.html index 4e25d1cba..ca1581843 100644 --- a/www/templates/modules/note/pages/main.html +++ b/www/templates/modules/note/pages/main.html @@ -170,7 +170,7 @@ - + - + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} {{#usesnumber}} @@ -77,7 +81,12 @@

Справочник номенклатуры

- + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} + @@ -291,6 +300,13 @@

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

Например для меню в общепите (300 гр, 250 мл...) +
+ +
+ + Отходы при списании в производство. В основном в общепите +
+
{{#useimages}} @@ -299,7 +315,7 @@

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


- +
diff --git a/www/templates/pages/base.html b/www/templates/pages/base.html index 2c5f5425f..6da995556 100644 --- a/www/templates/pages/base.html +++ b/www/templates/pages/base.html @@ -52,6 +52,7 @@ + {{/showdocmenu}} + {{#showrepmenu}} + {{/showrepmenu}} + {{#showregmenu}} + {{/showregmenu}} + {{#showrefmenu}} + {{/showrefmenu}} + {{#showsermenu}} - + {{/showsermenu}} + {{#showmodmenu}} + {{/showmodmenu}} + {{#isadmins}} Бренд Ед.Отп. цена{{hp1}}{{hp2}}{{hp3}}{{hp4}}{{hp5}}Ячейка
+
{{#useimages}} @@ -49,9 +49,14 @@

Товары на складе

- + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} - + + @@ -73,7 +78,11 @@

Товары на складе

- + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} diff --git a/www/templates/pages/register/orderlist.html b/www/templates/pages/register/orderlist.html index 88453f1cc..952984a01 100644 --- a/www/templates/pages/register/orderlist.html +++ b/www/templates/pages/register/orderlist.html @@ -14,8 +14,13 @@

Журнал заказов

+ + + diff --git a/www/templates/pages/report/outcome.html b/www/templates/pages/report/outcome.html index c3602a054..cbe57dd7d 100644 --- a/www/templates/pages/report/outcome.html +++ b/www/templates/pages/report/outcome.html @@ -27,6 +27,10 @@

Отчет по продажам

+ + diff --git a/www/templates/pages/service/armfood.html b/www/templates/pages/service/armfood.html index f6c3b63da..8a8d99788 100644 --- a/www/templates/pages/service/armfood.html +++ b/www/templates/pages/service/armfood.html @@ -57,7 +57,7 @@

АРМ кассира

Оформление заказа

- к списку заказов + Список заказов
@@ -208,7 +208,7 @@

Оформление заказа

- +
@@ -238,7 +238,7 @@

Оформление заказа

- +
@@ -283,13 +283,22 @@

Список заказов

Новый заказ     {{#hideblock}} Новая доставка {{/hideblock}} - {{#hideblock}} +
@@ -297,11 +306,12 @@

Список заказов

- {{/hideblock}} +
Мин. Кол. Кол.Прод. цена{{hp1}}{{hp2}}{{hp3}}{{hp4}}{{hp5}}На сумму
+ {{#tables}} @@ -320,6 +330,8 @@

Список заказов

+ + {{#tables}} {{/tables}} @@ -331,7 +343,7 @@

Список заказов

{{/hideblock}} - + @@ -404,19 +416,18 @@

 Новый покупатель

- {{#usescanner}} + + + {{#usescanner}} + + + + {{/usescanner}} diff --git a/www/templates/pages/service/armpos.html b/www/templates/pages/service/armpos.html index cbda398a7..99600fb59 100644 --- a/www/templates/pages/service/armpos.html +++ b/www/templates/pages/service/armpos.html @@ -30,6 +30,13 @@

АРМ кассира

+
+ + +
+
@@ -41,7 +48,7 @@

АРМ кассира

Оформление чека

- К списку чеков + Список чеков
{{#ppo}} @@ -67,7 +74,7 @@

Оформление чека

Добавить товар   Добавить услугу -    +   
Дата НомерСтол
@@ -224,7 +231,7 @@

Оформление чека

- +
@@ -336,57 +343,61 @@

Ввод услуги

Список чеков

Новый чек - {{#hideblock}} +
- {{/hideblock}} +
+ - - - - - - - - + + - - - - - + + + +
Дата НомерСтатусСумма
+ {{#hideblock}} - + +
- {{/hideblock}} + {{/hideblock}} +
diff --git a/www/templates/pages/timesheet.html b/www/templates/pages/timesheet.html index d2219b007..2546fd6c6 100644 --- a/www/templates/pages/timesheet.html +++ b/www/templates/pages/timesheet.html @@ -56,6 +56,7 @@

Табель учета рабочего времени

+ {{#usebranch}} {{/usebranch}} diff --git a/www/templates/pages/userprofile.html b/www/templates/pages/userprofile.html index 9f231132a..cdc504ff9 100644 --- a/www/templates/pages/userprofile.html +++ b/www/templates/pages/userprofile.html @@ -40,6 +40,14 @@

Мой профиль

+
+ + + +
+
diff --git a/www/templates/pages/users.html b/www/templates/pages/users.html index da8fcf4f7..72c10516f 100644 --- a/www/templates/pages/users.html +++ b/www/templates/pages/users.html @@ -28,6 +28,7 @@

Пользователи системы

Логин Роль + Сотрудник Дата рег. Email @@ -41,6 +42,7 @@

Пользователи системы

+ diff --git a/www/templates/printforms/report/outcome.tpl b/www/templates/printforms/report/outcome.tpl index 54de70ead..d7bd15309 100644 --- a/www/templates/printforms/report/outcome.tpl +++ b/www/templates/printforms/report/outcome.tpl @@ -78,7 +78,7 @@ {{/_type2}} {{#_type3}} - + Продажи по датам

@@ -86,6 +86,7 @@ Дата На сумму + Прибыль @@ -99,13 +100,14 @@ {{summa}} + {{navar}} {{/_detail}} -{{totsumma}} +{{totsumma}} {{totnavar}} {{/_type3}} @@ -237,4 +239,35 @@ {{totsumma}} {{totnavar}} -{{/_type7}} \ No newline at end of file +{{/_type7}} +{{#_type8}} + + + Продажи по источникам

+ + + + Наименование + + + На сумму + Прибыль + + + +{{#_detail}} + + + + {{name}} + + + {{summa}} + {{navar}} + + +{{/_detail}} + {{totsumma}} {{totnavar}} + + +{{/_type8}} diff --git a/www/templates_ua/lang.json b/www/templates_ua/lang.json index 369b4b7aa..b3bffb986 100644 --- a/www/templates_ua/lang.json +++ b/www/templates_ua/lang.json @@ -232,16 +232,17 @@ "extralogіn": "Багато невдалих авторизацій.", "іnvalіdlogіnalert": "Багато невдалих авторизацій. Адміністратору системи відіслано попередження", "garant": "Гарантія", - "repbyіtems": "По товарах", + "repbyitems": "По товарах", "repbycat": "По категоріях", + "repbysalesource": "По джерелех", "repbybyers": "По покупцях", - "repbybyersіtem": "Товари по покупцях", + "repbybyersitem": "Товари по покупцях", "repbydates": "По датах", "repbysellers": "По постачальниках", - "repbyservіces": "Послуги, роботи", - "repbybyersservіces": "Послуги по покупцях", + "repbyservices": "Послуги, роботи", + "repbybyersservices": "Послуги по покупцях", "repbyhold": "По холдингах", - "repbybyfіrm": "По компаніях", + "repbybyfirm": "По компаніях", "repbybystore": "По складах", "mall": "Всі", "mopen": "Відкриті", diff --git a/www/templates_ua/modules/issue/pages/issuelist.html b/www/templates_ua/modules/issue/pages/issuelist.html index c02017420..612064bd5 100644 --- a/www/templates_ua/modules/issue/pages/issuelist.html +++ b/www/templates_ua/modules/issue/pages/issuelist.html @@ -173,10 +173,10 @@
Коментарі

- + - +

-

+
diff --git a/www/templates_ua/pages/base.html b/www/templates_ua/pages/base.html index 5d69855f5..889822395 100644 --- a/www/templates_ua/pages/base.html +++ b/www/templates_ua/pages/base.html @@ -62,6 +62,34 @@ {{/usebranch}} + + {{#activeusers}} + + {{/activeusers}} + + {{#taskcnt}} + + {{/taskcnt}} + - + {{#showdocmenu}} + {{/showdocmenu}} + {{#showrepmenu}} + {{/showrepmenu}} + {{#showregmenu}} + {{/showregmenu}} + {{#showrefmenu}} + {{/showrefmenu}} + {{#showsermenu}} - + {{/showsermenu}} + {{#showmodmenu}} + {{/showmodmenu}} + {{#isadmins}}
+ -
+ + +
+
+

Громадське харчування

@@ -464,8 +490,7 @@

Громадське харчування

- - +
diff --git a/www/templates_ua/pages/reference/customerlist.html b/www/templates_ua/pages/reference/customerlist.html index c22424667..c4dfe8717 100644 --- a/www/templates_ua/pages/reference/customerlist.html +++ b/www/templates_ua/pages/reference/customerlist.html @@ -184,9 +184,14 @@

  Редагувати

- {{^leadmode}}
- + {{^leadmode}} +
+ +
+
+ +
diff --git a/www/templates_ua/pages/reference/itemlist.html b/www/templates_ua/pages/reference/itemlist.html index 5a8a3f861..41c7b7ead 100644 --- a/www/templates_ua/pages/reference/itemlist.html +++ b/www/templates_ua/pages/reference/itemlist.html @@ -8,7 +8,7 @@
-
+

Довідник номенклатури Довідник номенклатури Бренд Од. - Вiдп. ціна + {{#hp1}}{{hp1}}{{/hp1}} + {{#hp2}}{{hp2}}{{/hp2}} + {{#hp3}}{{hp3}}{{/hp3}} + {{#hp4}}{{hp4}}{{/hp4}} + {{#hp5}}{{hp5}}{{/hp5}} + Комірка {{#usesnumber}} @@ -78,7 +83,12 @@

Довідник номенклатури - + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} + {{#usesnumber}} @@ -289,6 +299,13 @@

Редагування

Наприклад для меню в кафе (300 гр, 250 мл...)

+
+ +
+ + Втрати при списаннi в виробництво. В основному в громадському харчуваннi +
+
{{#useimages}}
diff --git a/www/templates_ua/pages/register/gilist.html b/www/templates_ua/pages/register/gilist.html index 6092bfbf7..45bf57e2d 100644 --- a/www/templates_ua/pages/register/gilist.html +++ b/www/templates_ua/pages/register/gilist.html @@ -22,6 +22,10 @@

Журнал продажів

+ + diff --git a/www/templates_ua/pages/register/itemlist.html b/www/templates_ua/pages/register/itemlist.html index 3f08db7d0..3a35c387f 100644 --- a/www/templates_ua/pages/register/itemlist.html +++ b/www/templates_ua/pages/register/itemlist.html @@ -8,7 +8,7 @@
-
+

Товари на складі

Експорт в Excel - +
{{#useimages}} @@ -49,9 +49,14 @@

Товари на складі

- + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} + - + @@ -73,7 +78,12 @@

Товари на складі

- + {{#hp1}}{{/hp1}} + {{#hp2}}{{/hp2}} + {{#hp3}}{{/hp3}} + {{#hp4}}{{/hp4}} + {{#hp5}}{{/hp5}} + diff --git a/www/templates_ua/pages/register/orderlist.html b/www/templates_ua/pages/register/orderlist.html index d7c19f4b2..3e0c30d4d 100644 --- a/www/templates_ua/pages/register/orderlist.html +++ b/www/templates_ua/pages/register/orderlist.html @@ -14,9 +14,15 @@

Журнал замовлень

+ + + + diff --git a/www/templates_ua/pages/report/outcome.html b/www/templates_ua/pages/report/outcome.html index 478b891bf..93605b08b 100644 --- a/www/templates_ua/pages/report/outcome.html +++ b/www/templates_ua/pages/report/outcome.html @@ -26,6 +26,10 @@

Звіт з продажу

+ + diff --git a/www/templates_ua/pages/service/armfood.html b/www/templates_ua/pages/service/armfood.html index e08fb7762..90e5c6287 100644 --- a/www/templates_ua/pages/service/armfood.html +++ b/www/templates_ua/pages/service/armfood.html @@ -57,7 +57,7 @@

АРМ касира

Оформлення замовлення

- До списку замовлень + Список замовлень
@@ -283,13 +283,22 @@

Список заказов

Нове замовлення     {{#hideblock}} Нова доставка {{/hideblock}} - {{#hideblock}} +
@@ -297,11 +306,12 @@

Список заказов

- {{/hideblock}} +
Мін. Кіл. Кіл.Прод. ціна{{hp1}}{{hp2}}{{hp3}}{{hp4}}{{hp5}}На суму
+ {{#tables}} @@ -320,6 +330,7 @@

Список заказов

+ {{#tables}} {{/tables}} @@ -330,10 +341,10 @@

Список заказов

- {{/hideblock}} - + +
Дата НомерСтіл
@@ -404,19 +415,18 @@

 Новый покупатель

- {{#usescanner}} + + + {{#usescanner}} + + + + {{/usescanner}} diff --git a/www/templates_ua/pages/service/armpos.html b/www/templates_ua/pages/service/armpos.html index 78fea18ba..cd9e4804c 100644 --- a/www/templates_ua/pages/service/armpos.html +++ b/www/templates_ua/pages/service/armpos.html @@ -19,14 +19,20 @@

АРМ касира

- + +
+
+ +
@@ -42,7 +48,7 @@

АРМ касира

Оформлення чеку

- До списку чекiв + Список чекiв
{{#ppo}} @@ -67,7 +73,7 @@

Оформлення чеку

Додати товар   Додати послугу -    +    @@ -224,7 +230,7 @@

Оформлення чеку

- +
@@ -336,46 +342,48 @@

Введення послуги

Список чекiв

Новий чек - {{#hideblock}} +
- {{/hideblock}} +
+ - - - - - - - - + + - - - - - + + + diff --git a/www/templates_ua/pages/timesheet.html b/www/templates_ua/pages/timesheet.html index ab84289d7..9a492d38f 100644 --- a/www/templates_ua/pages/timesheet.html +++ b/www/templates_ua/pages/timesheet.html @@ -56,6 +56,7 @@

Табель облiку робочого часу

+ {{#usebranch}} {{/usebranch}} + @@ -40,6 +41,7 @@

Користувачі системи

+ diff --git a/www/templates_ua/printforms/report/outcome.tpl b/www/templates_ua/printforms/report/outcome.tpl index dd366b79f..46065ba4d 100644 --- a/www/templates_ua/printforms/report/outcome.tpl +++ b/www/templates_ua/printforms/report/outcome.tpl @@ -238,3 +238,35 @@
Дата НомерСтатусСума
diff --git a/www/templates_ua/pages/userprofile.html b/www/templates_ua/pages/userprofile.html index 9d97deded..0de56d5d9 100644 --- a/www/templates_ua/pages/userprofile.html +++ b/www/templates_ua/pages/userprofile.html @@ -36,6 +36,13 @@

Мій профіль

+
+ + + +
diff --git a/www/templates_ua/pages/users.html b/www/templates_ua/pages/users.html index 57c621bfe..1f5b362e3 100644 --- a/www/templates_ua/pages/users.html +++ b/www/templates_ua/pages/users.html @@ -27,6 +27,7 @@

Користувачі системи

Логін РольСпiвробiтнмк Дата реєс. Email
{{/_type7}} +{{#_type8}} + + + Продажi по джерелах

+ + + + Найменування + + + На суму + Прибуток + + + +{{#_detail}} + + + + {{name}} + + + {{summa}} + {{navar}} + + +{{/_detail}} + {{totsumma}} {{totnavar}} + + +{{/_type8}} +