-- inserts for DocumentTests

INSERT INTO wine_cultivation (cultid, name, description) VALUES
('B', 'Bio', 'AT-BIO-302');

INSERT INTO wine_attribute (attrid, name, active, max_kg_per_ha, strict, fill_lower) VALUES
('K', 'Kabinett',  TRUE, NULL, FALSE, 0);

INSERT INTO season (year, currency, min_kg_per_bs, max_kg_per_bs, penalty_per_kg, penalty_amount, penalty_none, start_date, end_date) VALUES
(2020, 'EUR', 1000, 2000, NULL, NULL, NULL, NULL, NULL);

INSERT INTO modifier (year, modid, ordering, name, abs, rel, standard, quick_select) VALUES
(2020, 'S', 0, 'Geschädigte Trauben', NULL, -0.1, FALSE, FALSE),
(2020, 'A', 0, 'Keine Voranmeldung', -1000, NULL, FALSE, FALSE);

INSERT INTO delivery (mgnr, year, did, date, time, zwstid, lnr) VALUES
(101, 2020,  1, '2020-10-01', '09:03:12', 'X', 1),
(102, 2020,  2, '2020-10-01', '09:35:56', 'X', 2),
(101, 2020,  3, '2020-10-01', '10:24:09', 'X', 3),
(102, 2020,  4, '2020-10-01', '11:13:52', 'X', 4),
(101, 2020,  5, '2020-10-01', '12:45:29', 'X', 5),
(102, 2020,  6, '2020-10-01', '13:18:43', 'X', 6),
(103, 2020,  7, '2020-10-02', '09:13:43', 'X', 1),
(103, 2020,  8, '2020-10-02', '09:28:02', 'X', 2),
(103, 2020,  9, '2020-10-02', '10:11:13', 'X', 3),
(104, 2020, 10, '2020-10-03', '14:13:32', 'X', 1),
(104, 2020, 11, '2020-10-03', '14:39:22', 'X', 2),
(104, 2020, 12, '2020-10-03', '15:15:41', 'X', 3);

INSERT INTO delivery_part (year, did, dpnr, sortid, attrid, cultid, weight, kmw, qualid, hkid, kgnr, net_weight, manual_weighing, spl_check, scale_id, weighing_id, weighing_reason) VALUES
(2020,  1, 1, 'GV', NULL, NULL,  3219, 15.0, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  2, 1, 'GV',  'K', NULL,  2987, 17.5, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  2, 2, 'GV',  'K', NULL,  1873, 17.7, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  3, 1, 'GV', NULL, NULL,  2561, 15.4, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  3, 2, 'GV',  'K', NULL,  3129, 17.6, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  3, 3, 'GV', NULL, NULL,  1280, 16.1, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  4, 1, 'GV', NULL, NULL,  4002, 16.7, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  4, 2, 'GV', NULL, NULL,   481, 15.3, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  5, 1, 'WR', NULL, NULL,  3192, 17.0, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  5, 2, 'WR', NULL, NULL,  2190, 17.1, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  6, 1, 'GV', NULL,  'B',  1732, 15.2, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  7, 1, 'GV', NULL,  'B',  3198, 16.3, 'QUW', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  7, 2, 'GV', NULL,  'B',  2134, 15.4, 'QUW', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  8, 1, 'GV', NULL,  'B',  2901, 16.0, 'QUW', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  8, 2, 'GV', NULL,  'B',  3321, 17.3, 'KAB', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020,  9, 1, 'WR', NULL,  'B',  3998, 17.2, 'KAB', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 10, 1, 'ZW', NULL, NULL,  1212, 15.0, 'QUW', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 10, 2, 'ZW', NULL, NULL,  2471, 15.2, 'QUW', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 10, 3, 'ZW', NULL, NULL,   842, 15.7, 'QUW', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 11, 1, 'ZW', NULL, NULL,  3578, 17.0, 'KAB', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 11, 2, 'ZW', NULL, NULL,  3862, 17.2, 'KAB', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 12, 1, 'BP', NULL, NULL,  2410, 18.0, 'KAB', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL),
(2020, 12, 2, 'BP', NULL, NULL,  2313, 18.1, 'KAB', 'WLNO', 15224, TRUE, FALSE, FALSE, NULL, NULL, NULL);
