-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from leon-mbs/dev
Dev
- Loading branch information
Showing
101 changed files
with
2,639 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
|
||
|
||
CREATE TABLE `empacc` ( | ||
`ea_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`emp_id` int(11) NOT NULL, | ||
`document_id` int(11) DEFAULT NULL, | ||
`optype` int(11) DEFAULT NULL, | ||
//`createdon` date NOT NULL, | ||
`notes` varchar(255) DEFAULT NULL, | ||
`amount` decimal(10,2) NOT NULL, | ||
|
||
PRIMARY KEY (`ea_id`), | ||
KEY `emp_id` (`emp_id`) | ||
) engine=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
|
||
|
||
CREATE TABLE `prodproc` ( | ||
`pp_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) DEFAULT NULL, | ||
`detail` LONGTEXT DEFAULT NULL, | ||
PRIMARY KEY (`pp_id`) | ||
|
||
) engine=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
|
||
|
||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,16 @@ | ||
|
||
CREATE TABLE `subscribes` ( | ||
`sub_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`sub_type` int(11) DEFAULT NULL, | ||
|
||
`reciever_type` int(11) DEFAULT NULL, | ||
|
||
`msg_type` int(11) DEFAULT NULL, | ||
`detail` LONGTEXT DEFAULT NULL, | ||
`detail` TEXT DEFAULT NULL, | ||
`msgtext` TEXT DEFAULT NULL, | ||
`disabled` int(1) DEFAULT 0, | ||
PRIMARY KEY (`sub_id`) | ||
|
||
) engine=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
/* | ||
|
||
CREATE TABLE `empacc` ( | ||
`ea_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`emp_id` int(11) NOT NULL, | ||
`document_id` int(11) DEFAULT NULL, | ||
`optype` int(11) DEFAULT NULL, | ||
//`createdon` date NOT NULL, | ||
`notes` varchar(255) DEFAULT NULL, | ||
`amount` decimal(10,2) NOT NULL, | ||
|
||
PRIMARY KEY (`ea_id`), | ||
KEY `emp_id` (`emp_id`) | ||
) engine=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
|
||
|
||
CREATE TABLE `prodproc` ( | ||
`pp_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) DEFAULT NULL, | ||
`detail` LONGTEXT DEFAULT NULL, | ||
PRIMARY KEY (`pp_id`) | ||
|
||
) engine=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
|
||
|
||
|
||
*/ | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 1, 'Перемещение денег', 'MoveMoney', 'Платежи', 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace App\Entity\Doc; | ||
|
||
use App\Entity\Pay; | ||
use App\Helper as H; | ||
|
||
/** | ||
* Класс-сущность документ перемещение денег | ||
* | ||
*/ | ||
class MoveMoney extends Document | ||
{ | ||
|
||
public function Execute() { | ||
|
||
Pay::addPayment($this->document_id, $this->document_date, 0 - $this->amount, $this->headerdata['paymentfrom'], 0, $this->notes); | ||
Pay::addPayment($this->document_id, $this->document_date, $this->amount, $this->headerdata['paymentto'], 0, $this->notes); | ||
|
||
|
||
return true; | ||
} | ||
|
||
public function generateReport() { | ||
|
||
|
||
$header = array( | ||
'amount' => H::fa($this->amount), | ||
'date' => H::fd($this->document_date), | ||
"notes" => $this->notes, | ||
"from" => $this->headerdata["paymentfromname"], | ||
"to" => $this->headerdata["paymenttoname"], | ||
"document_number" => $this->document_number | ||
); | ||
$report = new \App\Report('doc/movemoney.tpl'); | ||
|
||
$html = $report->generate($header); | ||
|
||
return $html; | ||
} | ||
|
||
protected function getNumberTemplate() { | ||
return 'ПМ-000000'; | ||
} | ||
|
||
} |
Oops, something went wrong.