Compare commits
3 Commits
363dc17f2d
...
6d8034a3de
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d8034a3de | |||
| fd30f4effc | |||
| e20a59a524 |
+79
-20
@@ -582,6 +582,13 @@ public class PdfBuilder
|
||||
var fontBig = new XFont("Arial", 30, XFontStyleEx.Bold);
|
||||
|
||||
int firstIndex = pageIndex * 2;
|
||||
int palletNumber =
|
||||
Settings._instance.pdfExport.rsPalNr +
|
||||
(firstIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||
|
||||
int bundleOnPallet =
|
||||
(firstIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||
|
||||
DrawGermanyRunningSheet(
|
||||
gfx,
|
||||
marginX,
|
||||
@@ -593,9 +600,21 @@ public class PdfBuilder
|
||||
grouped_nums,
|
||||
fontLabel,
|
||||
fontText,
|
||||
fontBig
|
||||
fontBig,
|
||||
palletNumber,
|
||||
bundleOnPallet,
|
||||
firstIndex + 1
|
||||
);
|
||||
|
||||
int secondIndex = firstIndex + 1;
|
||||
|
||||
int palletNumber2 =
|
||||
Settings._instance.pdfExport.rsPalNr +
|
||||
(secondIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||
|
||||
int bundleOnPallet2 =
|
||||
(secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||
|
||||
if (firstIndex + 1 < grouped_nums.Count)
|
||||
{
|
||||
DrawGermanyRunningSheet(
|
||||
@@ -605,11 +624,14 @@ public class PdfBuilder
|
||||
usableW,
|
||||
tableH,
|
||||
list,
|
||||
grouped_nums[firstIndex + 1],
|
||||
grouped_nums[secondIndex],
|
||||
grouped_nums,
|
||||
fontLabel,
|
||||
fontText,
|
||||
fontBig
|
||||
fontBig,
|
||||
palletNumber2,
|
||||
bundleOnPallet2,
|
||||
secondIndex + 1
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -628,8 +650,10 @@ public class PdfBuilder
|
||||
List<(int,string,string,string,int)> grouped_nums,
|
||||
XFont fontLabel,
|
||||
XFont fontText,
|
||||
XFont fontBig)
|
||||
{
|
||||
XFont fontBig,
|
||||
int pal_nr,
|
||||
int bundleOnPallet,
|
||||
int totalBundleNumber){
|
||||
double line = 1.0;
|
||||
|
||||
string sender = Customer.GetCustomerByID(list.owner_id)?.sender_address ?? "[Absender]";
|
||||
@@ -777,19 +801,23 @@ public class PdfBuilder
|
||||
new XRect(valueX, blY1 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
gfx.DrawString(options.rsBundGew, fontText, XBrushes.Black,
|
||||
new XRect(valueX, blY2 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
gfx.DrawString(options.rsPalNr.ToString(), fontText, XBrushes.Black,
|
||||
gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black,
|
||||
new XRect(valueX, blY3 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black,
|
||||
|
||||
gfx.DrawString(
|
||||
$"{bundleOnPallet}/{Settings._instance.pdfExport.rsBundNrPal}",
|
||||
fontText,
|
||||
XBrushes.Black,
|
||||
new XRect(valueX, blY4 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
|
||||
gfx.DrawString("[Bund-Nr. von Gesamtanzahl]", fontText, XBrushes.Black,
|
||||
gfx.DrawString(
|
||||
$"{totalBundleNumber}/{grouped_nums.Count}",
|
||||
fontText,
|
||||
XBrushes.Black,
|
||||
new XRect(valueX, blY5 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
@@ -923,6 +951,13 @@ public class PdfBuilder
|
||||
|
||||
int firstIndex = pageIndex * 2;
|
||||
|
||||
int palletNumber =
|
||||
Settings._instance.pdfExport.rsPalNr +
|
||||
(firstIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||
|
||||
int bundleOnPallet =
|
||||
(firstIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||
|
||||
DrawInternationalRunningSheet(
|
||||
gfx,
|
||||
marginX,
|
||||
@@ -934,11 +969,23 @@ public class PdfBuilder
|
||||
grouped_nums,
|
||||
fontLabel,
|
||||
fontText,
|
||||
fontBig
|
||||
fontBig,
|
||||
palletNumber,
|
||||
bundleOnPallet,
|
||||
firstIndex + 1
|
||||
);
|
||||
|
||||
if (firstIndex + 1 < grouped_nums.Count)
|
||||
{
|
||||
int secondIndex = firstIndex + 1;
|
||||
|
||||
int palletNumber2 =
|
||||
Settings._instance.pdfExport.rsPalNr +
|
||||
(secondIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||
|
||||
int bundleOnPallet2 =
|
||||
(secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||
|
||||
DrawInternationalRunningSheet(
|
||||
gfx,
|
||||
marginX,
|
||||
@@ -946,18 +993,21 @@ public class PdfBuilder
|
||||
usableW,
|
||||
tableH,
|
||||
list,
|
||||
grouped_nums[firstIndex + 1],
|
||||
grouped_nums[secondIndex],
|
||||
grouped_nums,
|
||||
fontLabel,
|
||||
fontText,
|
||||
fontBig
|
||||
fontBig,
|
||||
palletNumber2,
|
||||
bundleOnPallet2,
|
||||
secondIndex + 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
document.Save(path);
|
||||
}
|
||||
private void DrawInternationalRunningSheet(
|
||||
private void DrawInternationalRunningSheet(
|
||||
XGraphics gfx,
|
||||
double x,
|
||||
double y,
|
||||
@@ -968,7 +1018,10 @@ public class PdfBuilder
|
||||
List<(int,string,string,string,int)> grouped_nums,
|
||||
XFont fontLabel,
|
||||
XFont fontText,
|
||||
XFont fontBig)
|
||||
XFont fontBig,
|
||||
int pal_nr,
|
||||
int bundleOnPallet,
|
||||
int totalBundleNumber)
|
||||
{
|
||||
double line = 1.0;
|
||||
|
||||
@@ -1121,15 +1174,21 @@ public class PdfBuilder
|
||||
new XRect(valueX, blY2 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
gfx.DrawString(options.rsPalNr.ToString(), fontText, XBrushes.Black,
|
||||
gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black,
|
||||
new XRect(valueX, blY3 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black,
|
||||
gfx.DrawString(
|
||||
$"{bundleOnPallet}/{Settings._instance.pdfExport.rsBundNrPal}",
|
||||
fontText,
|
||||
XBrushes.Black,
|
||||
new XRect(valueX, blY4 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
gfx.DrawString("[Bund-Nr. von Gesamtanzahl]", fontText, XBrushes.Black,
|
||||
gfx.DrawString(
|
||||
$"{totalBundleNumber}/{grouped_nums.Count}",
|
||||
fontText,
|
||||
XBrushes.Black,
|
||||
new XRect(valueX, blY5 + 4, valueW, 14),
|
||||
XStringFormats.TopRight);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user