Documents: restructure Documents/ directory
This commit is contained in:
33
Elwig/Documents/DeliveryNote.cs
Normal file
33
Elwig/Documents/DeliveryNote.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Elwig.Documents {
|
||||
public class DeliveryNote : BusinessDocument {
|
||||
|
||||
public Delivery Delivery;
|
||||
public string? Text;
|
||||
public Dictionary<string, (string, int, int, int, int)> MemberBins;
|
||||
|
||||
// 0 - none
|
||||
// 1 - GA only
|
||||
// 2 - GA only and area commitments of varieties from delivery note
|
||||
// 3 - full
|
||||
public int DisplayStats = App.Client.ModeDeliveryNoteStats;
|
||||
|
||||
public DeliveryNote(Delivery d, AppDbContext ctx) : base($"Traubenübernahmeschein Nr. {d.LsNr}", d.Member) {
|
||||
UseBillingAddress = true;
|
||||
ShowDateAndLocation = true;
|
||||
Delivery = d;
|
||||
Aside = Aside.Replace("</table>", "") +
|
||||
$"<thead><tr><th colspan='2'>Lieferung</th></tr></thead><tbody>" +
|
||||
$"<tr><th>LS-Nr.</th><td>{d.LsNr}</td></tr>" +
|
||||
$"<tr><th>Datum/Zeit</th><td>{d.Date:dd.MM.yyyy} / {d.Time:HH:mm}</td></tr>" +
|
||||
$"<tr><th>Zweigstelle</th><td>{d.Branch.Name}</td></tr>" +
|
||||
$"</tbody></table>";
|
||||
Text = App.Client.TextDeliveryNote;
|
||||
DocumentId = d.LsNr;
|
||||
MemberBins = ctx.GetMemberBins(d.Year, d.Member.MgNr).GetAwaiter().GetResult();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user