Пример #1
0
 $this->CheckDataRight($chips);
 $enable = !empty($chips) && !$chips['deleted'];
 $status = biz_getDictionary('chipstatus', true);
 $url = $this->createWebUrl($do);
 if (!empty($_GPC['back'])) {
     $url = $this->createWebUrl($_GPC['back'], array('id' => $chips['id']));
 }
 $urlEdit = $this->createWebUrl($do, array('id' => $id, 'op' => 'pay', 'edit' => true));
 if (!$enable) {
     message('无效数据或认筹单不允许修改!', $url);
 }
 if (empty($chips['roomstatus'])) {
     message('认筹单未选房,不能录入订金信息!', $url);
 }
 $user_info = $chips['user'];
 $printed_Bills = biz_getBills($chips['qrcode'], 1, true);
 $inputBill = biz_getBill($chips['qrcode'], $billType, false);
 $totalMoney = $chips['ordermoney'] + $chips['premoney'];
 $enable = $totalMoney >= $chips['shouldpay'];
 $disableEdit = !isset($_GPC['edit']) || $_GPC['edit'] != 1;
 if (!$enable && empty($inputBill)) {
     $inputBill = array('printed' => 0, 'finance' => array(0 => array()));
     $disableEdit = false;
 }
 if (!empty($inputBill)) {
     $project = $_W['project'];
     $banks = biz_getBanks($project['BUGUID']);
     $project = biz_getProject($project['projguid']);
     $bank = biz_unserializer($project, 'bank');
 }
 if (checksubmit()) {
Пример #2
0
        echo '无效的参数';
        exit;
    }
    if (!$this->CheckDataRight($chips)) {
        echo '无权查看数据';
        exit;
    }
    if ($chips['pretype'] == 2) {
        $preattach = biz_unserializer($chips, 'preattach');
    }
    $user_info = $chips['user'];
    $pre_bills = biz_getBills($chips['qrcode'], 1, null);
    foreach ($pre_bills as &$bill) {
        if (empty($bill['Printed'])) {
            $bill['Printed'] = 1;
            $bill['InvoNo'] = '未打印生成';
        }
    }
    unset($bill);
    $order_bills = biz_getBills($chips['qrcode'], 2, null);
    foreach ($order_bills as &$bill) {
        if (empty($bill['Printed'])) {
            $bill['Printed'] = 1;
            $bill['InvoNo'] = '未打印生成';
        }
    }
    unset($bill);
    //$qrImage = $this->geneQrcodeImg($chips['qrcode']);
    include $this->template('chips_disp');
    exit;
}
Пример #3
0
 load()->web('print');
 $billType = 1;
 $id = intval($_GPC['id']);
 $chips = biz_getChips($id);
 $this->CheckDataRight($chips);
 $enable = !empty($chips) && !$chips['deleted'];
 $url = $this->createWebUrl($do);
 if (!empty($_GPC['back'])) {
     $url = $this->createWebUrl($_GPC['back'], array('id' => $chips['id']));
 }
 $urlEdit = $this->createWebUrl($do, array('id' => $id, 'op' => 'pay', 'edit' => true));
 if (!$enable) {
     message('无效数据或认筹单不允许修改!', $url);
 }
 $user_info = $chips['user'];
 $printed_Bills = biz_getBills($chips['qrcode'], $billType, true);
 $inputBill = biz_getBill($chips['qrcode'], $billType, false);
 $enable = in_array($chips['pretype'], array(0, 1));
 //$modifyLast=isset($_GPC['modi'])?intval($_GPC['modi']):false;
 //允许输入
 $maxInput = 2;
 $inputed = count($printed_Bills);
 //禁止修改或增加票据,必须加参数edit,才显示输入界面
 $disableEdit = !isset($_GPC['edit']) || $_GPC['edit'] != 1;
 if (empty($inputBill)) {
     if ($inputed == 0 || !$disableEdit) {
         $inputBill = array('Printed' => 0, 'finance' => array(0 => array()));
         $disableEdit = false;
     }
 }
 if (!empty($inputBill)) {
Пример #4
0
function down_OrderInfo($list)
{
    $map['title'] = '认购交款表';
    $map['fields'] = array(array('title' => '姓名', 'field' => 'cname', 'type' => 0), array('title' => '性别', 'field' => 'grender', 'type' => 0), array('title' => '手机号码', 'field' => 'mobile', 'type' => 2), array('title' => '证件号码', 'field' => 'cardid', 'type' => 2), array('title' => '房间信息', 'field' => 'roomcode', 'type' => 0), array('title' => '开票日期1', 'field' => 'KpDate1', 'type' => 2), array('title' => '票据编号1', 'field' => 'InvoNo1', 'type' => 2), array('title' => '票据明细1', 'field' => 'Details1', 'type' => 2), array('title' => '开票日期2', 'field' => 'KpDate2', 'type' => 2), array('title' => '票据编号2', 'field' => 'InvoNo2', 'type' => 2), array('title' => '票据明细2', 'field' => 'Details2', 'type' => 2), array('title' => '创建日期', 'field' => 'createtime', 'type' => 1), array('title' => '销售人员', 'field' => 'salesman', 'type' => 0), array('title' => '状态', 'field' => 'status', 'type' => 0));
    //addBrokerName($list, 'proid', 'proname');
    foreach ($list as &$item) {
        $bill = biz_getBills($item['qrcode'], 2, true);
        if (count($bill) == 1) {
            $item['KpDate1'] = !empty($bill[0]['KpDate']) ? $bill[0]['KpDate'] : '无';
            $item['InvoNo1'] = !isset($bill[0]['IvoNo']) ? $bill[0]['InvoNo'] : '无';
            $detail1 = $bill[0]['finance'];
            $dat1 = '';
            foreach ($detail1 as $d) {
                $dat1 .= '金额:' . $d['money'] . ',银行:' . $d['bank'] . ',转账单编号:' . $d['FsettleNo'] . ',摘要:' . $d['note'] . "\n";
            }
            $dat1 = rtrim($dat1, "\n");
            $item['Details1'] = $dat1;
            $item['KpDate2'] = '无';
            $item['InvoNo2'] = '无';
            $item['Details2'] = '无';
        }
        if (count($bill) == 2) {
            $item['KpDate1'] = !empty($bill[0]['KpDate']) ? $bill[0]['KpDate'] : '无';
            $item['InvoNo1'] = !isset($bill[0]['IvoNo']) ? $bill[0]['InvoNo'] : '无';
            $detail1 = $bill[0]['finance'];
            $dat1 = '';
            foreach ($detail1 as $d) {
                $dat1 .= '金额:' . $d['money'] . ',银行:' . $d['bank'] . ',转账单编号:' . $d['FsettleNo'] . ',摘要:' . $d['note'] . "\n";
            }
            $dat1 = rtrim($dat1, "\n");
            $item['Details1'] = $dat1;
            $item['KpDate2'] = !empty($bill[1]['KpDate']) ? $bill[1]['KpDate'] : '无';
            $item['InvoNo2'] = !isset($bill[1]['IvoNo']) ? $bill[1]['IvoNo'] : '无';
            $detail2 = $bill[1]['finance'];
            $dat2 = '';
            foreach ($detail2 as $d) {
                $dat2 .= '金额:' . $d['money'] . ',银行:' . $d['bank'] . ',转账单编号:' . $d['FsettleNo'] . ',摘要:' . $d['note'] . "\n";
            }
            $dat2 = rtrim($dat2, "\n");
            $item['Details2'] = $dat2;
        }
        $item['status'] = $status[$item['pretype']];
    }
    downExcel($map, $list);
}