|
@@ -195,19 +195,13 @@ func (b *PurchaseBillExcel) drawTableTitle() error {
|
|
|
b.Excel.SetCellValue(b.SheetName, val3Cel, value3)
|
|
|
return nil
|
|
|
}
|
|
|
- unit1 := "-"
|
|
|
- unit2 := "-"
|
|
|
+ unit1 := "元/张"
|
|
|
+ unit2 := "元/吨"
|
|
|
if len(b.Content.Paper) > 0 {
|
|
|
if b.Content.Paper[0].PriceUnit != "" {
|
|
|
unit1 = b.Content.Paper[0].PriceUnit
|
|
|
- } else if b.Content.Paper[0].Price2Unit != "" {
|
|
|
- unit2 = b.Content.Paper[0].Price2Unit
|
|
|
- } else {
|
|
|
- unit1 = "元/张"
|
|
|
- unit2 = "元/吨"
|
|
|
}
|
|
|
- if b.Content.Paper[0].PriceUnit != "" && b.Content.Paper[0].Price2Unit != "" {
|
|
|
- unit1 = b.Content.Paper[0].PriceUnit
|
|
|
+ if b.Content.Paper[0].Price2Unit != "" {
|
|
|
unit2 = b.Content.Paper[0].Price2Unit
|
|
|
}
|
|
|
}
|
|
@@ -440,7 +434,7 @@ func NewPurchaseBill(f *excelize.File) *PurchaseBillExcel {
|
|
|
|
|
|
func (b *PurchaseBillExcel) FormatToEmpty(str *string) {
|
|
|
if *str == "0" || *str == "0.000" {
|
|
|
- *str = ""
|
|
|
+ *str = "-"
|
|
|
}
|
|
|
|
|
|
}
|