發票微調
This commit is contained in:
parent
dc60934c99
commit
9c337fb0ee
@ -328,7 +328,7 @@ namespace SolarPower.Controllers
|
|||||||
ICellStyle style14bodyleftnoborder = workbook.CreateCellStyle();
|
ICellStyle style14bodyleftnoborder = workbook.CreateCellStyle();
|
||||||
style14bodyleftnoborder.SetFont(font14);
|
style14bodyleftnoborder.SetFont(font14);
|
||||||
style14bodyleftnoborder.Alignment = HorizontalAlignment.Left;
|
style14bodyleftnoborder.Alignment = HorizontalAlignment.Left;
|
||||||
style14bodyleftnoborder.VerticalAlignment = VerticalAlignment.Center;
|
style14bodyleftnoborder.VerticalAlignment = VerticalAlignment.Top;
|
||||||
style14bodyleftnoborder.BorderLeft = BorderStyle.Medium;
|
style14bodyleftnoborder.BorderLeft = BorderStyle.Medium;
|
||||||
style14bodyleftnoborder.WrapText = true;
|
style14bodyleftnoborder.WrapText = true;
|
||||||
|
|
||||||
@ -600,21 +600,24 @@ namespace SolarPower.Controllers
|
|||||||
|
|
||||||
|
|
||||||
row = sheet.CreateRow(27); //第27行
|
row = sheet.CreateRow(27); //第27行
|
||||||
|
row.Height = 40 * 15;
|
||||||
region = new CellRangeAddress(27, 29, 1, 6);
|
region = new CellRangeAddress(27, 29, 1, 6);
|
||||||
sheet.AddMergedRegion(region);
|
sheet.AddMergedRegion(region);
|
||||||
cell = row.CreateCell(1);
|
cell = row.CreateCell(1);
|
||||||
cell.SetCellValue($"計算期間:{bill.Result.StartAt}-{bill.Result.EndAt} \r售電收入 = ( 度數 {bill.Result.Kwh} * 費率{Math.Round(bill.Result.Money / 1.05 / bill.Result.Kwh,2)}) * 1.05 = {bill.Result.Money} 元");
|
cell.SetCellValue($"{bill.Result.PowerName}-太陽光電售電收入 \r計算期間:{bill.Result.StartAt}-{bill.Result.EndAt} \r售電收入 = ( 度數 {bill.Result.Kwh} * 費率{bill.Result.PowerRate}) * 1.05 = {bill.Result.Kwh * bill.Result.PowerRate * 1.05} 元");
|
||||||
cell.CellStyle = style14bodyleftnoborder;
|
cell.CellStyle = style14bodyleftnoborder;
|
||||||
cell = row.CreateCell(6);
|
cell = row.CreateCell(6);
|
||||||
cell.CellStyle = style14bodyrightnoborder;
|
cell.CellStyle = style14bodyrightnoborder;
|
||||||
|
|
||||||
row = sheet.CreateRow(28); //第28行
|
row = sheet.CreateRow(28); //第28行
|
||||||
|
row.Height = 40 * 15;
|
||||||
cell = row.CreateCell(1);
|
cell = row.CreateCell(1);
|
||||||
cell.CellStyle = style14bodyleftnoborder;
|
cell.CellStyle = style14bodyleftnoborder;
|
||||||
cell = row.CreateCell(6);
|
cell = row.CreateCell(6);
|
||||||
cell.CellStyle = style14bodyrightnoborder;
|
cell.CellStyle = style14bodyrightnoborder;
|
||||||
|
|
||||||
row = sheet.CreateRow(29); //第29行
|
row = sheet.CreateRow(29); //第29行
|
||||||
|
row.Height = 40 * 15;
|
||||||
cell = row.CreateCell(1);
|
cell = row.CreateCell(1);
|
||||||
cell.CellStyle = style14bodyleftnoborder;
|
cell.CellStyle = style14bodyleftnoborder;
|
||||||
cell = row.CreateCell(6);
|
cell = row.CreateCell(6);
|
||||||
|
|||||||
@ -48,6 +48,8 @@ namespace SolarPower.Models
|
|||||||
private string endAt;
|
private string endAt;
|
||||||
public string EndAt { get { return Convert.ToDateTime(endAt).ToString("yyyy/MM/dd"); } set { endAt = value; } }
|
public string EndAt { get { return Convert.ToDateTime(endAt).ToString("yyyy/MM/dd"); } set { endAt = value; } }
|
||||||
public int Kwh { get; set; }
|
public int Kwh { get; set; }
|
||||||
|
public double PowerRate { get; set; }
|
||||||
|
public string PowerName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,7 +82,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = @$"SELECT es.Money,ps.GUINumber,ps.TPCInvoiceBuyer,ps.TPCInvoiceAddress,cp.Name,cp.Logo,ps.Id,
|
var sql = @$"SELECT es.Money,ps.GUINumber,ps.TPCInvoiceBuyer,ps.TPCInvoiceAddress,cp.Name,cp.Logo,ps.Id,
|
||||||
es.StartAt,es.EndAt,es.Kwh
|
es.StartAt,es.EndAt,es.Kwh,ps.PowerRate,ps.Name as PowerName
|
||||||
FROM electricity_sold_record es
|
FROM electricity_sold_record es
|
||||||
LEFT JOIN power_station ps
|
LEFT JOIN power_station ps
|
||||||
ON es.PowerstationId = ps.Id
|
ON es.PowerstationId = ps.Id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user