File size: 10,226 Bytes
46463e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

import { TireProduct, StaffUser, Invoice, StockHistoryItem, SystemSettings } from './types';

export const INITIAL_STAFF: StaffUser[] = [
  { id: '1', name: 'Haider Ali', email: 'haider@traders.com', role: 'owner', active: true },
  { id: '2', name: 'Zain Brother', email: 'zain@traders.com', role: 'manager', active: true },
  { id: '3', name: 'Kamran Ali', email: 'kamran@traders.com', role: 'cashier', active: true },
  { id: '4', name: 'Ahmad Shah', email: 'ahmad@traders.com', role: 'cashier', active: false },
];

export const INITIAL_SETTINGS: SystemSettings = {
  shopName: 'Haider Brother Traders Tire Shop',
  shopAddress: 'Plot 4, Main Chaman Road, Quetta, Pakistan',
  shopPhone: '+92 300 1234567',
  taxName: 'Sales Tax (SRB)',
  taxRate: 15,
  currencyCode: 'PKR',
  currencySymbol: '₨',
};

export const INITIAL_PRODUCTS: TireProduct[] = [
  {
    id: 'p1',
    sku: 'YOKO2055516',
    brand: 'Yokohama',
    model: 'Advan DB V552',
    size: '205/55 R16',
    category: 'Passenger',
    stock: 42,
    minStock: 10,
    price: 32500,
    purchasePrice: 26000,
    description: 'Ultra quiet premium comfort radial tire. Excellent wet of dry grip.',
  },
  {
    id: 'p2',
    sku: 'BRIDGE1956515',
    brand: 'Bridgestone',
    model: 'Ecopia EP150',
    size: '195/65 R15',
    category: 'Passenger',
    stock: 8, // Trigger active alert!
    minStock: 15,
    price: 24000,
    purchasePrice: 19500,
    description: 'Fuel-efficient eco tire with reliable braking and rolling resistance features.',
  },
  {
    id: 'p3',
    sku: 'DUN1856514',
    brand: 'Dunlop',
    model: 'SP Touring R1',
    size: '185/65 R14',
    category: 'Passenger',
    stock: 65,
    minStock: 20,
    price: 18500,
    purchasePrice: 14800,
    description: 'Robust on-road performance, ideal for daily commutes on variable road surfaces.',
  },
  {
    id: 'p4',
    sku: 'GEN1757013',
    brand: 'General Tire',
    model: 'Euro Star',
    size: '175/70 R13',
    category: 'Passenger',
    stock: 120,
    minStock: 30,
    price: 14500,
    purchasePrice: 11200,
    description: 'Extremely durable, steel belted local radial built for Pakistani road terrain.',
  },
  {
    id: 'p5',
    sku: 'MIC2256517',
    brand: 'Michelin',
    model: 'Primacy SUV',
    size: '225/65 R17',
    category: 'SUV',
    stock: 18,
    minStock: 8,
    price: 49000,
    purchasePrice: 41000,
    description: 'Exceptional safety and handling for crossover SUVs. Extremely smooth ride.',
  },
  {
    id: 'p6',
    sku: 'SAIL2657016',
    brand: 'Sailun',
    model: 'Terramax A/T',
    size: '265/70 R16',
    category: 'SUV',
    stock: 14,
    minStock: 6,
    price: 38000,
    purchasePrice: 29800,
    description: 'Rugged all-terrain tire with deep multi-step grooves for high dirt-road traction.',
  },
  {
    id: 'p7',
    sku: 'DB3158022',
    brand: 'Double Star',
    model: 'DS806 Radial',
    size: '315/80 R22.5',
    category: 'Truck/Bus',
    stock: 3, // TRIGGER ACTIVE STOCK ALERT!
    minStock: 5,
    price: 88500,
    purchasePrice: 74000,
    description: 'Commercial steer & trailer tire with maximum ply rating and heavy load design.',
  },
];

export const INITIAL_HISTORY: StockHistoryItem[] = [
  {
    id: 'h1',
    productId: 'p2',
    productLabel: 'Bridgestone Ecopia EP150 (195/65 R15)',
    dateTime: '2026-05-15T09:30:00Z',
    type: 'STOCK_IN',
    quantity: 40,
    resultingStock: 48,
    adjustedBy: 'Zain Brother (Manager)',
    reason: 'Import batch cargo clearance directly from Port Qasim.',
  },
  {
    id: 'h2',
    productId: 'p2',
    productLabel: 'Bridgestone Ecopia EP150 (195/65 R15)',
    dateTime: '2026-05-28T14:15:00Z',
    type: 'STOCK_OUT',
    quantity: 40,
    resultingStock: 8,
    adjustedBy: 'Kamran Ali (Cashier)',
    reason: 'Bulk invoice sale to Al-Sadiq Rent-a-Car fleet.',
  },
  {
    id: 'h3',
    productId: 'p4',
    productLabel: 'General Tire Euro Star (175/70 R13)',
    dateTime: '2026-06-01T11:00:00Z',
    type: 'MANUAL_ADJUSTMENT',
    quantity: 50,
    resultingStock: 120,
    adjustedBy: 'Haider Ali (Owner)',
    reason: 'Physical mid-year audit recount: matched warehouse count variance.',
  },
  {
    id: 'h4',
    productId: 'p7',
    productLabel: 'Double Star DS806 Radial (315/80 R22.5)',
    dateTime: '2026-06-02T16:45:00Z',
    type: 'STOCK_OUT',
    quantity: 2,
    resultingStock: 3,
    adjustedBy: 'Kamran Ali (Cashier)',
    reason: 'Direct retail sale & installation on Hino Dump Truck.',
  },
];

// Let's seed realistic monthly invoicing for 2026 trends, supporting clean charts
export const INITIAL_INVOICES: Invoice[] = [
  {
    id: 'inv1',
    invoiceNumber: 'HBT-2026-1001',
    dateTime: '24-01-2026 10:15:00', // support readable and parsing
    customerName: 'Mehmood Khan',
    customerPhone: '0333-8889912',
    customerVehicle: 'Toyota Corolla (AJK-552)',
    items: [
      {
        id: 'li1',
        productId: 'p2',
        brand: 'Bridgestone',
        model: 'Ecopia EP150',
        size: '195/65 R15',
        quantity: 4,
        unitPrice: 23500,
        totalPrice: 94000,
      }
    ],
    subtotal: 94000,
    taxRate: 15,
    taxAmount: 14100,
    discount: 5000,
    total: 103100,
    currencySymbol: '₨',
    currencyCode: 'PKR',
    paymentMethod: 'CASH',
    paymentStatus: 'PAID',
    cashierName: 'Kamran Ali',
    notes: 'Free wheel balancing & tire valves supplied.',
    dateTimeOriginalISO: '2026-01-24T10:15:00Z',
  },
  {
    id: 'inv2',
    invoiceNumber: 'HBT-2026-1002',
    dateTime: '12-02-2026 14:45:00',
    customerName: 'Sufyan Transport Ltd',
    customerPhone: '0300-5557711',
    customerVehicle: 'Fuso Falcon (ST-9002)',
    items: [
      {
        id: 'li2',
        productId: 'p7',
        brand: 'Double Star',
        model: 'DS806 Radial',
        size: '315/80 R22.5',
        quantity: 6,
        unitPrice: 87000,
        totalPrice: 522000,
      }
    ],
    subtotal: 522000,
    taxRate: 15,
    taxAmount: 78300,
    discount: 22000,
    total: 578300,
    currencySymbol: '₨',
    currencyCode: 'PKR',
    paymentMethod: 'BANK_TRANSFER',
    paymentStatus: 'PAID',
    gatewayInfo: {
      gatewayName: 'Bank',
      transactionId: 'IBFT-MBL-88192003',
      authTime: '2026-02-12T15:00:00Z',
    },
    cashierName: 'Zain Brother',
    notes: 'Institutional customer discount applied.',
    dateTimeOriginalISO: '2026-02-12T14:45:00Z',
  },
  {
    id: 'inv3',
    invoiceNumber: 'HBT-2026-1003',
    dateTime: '05-03-2026 11:20:00',
    customerName: 'Dr. Tariq Jamil',
    customerPhone: '0312-9988111',
    customerVehicle: 'Honda Civic (ICT-LE-720)',
    items: [
      {
        id: 'li3',
        productId: 'p1',
        brand: 'Yokohama',
        model: 'Advan DB V552',
        size: '205/55 R16',
        quantity: 4,
        unitPrice: 32000,
        totalPrice: 128000,
      }
    ],
    subtotal: 128000,
    taxRate: 15,
    taxAmount: 19200,
    discount: 3000,
    total: 144200,
    currencySymbol: '₨',
    currencyCode: 'PKR',
    paymentMethod: 'CARD',
    paymentStatus: 'PAID',
    gatewayInfo: {
      gatewayName: 'Stripe',
      transactionId: 'ch_stripe_99a8b77c11',
      authTime: '2026-03-05T11:22:15Z',
    },
    cashierName: 'Kamran Ali',
    dateTimeOriginalISO: '2026-03-05T11:20:00Z',
  },
  {
    id: 'inv4',
    invoiceNumber: 'HBT-2026-1004',
    dateTime: '18-04-2026 16:30:00',
    customerName: 'Bilal Khan Achakzai',
    customerPhone: '0336-7788199',
    customerVehicle: 'Toyota Land Cruiser (V8-6600)',
    items: [
      {
        id: 'li4',
        productId: 'p6',
        brand: 'Sailun',
        model: 'Terramax A/T',
        size: '265/70 R16',
        quantity: 4,
        unitPrice: 38000,
        totalPrice: 152000,
      }
    ],
    subtotal: 152000,
    taxRate: 15,
    taxAmount: 22800,
    discount: 0,
    total: 174800,
    currencySymbol: '₨',
    currencyCode: 'PKR',
    paymentMethod: 'MOBILE_WALLET',
    paymentStatus: 'PAID',
    gatewayInfo: {
      gatewayName: 'EasyPaisa',
      transactionId: 'EP-92200192',
      authTime: '2026-04-18T16:35:00Z',
    },
    cashierName: 'Kamran Ali',
    dateTimeOriginalISO: '2026-04-18T16:30:00Z',
  },
  {
    id: 'inv5',
    invoiceNumber: 'HBT-2026-1005',
    dateTime: '22-05-2026 13:00:00',
    customerName: 'Sardar Yaqoob',
    customerPhone: '0303-3399120',
    customerVehicle: 'Suzuki Alto (QA-991)',
    items: [
      {
        id: 'li5',
        productId: 'p4',
        brand: 'General Tire',
        model: 'Euro Star',
        size: '175/70 R13',
        quantity: 2,
        unitPrice: 14500,
        totalPrice: 29000,
      }
    ],
    subtotal: 29000,
    taxRate: 15,
    taxAmount: 4350,
    discount: 1000,
    total: 32350,
    currencySymbol: '₨',
    currencyCode: 'PKR',
    paymentMethod: 'CASH',
    paymentStatus: 'PAID',
    cashierName: 'Ahmad Shah',
    dateTimeOriginalISO: '2026-05-22T13:00:00Z',
  },
  {
    id: 'inv6',
    invoiceNumber: 'HBT-2026-1006',
    dateTime: '02-06-2026 11:45:00', // Current month
    customerName: 'Asadullah Quetta Club',
    customerPhone: '0345-2211440',
    customerVehicle: 'Toyota Prado (BE-777)',
    items: [
      {
        id: 'li6',
        productId: 'p5',
        brand: 'Michelin',
        model: 'Primacy SUV',
        size: '225/65 R17',
        quantity: 4,
        unitPrice: 48500,
        totalPrice: 194000,
      },
      {
        id: 'li7',
        productId: 'p1',
        brand: 'Yokohama',
        model: 'Advan DB V552',
        size: '205/55 R16',
        quantity: 2,
        unitPrice: 32500,
        totalPrice: 65000,
      }
    ],
    subtotal: 259000,
    taxRate: 15,
    taxAmount: 38850,
    discount: 7850,
    total: 290000,
    currencySymbol: '₨',
    currencyCode: 'PKR',
    paymentMethod: 'CARD',
    paymentStatus: 'PAID',
    gatewayInfo: {
      gatewayName: 'Stripe',
      transactionId: 'ch_stripe_11x90cc',
      authTime: '2026-06-02T11:51:00Z',
    },
    cashierName: 'Kamran Ali',
    notes: 'Premium nitrogen inflation filled for Prado tyres.',
    dateTimeOriginalISO: '2026-06-02T11:45:00Z',
  }
] as (Invoice & { dateTimeOriginalISO: string })[];