zoukankan      html  css  js  c++  java
  • PHP,Excel导出换行

    // 有id,才算真的有发票数据
    if ($v['b_invoice_id']) {
        $v['b_invoice_info'] = json_decode($v['b_invoice_json'],true);
        $v['b_invoice_str'] .= '类型:';
        if ((int)$v['b_invoice_purchase'] === 1) { $v['b_invoice_str'] .='(收购)'; }
        if ((int)$v['b_invoice_info']['type'] === 1) { $v['b_invoice_str'] .='普通发票'; } else { $v['b_invoice_str'] .= '专用发票'; }
        $v['b_invoice_str'] .= "
    公司名称/姓名:";
        $v['b_invoice_str'] .= $v['b_invoice_info']['company_name'];
        $v['b_invoice_str'] .= "
    识别号/身份证:";
        $v['b_invoice_str'] .= $v['b_invoice_info']['company_tax'];
        $v['b_invoice_str'] .= "
    电话:";
        $v['b_invoice_str'] .= $v['b_invoice_info']['company_telephone']?:'无';
        $v['b_invoice_str'] .= "
    地址:";
        $v['b_invoice_str'] .= $v['b_invoice_info']['company_address']?:'无';
        $v['b_invoice_str'] .= "
    开户行:";
        $v['b_invoice_str'] .= $v['b_invoice_info']['company_bank']?:'无';
        $v['b_invoice_str'] .= "
    开户账号:";
        $v['b_invoice_str'] .= $v['b_invoice_info']['company_account']?:'无';
    } else {
        $v['b_invoice_info'] = [];
    }
    if ($v['c_invoice_id']) {
        $v['c_invoice_info'] = json_decode($v['c_invoice_json'],true);
        $v['c_invoice_str'] .= '类型:';
        if ((int)$v['c_invoice_info']['type'] === 1) { $v['c_invoice_str'] .='普通发票'; } else { $v['c_invoice_str'] .= '专用发票'; }
        $v['c_invoice_str'] .= "
    公司名称:";
        $v['c_invoice_str'] .= $v['c_invoice_info']['company_name'];
        $v['c_invoice_str'] .= "
    识别号:";
        $v['c_invoice_str'] .= $v['c_invoice_info']['company_tax'];
        $v['c_invoice_str'] .= "
    电话:";
        $v['c_invoice_str'] .= $v['c_invoice_info']['company_telephone']?:'无';
        $v['c_invoice_str'] .= "
    地址:";
        $v['c_invoice_str'] .= $v['c_invoice_info']['company_address']?:'无';
        $v['c_invoice_str'] .= "
    开户行:";
        $v['c_invoice_str'] .= $v['c_invoice_info']['company_bank']?:'无';
        $v['c_invoice_str'] .= "
    开户账号:";
        $v['c_invoice_str'] .= $v['c_invoice_info']['company_account']?:'无';
    }
    


    必须是双引号。

  • 相关阅读:
    php测试题整理(0519)
    Ajax调用返回json,xml数据类型(0517--pm)
    python 收集测试日志--格式
    python3下tomorow模块报语法错误def async(n, base_type, timeout=None): ^ SyntaxError: invalid syntax
    appium 下载
    VMware 虚拟机设置固定ip
    Centos7 安装配置 SVN
    【Linux】 Centos7 安装 mysql-8.0
    win7 SP1 64位 原版 百度网盘下载
    win10操作系统 64位 原版 百度网盘下载
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/11156448.html
Copyright © 2011-2022 走看看