Service/Calc/PvWriteOff.php
private function createOperation($trans, $dsBegin)
    {
        $datePerformed = $this->hlpDate->getUtcNowForDb();
        $req = new \Praxigento\Accounting\Api\Service\Operation\Create\Request();
        $req->setOperationTypeCode(Cfg::CODE_TYPE_OPER_PV_WRITE_OFF);
        $req->setDatePerformed($datePerformed);
        $req->setTransactions($trans);
        $period = substr($dsBegin, 0, 6);
        $note = "PV Write Off ($period)";
        $req->setOperationNote($note);
        $resp = $this->servOperation->exec($req);
        $result = $resp->getOperationId();
        return $result;
    }
private function createOperation($trans, $dsBegin)
    {
        $datePerformed = $this->hlpDate->getUtcNowForDb();
        $req = new \Praxigento\Accounting\Api\Service\Operation\Create\Request();
        $req->setOperationTypeCode(Cfg::CODE_TYPE_OPER_PV_WRITE_OFF);
        $req->setDatePerformed($datePerformed);
        $req->setTransactions($trans);
        $period = substr($dsBegin, 0, 6);
        $note = "PV Write Off ($period)";
        $req->setOperationNote($note);
        $resp = $this->servOperation->exec($req);
        $result = $resp->getOperationId();
        return $result;
    }
private function createOperation ( $ trans , $ dsBegin ) { $ datePerformed = $ this -> hlpDate -> getUtcNowForDb ( ) ; $ req = new \ Praxigento \ Accounting \ Api \ Service \ Operation \ Create \ Request ( ) ; $ req -> setOperationTypeCode ( Cfg :: CODE_TYPE_OPER_PV_WRITE_OFF ) ; $ req -> setDatePerformed ( $ datePerformed ) ; $ req -> setTransactions ( $ trans ) ; $ period = substr ( $ dsBegin , 0 , 6 ) ; $ note = "PV Write Off ($period)" ; $ req -> setOperationNote ( $ note ) ; $ resp = $ this -> servOperation -> exec ( $ req ) ; $ result = $ resp -> getOperationId ( ) ; return $ result ; }
Register new operation.

@param \Praxigento\Accounting\Repo\Data\Transaction[] $trans
@param string $dsBegin
@return int operation ID
@throws \Exception
Register new operation .