-
-
Save fayqLs/90ad400a7277a64d3fd38e6344fa532c to your computer and use it in GitHub Desktop.
PEGA O ID DA UNIDADE LOGADA NO SISTEMA
This file contains hidden or 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
<?php | |
public function onSave($param = null) | |
{ | |
try | |
{ | |
TTransaction::open(self::$database); | |
$this->form->validate(); | |
$object = new Lancamento(); | |
$data = $this->form->getData(); | |
$object->fromArray((array) $data); | |
if (empty($object->id)) { | |
# CAPTURA E SALVA A UNIDADE LOGADA | |
$object->system_unit_id = TSession::getValue('userunitid'); | |
} | |
$object->store(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment