|
@@ -184,9 +184,15 @@ func (c *StockController) Stock_Detail_List() {
|
|
|
now := time.Now()
|
|
|
if len(T_start_date) == 0 {
|
|
|
T_start_date = time.Date(now.Year(), 1, 1, 0, 0, 0, 0, time.Local).Format("2006-01")
|
|
|
+ } else {
|
|
|
+ T_start_date_t, _ := lib.DateStrToTime(T_start_date)
|
|
|
+ T_start_date = T_start_date_t.Format("2006-01")
|
|
|
}
|
|
|
if len(T_end_date) == 0 {
|
|
|
- T_start_date = now.Format("2006-01")
|
|
|
+ T_end_date = now.Format("2006-01")
|
|
|
+ } else {
|
|
|
+ T_end_date_t, _ := lib.DateStrToTime(T_end_date)
|
|
|
+ T_end_date = T_end_date_t.Format("2006-01")
|
|
|
}
|
|
|
StockOutDao := Stock.NewStockOut(orm.NewOrm())
|
|
|
StockMonthDao := Stock.NewStockMonth(orm.NewOrm())
|
|
@@ -211,9 +217,15 @@ func (c *StockController) Stock_Detail_Excel() {
|
|
|
now := time.Now()
|
|
|
if len(T_start_date) == 0 {
|
|
|
T_start_date = time.Date(now.Year(), 1, 1, 0, 0, 0, 0, time.Local).Format("2006-01")
|
|
|
+ } else {
|
|
|
+ T_start_date_t, _ := lib.DateStrToTime(T_start_date)
|
|
|
+ T_start_date = T_start_date_t.Format("2006-01")
|
|
|
}
|
|
|
if len(T_end_date) == 0 {
|
|
|
- T_start_date = now.Format("2006-01")
|
|
|
+ T_end_date = now.Format("2006-01")
|
|
|
+ } else {
|
|
|
+ T_end_date_t, _ := lib.DateStrToTime(T_end_date)
|
|
|
+ T_end_date = T_end_date_t.Format("2006-01")
|
|
|
}
|
|
|
var class_List []Basic.ProductClass_R
|
|
|
|
|
@@ -1259,8 +1271,8 @@ func (c *StockController) StockIn_Excel() {
|
|
|
f.SetCellValue("Sheet1", fmt.Sprintf("D%d", row), product.T_spec)
|
|
|
if v.T_num > 0 {
|
|
|
f.SetCellValue("Sheet1", fmt.Sprintf("E%d", row), v.T_num)
|
|
|
+ f.SetCellValue("Sheet1", fmt.Sprintf("F%d", row), stockIn.T_remark)
|
|
|
}
|
|
|
- f.SetCellValue("Sheet1", fmt.Sprintf("F%d", row), stockIn.T_remark)
|
|
|
}
|
|
|
|
|
|
f.SetCellStyle("Sheet1", fmt.Sprintf("A%d", sRow), fmt.Sprintf("F%d", row), Style4)
|
|
@@ -2271,8 +2283,8 @@ func (c *StockController) StockOut_Excel() {
|
|
|
f.SetCellValue("Sheet1", fmt.Sprintf("D%d", row), product.T_spec)
|
|
|
if v.T_num > 0 {
|
|
|
f.SetCellValue("Sheet1", fmt.Sprintf("E%d", row), v.T_num)
|
|
|
+ f.SetCellValue("Sheet1", fmt.Sprintf("F%d", row), stockOut.T_remark)
|
|
|
}
|
|
|
- f.SetCellValue("Sheet1", fmt.Sprintf("F%d", row), stockOut.T_remark)
|
|
|
}
|
|
|
|
|
|
f.SetCellStyle("Sheet1", fmt.Sprintf("A%d", sRow), fmt.Sprintf("F%d", row), Style4)
|