Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $transactionManager = new TransactionManager();
- $transaction = $transactionManager->get();
- $customer = New Client();
- $customer->setTransaction($transaction);
- $customer->assign($this->request->getPost());
- $customer->save();
- $clientContactType = new ClientContactsType();
- $clientContactType->setTransaction($transaction);
- $clientContactType->client = $customer;
- $clientContactType->name = 'Primary Account Holder';
- $clientContactType->description = '';
- if($clientContactType->save($this->request->getPost())){
- $this->flash->success('Saved');
- } else {
- $this->flash->error($clientContactType->getMessages());
- $transaction->rollback('Transaction rolled back');
- }
- $transaction->commit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement