ReportStockAbstract<C extends ClosingRangeAbstract> constructor
ReportStockAbstract<C extends ClosingRangeAbstract> ({
- required List<
TicketWeebi> tickets, - required List<
C> closingsObjects, - required DateTime startDate,
- required DateTime endDate,
- required int objectId,
- required List<
CalibreWeebi< articlesC,ArticleRawAbstract> >
Implementation
ReportStockAbstract({
required List<TicketWeebi> tickets,
required List<C> closingsObjects,
required DateTime startDate,
required DateTime endDate,
required this.objectId,
required this.articlesC,
}) : emptyReportStockArtCalibres = List.generate(articlesC.length, (index) {
final rAs = <ReportStockArticle>[];
for (final a in articlesC[index].articles) {
final rA = ReportStockArticle(
calibreId: a.calibreId,
id: a.id,
start: startDate,
end: endDate,
initialQtCl: 0.0,
finalQtCl: 0.0,
qtIn: 0.0,
qtOut: 0.0,
designation: a.designation,
kind: a.kind);
rAs.add(rA);
}
return ReportStockArtCalibre(
id: articlesC[index].id,
title: articlesC[index].title,
start: startDate,
end: endDate,
initialQtCl: 0.0,
finalQtCl: 0.0,
varQtTickets: 0.0,
// initialQtTickets: 0.0,
articles: rAs);
}),
super(
tickets,
closingsObjects,
startDate,
endDate,
);