<?php 
/**
 * The receive payments file of contract module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Tingting Dai <daitingting@xirangit.com>
 * @package     contract 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../../sys/common/view/header.modal.html.php';?>
<?php include '../../../sys/common/view/editor.html.php';?>
<form method='post' id='ajaxForm' class='form-table' action='<?php echo inlink('editReturn', "returnID={$return->id}")?>'>
  <table class='table table-form'>
    <tr>
      <th><?php echo $lang->$moduleType->all;?></th>
      <td><?php echo zget($currencySign, $contract->currency, $contract->currency) . $contract->amount;?></td>
    </tr>
    <tr>
      <th class='w-80px'><?php echo $lang->$moduleType->thisAmount;?></th>
      <td class='w-p40'>
        <div class='required required-wrapper'></div>
        <div class='input-group'>
          <?php echo html::input('amount', $return->amount, "class='form-control'");?>
          <?php $checked = $contract->return == 'done' ? 'checked' : '';?>
          <div class='input-group-addon'>
            <label class='checkbox-inline'><input type='checkbox' id='finish' name='finish' value='1' <?php echo $checked;?>> <?php echo $lang->$moduleType->completeReturn;?></label>
          </div>
        </div>
      </td><td></td>
    </tr>
    <tr>
      <th><?php echo $lang->$moduleType->returnedBy;?></th>
      <td><?php echo html::select('returnedBy', $users, $return->returnedBy, "class='form-control chosen'");?></td><td></td>
    </tr>
    <tr>
      <th><?php echo $lang->$moduleType->returnedDate;?></th>
      <td>
        <div class='required required-wrapper'></div>
        <?php echo html::input('returnedDate', formatTime($return->returnedDate, DT_DATE1), "class='form-control form-date'");?>
      </td>
    </tr>
    <?php if($moduleType == 'contract'):?>
    <tr>
      <th><?php echo $lang->$moduleType->handlers;?></th>
      <td colspan='2'><?php echo html::select('handlers[]', $users, $contract->handlers, "class='form-control chosen' multiple");?></td>
    </tr>
    <?php endif;?>
    <tr>
      <th><?php echo $lang->comment;?></th>
      <td colspan='2'><?php echo html::textarea('comment');?></td>
    </tr>
    <tr>
      <th></th>
      <td class='form-actions'><?php echo html::submitButton();?></td>
    </tr>
  </table>
</form>
<?php include '../../../sys/common/view/footer.modal.html.php';?>
