|
@@ -38,6 +38,7 @@ class OrderContractSvc{
|
|
|
'no'=>sprintf('PK%s%02d',date('YmdHis'),$this->getOrder()->id),
|
|
|
'tax_name'=>$this->taxName(),
|
|
|
'tax_no'=>$this->getTaxNo(),
|
|
|
+ 'jiafang'=>$this->jiafang(),
|
|
|
]);
|
|
|
}catch (\Exception $e){
|
|
|
$content='';
|
|
@@ -49,6 +50,18 @@ class OrderContractSvc{
|
|
|
return $content;
|
|
|
}
|
|
|
|
|
|
+ public function jiafang(){
|
|
|
+ $tax=$this->getOrder()->tax;
|
|
|
+ if(!$tax){
|
|
|
+ return $this->getOrder()->user->nickname??'';
|
|
|
+ }
|
|
|
+ if($tax['u_type']==1){
|
|
|
+ return $tax['name'];
|
|
|
+ }else{
|
|
|
+ return $tax['com_name'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function taxName(){
|
|
|
$tax=$this->getOrder()->tax;
|
|
|
if(empty($tax)){
|