<div id="main_borders">
  <div id="main_inner_borders">
    <h2><strong>
      <?=$title?>
      </strong></h2>
       <? if ($this-> session-> flashdata('message')): ?>
    <div class='warning'>
      <?=$this-> session-> flashdata('message');?>
    </div>
    <? endif; ?>
<div id="orderForm">
  <? $attributes = array('class' => 'yform','AUTOCOMPLETE'=>'off'); ?>
  <?=form_open('page/invoice_details',$attributes); ?>
<fieldset>
<? $invoice_details = $this->MFuncs->getLatestInvoiceDetails($this->session->userdata('userid')); ?>
<legend><?=$this->lang->line('enter_invoice_details')?></legend>
<? if ($invoice_details) { ?>
        <div class="type-text"> 
        <?=form_label(lang('cmp_name')." *", 'cmp_name')?> 
        <? $data = array('name'=>'cmp_name','id'=>'cmp_name','size'=>25, 'value'=>$invoice_details['cmp_name'])?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_occupation')." *", 'cmp_occupation')?>
        <? $data = array('name'=>'cmp_occupation','id'=>'cmp_occupation','size'=>25, 'value'=>$invoice_details['cmp_occupation'])?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_afm')." *", 'cmp_afm')?>
        <? $data = array('name'=>'cmp_afm','id'=>'cmp_afm','size'=>25, 'value'=>$invoice_details['cmp_afm'])?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_address')." *", 'cmp_address')?>
        <? $data = array('name'=>'cmp_address','id'=>'cmp_address','size'=>25, 'value'=>$invoice_details['cmp_address'])?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_city')." *", 'cmp_city')?>
        <? $data = array('name'=>'cmp_city','id'=>'cmp_city','size'=>25, 'value'=>$invoice_details['cmp_city'])?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_doy')." *", 'cmp_doy')?>
        <? $data = array('name'=>'cmp_doy','id'=>'cmp_doy','size'=>25, 'value'=>$invoice_details['cmp_doy'])?> 
        <?=form_input($data); ?> 
        </div>
<? } else { ?>
        <div class="type-text"> 
        <?=form_label(lang('cmp_name')." *", 'cmp_name')?> 
        <? $data = array('name'=>'cmp_name','id'=>'cmp_name','size'=>25)?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_occupation')." *", 'cmp_occupation')?>
        <? $data = array('name'=>'cmp_occupation','id'=>'cmp_occupation','size'=>25)?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_afm')." *", 'cmp_afm')?>
        <? $data = array('name'=>'cmp_afm','id'=>'cmp_afm','size'=>25)?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_address')." *", 'cmp_address')?>
        <? $data = array('name'=>'cmp_address','id'=>'cmp_address','size'=>25)?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_city')." *", 'cmp_city')?>
        <? $data = array('name'=>'cmp_city','id'=>'cmp_city','size'=>25)?> 
        <?=form_input($data); ?> 
        </div>
        <div class="type-text"> 
        <?=form_label(lang('cmp_doy')." *", 'cmp_doy')?>
        <? $data = array('name'=>'cmp_doy','id'=>'cmp_doy','size'=>25)?> 
        <?=form_input($data); ?> 
        </div>
<? } ?>
        </fieldset>
        <div class="buttons"><?=anchor("complete_order_2/false", $this->lang->line('btn_back'),array('id'=>'back_btn','class'=>'positive'))?>
<button type="submit" class="positive"> <?=$this->lang->line('continue')?> </button></div>
 <?=form_close();?>
</div><div style="clear:both"></div>
</div>
</div>