Form->create($deJournalEntry) ?> Form->control('de_journal_id', ['options' => $deJournals]); ?>
Form->control('de_journal_items.0.account_number_debit', [ 'type' => 'select', 'options' => $accounts, 'label' => 'Account', 'empty' => true, 'required' => true, ]); echo $this->Form->control('de_journal_items.0.external_account_number_debit', [ 'type' => 'select', 'options' => $externalAccounts ?? [], 'label' => 'External Account', 'empty' => true, 'required' => false, ]); ?>
Form->control('de_journal_items.0.amount', [ 'label' => false, ]); ?>
Form->control('de_journal_items.0.account_number_credit', [ 'type' => 'select', 'options' => $accounts, 'label' => 'Account', 'empty' => true, 'required' => true, ]); echo $this->Form->control('de_journal_items.0.external_account_number_credit', [ 'type' => 'select', 'options' => $externalAccounts ?? [], 'label' => 'External Account', 'empty' => true, 'required' => false, ]); ?>
Form->control('notes', ['type' => 'textarea', 'rows' => 2]); ?>
Form->button(__('Submit')) ?> Form->end() ?>