69 lines
1.9 KiB
C#
69 lines
1.9 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using DevExpress.XtraReports.UI;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
|
|
namespace InputFamilienhilfe.Neu
|
|
{
|
|
public partial class RechnungspositionenSubReport : DevExpress.XtraReports.UI.XtraReport
|
|
{
|
|
public RechnungspositionenSubReport()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
|
{
|
|
int count = 0;
|
|
|
|
foreach (var sip in pRO.ServiceInvoicePeriods)
|
|
{
|
|
foreach (var ii in sip.ServiceInvoiceItems)
|
|
{
|
|
count++;
|
|
if (ii.UnitCount.HasValue)
|
|
{
|
|
|
|
ii.Notice = "=";
|
|
}
|
|
else
|
|
{
|
|
if (ii.AmountPerUnit.HasValue && ii.AmountPerUnit < 0)
|
|
{
|
|
ii.AmountPerUnit *= -1;
|
|
ii.UnitCountString = "";
|
|
ii.Notice = "/";
|
|
ii.GrossAmount = ii.GrossAmount.Replace("-", "");
|
|
|
|
}
|
|
else
|
|
{
|
|
ii.UnitCountString = "";
|
|
ii.Notice = "";
|
|
ii.AmountPerUnit = null;
|
|
}
|
|
|
|
}
|
|
|
|
//if (ii.AmountPerUnit > 99)
|
|
//{
|
|
// cellDescription.WidthF = 290;
|
|
//}
|
|
|
|
}
|
|
}
|
|
|
|
if (count <= 1)
|
|
{
|
|
//tblGesamt.Visible = false;
|
|
//lblClaim.Visible = false;
|
|
}
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|