<?php 

function post_new_expense_cb() {
	$banks = pm_bank_accounts_option();
	$options = array_merge($banks, ["Cash From Ledger" => "Cash From Ledger"]);
	?>
	<div class="row">
		<div class="col-md-6">
			<div class="card">
			    <div class="card-header">
			        <strong class="card-title">Enter Details of Expense</strong>
			    </div>
			    <div class="card-body">
			      	<form id="new-expense-form" method="post" enctype="multipart/form-data" action="contents/plugins/payment_module/ajax.php" data-clearform="true">
			      		<?php 
			      			select(['label' => 'Source of fund', 'id' => 'source_of_fund', 'required' => 'required'], $options, "Cash From Ledger");
			      			input(['label' => 'Beneficiary', 'id' => 'beneficiary', 'required' => 'required']);
			      			input(['label' => 'Amount ('.get_option('default_currency').')', 'id' => 'amount', 'class' => 'form-control numbers-only', 'required' => 'required']);
			      			textarea(['label' => 'Narration', 'id' => 'narration', 'required' => 'required']); 
			      			submit_btn("post_new_expense", "Submit"); 
			      		?>
			      	</form>
			    </div>
			</div>
		</div>
	</div>
	<?php
	global $post_meta;
	add_page_javascript('app/assets/js/page-scripts/submit.js');
	add_page_javascript('app/assets/js/page-scripts/koweb.js');
	do_action("pm_quick_menu");
}