2 Commits

Author SHA1 Message Date
fierke 42f8e499a4 [chore:] removed unneccessary comment 2026-06-26 15:22:46 +02:00
fierke 391f5bb0ec [feat:] BundNrPal = 0 => no details 2026-06-26 15:22:33 +02:00
+6 -83
View File
@@ -803,6 +803,7 @@ public class PdfBuilder
new XRect(valueX, blY1 + 4, valueW, 14), new XRect(valueX, blY1 + 4, valueW, 14),
XStringFormats.TopRight); XStringFormats.TopRight);
if (options.rsBundNrPal == null) goto nopal;
gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black, gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black,
new XRect(valueX, blY3 + 4, valueW, 14), new XRect(valueX, blY3 + 4, valueW, 14),
XStringFormats.TopRight); XStringFormats.TopRight);
@@ -815,7 +816,7 @@ public class PdfBuilder
new XRect(valueX, blY4 + 4, valueW, 14), new XRect(valueX, blY4 + 4, valueW, 14),
XStringFormats.TopRight); XStringFormats.TopRight);
nopal:
gfx.DrawString( gfx.DrawString(
$"{totalBundleNumber}/{grouped_nums.Count}", $"{totalBundleNumber}/{grouped_nums.Count}",
fontText, fontText,
@@ -830,88 +831,7 @@ public class PdfBuilder
XStringFormats.TopLeft); XStringFormats.TopLeft);
} }
// public void CreateInternationalRunningSheets(int setID, string path)
// {
// KasAddressList list = Settings._instance.addressSets.GetAddressSetByID(setID);
// var document = new PdfDocument();
// document.Info.Title = $"Laufzettel für {list.Name}";
// document.Info.Subject = "powered by logofclient";
// document.Info.Author = "logofclient";
//
// int margin = 50;
//
// var grouped_nums = GroupAddressesInternational(setID);
//
// foreach (var result in grouped_nums)
// {
// var page = document.AddPage();
// page.Size = PageSize.A4;
//
// var gfx = XGraphics.FromPdfPage(page);
//
// var width = page.Width.Point-margin;
// var height = page.Height.Point-margin;
// gfx.DrawLine(XPens.Black, margin, margin, margin, height);
// gfx.DrawLine(XPens.Black, margin, margin, width, margin);
// gfx.DrawLine(XPens.Black, width, margin, width, height);
// gfx.DrawLine(XPens.Black, margin, height, width, height);
//
// var boldfont = new XFont("Cantarell", 11, XFontStyleEx.Bold);
// var font = new XFont("Cantarell", 11, XFontStyleEx.Regular);
// var bigboldfont = new XFont("Cantarell", 35, XFontStyleEx.Bold);
//
// // Versandinfo
// gfx.DrawString($"Versand {list.Name}", boldfont, XBrushes.Black,
// new XRect(margin+5, margin, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"Start: ", font, XBrushes.Black,
// new XRect(margin+5, margin+25, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"{result.Item3}", font, XBrushes.Black,
// new XRect(margin+75, margin+25, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"Ende: ", font, XBrushes.Black,
// new XRect(margin+5, margin+40, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"{result.Item4}", font, XBrushes.Black,
// new XRect(margin+75, margin+40, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"Kunde: ", font, XBrushes.Black,
// new XRect(margin+5, margin+55, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"{Customer.GetCustomerByID(list.owner_id).name}", font, XBrushes.Black,
// new XRect(margin+75, margin+55, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"Absender: ", font, XBrushes.Black,
// new XRect(margin+5, margin+70, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"{Customer.GetCustomerByID(list.owner_id).sender_address}", font, XBrushes.Black,
// new XRect(margin+75, margin+70, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"Anzahl: ", font, XBrushes.Black,
// new XRect(margin+5, margin+85, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"{result.Item5}", font, XBrushes.Black,
// new XRect(margin+75, margin+85, width-margin, 25), XStringFormats.CenterLeft);
//
// // logofclient ad
// gfx.DrawString($"powered by logofclient", font, XBrushes.Black,
// new XRect(margin+5, height-55, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"(c) 2026 MyPapertown", font, XBrushes.Black,
// new XRect(margin+5, height-40, width-margin, 25), XStringFormats.CenterLeft);
// gfx.DrawString($"mypapercloud.de/logof", font, XBrushes.Black,
// new XRect(margin+5, height-25, width-margin, 25), XStringFormats.CenterLeft);
//
//
// int total_frac = 0;
// foreach (var item in grouped_nums)
// {
// if (item.Item2 == result.Item2) total_frac++;
// }
//
// // group number
// gfx.DrawString($"{result.Item2}", bigboldfont, XBrushes.Black,
// new XRect(margin, margin, width-margin, (height-margin)/2), XStringFormats.Center);
// gfx.DrawString($"Fraktion {result.Item1}/{total_frac}", font, XBrushes.Black,
// new XRect(margin, margin, width-margin, (height-margin)/2 + 50), XStringFormats.Center);
// }
//
// if (document.PageCount > 0)
// {
// document.Save(path);
// }
//
// }
public void CreateInternationalRunningSheets(int setID, string path) public void CreateInternationalRunningSheets(int setID, string path)
{ {
@@ -1179,10 +1099,12 @@ public class PdfBuilder
new XRect(valueX, blY2 + 4, valueW, 14), new XRect(valueX, blY2 + 4, valueW, 14),
XStringFormats.TopRight); XStringFormats.TopRight);
if (options.rsBundNrPal == 0) goto nopal;
gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black, gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black,
new XRect(valueX, blY3 + 4, valueW, 14), new XRect(valueX, blY3 + 4, valueW, 14),
XStringFormats.TopRight); XStringFormats.TopRight);
gfx.DrawString( gfx.DrawString(
$"{bundleOnPallet}/{Settings._instance.pdfExport.rsBundNrPal}", $"{bundleOnPallet}/{Settings._instance.pdfExport.rsBundNrPal}",
fontText, fontText,
@@ -1190,6 +1112,7 @@ public class PdfBuilder
new XRect(valueX, blY4 + 4, valueW, 14), new XRect(valueX, blY4 + 4, valueW, 14),
XStringFormats.TopRight); XStringFormats.TopRight);
nopal:
gfx.DrawString( gfx.DrawString(
$"{totalBundleNumber}/{grouped_nums.Count}", $"{totalBundleNumber}/{grouped_nums.Count}",
fontText, fontText,