215 lines
6.3 KiB
TypeScript
215 lines
6.3 KiB
TypeScript
|
|
import { PaymentTerms } from "../types/common";
|
|||
|
|
import { OrderStatusEnum, MmPurchaseOrder, RequestTypeEnum } from "../types/mm";
|
|||
|
|
import { mockMaterials } from "./mockMaterials";
|
|||
|
|
import { mockBusinessParties } from "./mockBusinessParties";
|
|||
|
|
|
|||
|
|
export const mockPurchaseOrders: MmPurchaseOrder[] = [
|
|||
|
|
{
|
|||
|
|
id: "ORD001",
|
|||
|
|
orderNumber: "SIP-2024-001",
|
|||
|
|
supplierId: "1",
|
|||
|
|
supplier: mockBusinessParties.find((s) => s.id === "1"),
|
|||
|
|
orderDate: new Date("2024-01-20"),
|
|||
|
|
deliveryDate: new Date("2024-02-03"),
|
|||
|
|
status: OrderStatusEnum.Delivered,
|
|||
|
|
paymentTerms: PaymentTerms.Net30,
|
|||
|
|
currency: "TRY",
|
|||
|
|
exchangeRate: 1,
|
|||
|
|
subtotal: 125000,
|
|||
|
|
taxAmount: 22500,
|
|||
|
|
totalAmount: 147500,
|
|||
|
|
deliveryAddress: {
|
|||
|
|
street: "Atatürk Cad. No:10",
|
|||
|
|
city: "İstanbul",
|
|||
|
|
state: "İstanbul",
|
|||
|
|
postalCode: "34000",
|
|||
|
|
country: "Türkiye",
|
|||
|
|
},
|
|||
|
|
terms: "30 gün içinde ödeme yapılacaktır.",
|
|||
|
|
notes: "Öncelikli sipariş - hızlı teslimat talep edildi.",
|
|||
|
|
items: [
|
|||
|
|
{
|
|||
|
|
id: "1",
|
|||
|
|
orderId: "ORD001",
|
|||
|
|
materialId: "1",
|
|||
|
|
material: mockMaterials.find((m) => m.id === "1"),
|
|||
|
|
description: "Galvanizli çelik profil",
|
|||
|
|
quantity: 100,
|
|||
|
|
unit: "adet",
|
|||
|
|
unitPrice: 850,
|
|||
|
|
totalPrice: 85000,
|
|||
|
|
deliveryDate: new Date("2024-02-03"),
|
|||
|
|
receivedQuantity: 100,
|
|||
|
|
deliveredQuantity: 100,
|
|||
|
|
remainingQuantity: 0,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "2",
|
|||
|
|
orderId: "ORD001",
|
|||
|
|
materialId: "2",
|
|||
|
|
material: mockMaterials.find((m) => m.id === "2"),
|
|||
|
|
description: "3.25mm kaynak elektrodu",
|
|||
|
|
quantity: 200,
|
|||
|
|
unit: "kg",
|
|||
|
|
unitPrice: 200,
|
|||
|
|
totalPrice: 40000,
|
|||
|
|
deliveryDate: new Date("2024-02-03"),
|
|||
|
|
receivedQuantity: 200,
|
|||
|
|
deliveredQuantity: 200,
|
|||
|
|
remainingQuantity: 0,
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
receipts: [],
|
|||
|
|
creationTime: new Date("2024-01-20"),
|
|||
|
|
lastModificationTime: new Date("2024-02-03"),
|
|||
|
|
requestId: "REQ001",
|
|||
|
|
requestTitle: "Üretim Malzemesi Talebi",
|
|||
|
|
requestType: RequestTypeEnum.Material,
|
|||
|
|
quotationId: "QUO001",
|
|||
|
|
expectedDeliveryDate: new Date("2024-02-05"),
|
|||
|
|
actualDeliveryDate: new Date("2024-02-03"),
|
|||
|
|
deliveryTerms: "Fabrika teslimi",
|
|||
|
|
attachments: ["siparis_formu.pdf", "teknik_sartname.pdf"],
|
|||
|
|
approvedBy: "Ayşe Demir",
|
|||
|
|
approvedAt: new Date("2024-01-20"),
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "ORD002",
|
|||
|
|
orderNumber: "SIP-2024-002",
|
|||
|
|
supplierId: "2",
|
|||
|
|
supplier: mockBusinessParties.find((s) => s.id === "2"),
|
|||
|
|
orderDate: new Date("2024-01-22"),
|
|||
|
|
deliveryDate: new Date("2024-02-10"),
|
|||
|
|
status: OrderStatusEnum.PartiallyDelivered,
|
|||
|
|
paymentTerms: PaymentTerms.Net45,
|
|||
|
|
currency: "TRY",
|
|||
|
|
exchangeRate: 0,
|
|||
|
|
subtotal: 0,
|
|||
|
|
taxAmount: 0,
|
|||
|
|
totalAmount: 280000,
|
|||
|
|
deliveryAddress: {
|
|||
|
|
street: "İnönü Mah. No:5",
|
|||
|
|
city: "Ankara",
|
|||
|
|
state: "Ankara",
|
|||
|
|
postalCode: "06000",
|
|||
|
|
country: "Türkiye",
|
|||
|
|
},
|
|||
|
|
terms: "45 gün içinde ödeme yapılacaktır.",
|
|||
|
|
notes: "Kademeli teslimat yapılacak.",
|
|||
|
|
items: [
|
|||
|
|
{
|
|||
|
|
id: "3",
|
|||
|
|
orderId: "ORD002",
|
|||
|
|
materialId: "3",
|
|||
|
|
material: mockMaterials.find((m) => m.id === "3"),
|
|||
|
|
description: "i7 işlemci, 16GB RAM, 512GB SSD",
|
|||
|
|
quantity: 10,
|
|||
|
|
unit: "adet",
|
|||
|
|
unitPrice: 25000,
|
|||
|
|
totalPrice: 250000,
|
|||
|
|
deliveryDate: new Date("2024-02-08"),
|
|||
|
|
receivedQuantity: 7,
|
|||
|
|
deliveredQuantity: 7,
|
|||
|
|
remainingQuantity: 3,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "4",
|
|||
|
|
orderId: "ORD002",
|
|||
|
|
materialId: "4",
|
|||
|
|
material: mockMaterials.find((m) => m.id === "4"),
|
|||
|
|
description: '24" LED monitör',
|
|||
|
|
quantity: 10,
|
|||
|
|
unit: "adet",
|
|||
|
|
unitPrice: 3000,
|
|||
|
|
totalPrice: 30000,
|
|||
|
|
deliveryDate: new Date("2024-02-10"),
|
|||
|
|
receivedQuantity: 10,
|
|||
|
|
deliveredQuantity: 10,
|
|||
|
|
remainingQuantity: 0,
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
receipts: [],
|
|||
|
|
creationTime: new Date("2024-01-22"),
|
|||
|
|
lastModificationTime: new Date("2024-02-08"),
|
|||
|
|
requestId: "REQ002",
|
|||
|
|
requestTitle: "Bilgisayar Ekipmanları",
|
|||
|
|
requestType: RequestTypeEnum.WorkCenter,
|
|||
|
|
quotationId: "QUO002",
|
|||
|
|
expectedDeliveryDate: new Date("2024-02-12"),
|
|||
|
|
actualDeliveryDate: new Date("2024-02-08"),
|
|||
|
|
deliveryTerms: "Ofis teslimi",
|
|||
|
|
attachments: ["siparis_detay.pdf"],
|
|||
|
|
approvedBy: "Murat Şen",
|
|||
|
|
approvedAt: new Date("2024-01-22"),
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "ORD003",
|
|||
|
|
orderNumber: "SIP-2024-003",
|
|||
|
|
supplierId: "3",
|
|||
|
|
supplier: mockBusinessParties.find((s) => s.id === "3"),
|
|||
|
|
orderDate: new Date("2024-01-25"),
|
|||
|
|
deliveryDate: new Date("2024-02-01"),
|
|||
|
|
status: OrderStatusEnum.Confirmed,
|
|||
|
|
paymentTerms: PaymentTerms.Prepaid,
|
|||
|
|
currency: "TRY",
|
|||
|
|
exchangeRate: 0,
|
|||
|
|
subtotal: 0,
|
|||
|
|
taxAmount: 0,
|
|||
|
|
totalAmount: 85000,
|
|||
|
|
deliveryAddress: {
|
|||
|
|
street: "Hürriyet Cad. No:20",
|
|||
|
|
city: "İzmir",
|
|||
|
|
state: "İzmir",
|
|||
|
|
postalCode: "35000",
|
|||
|
|
country: "Türkiye",
|
|||
|
|
},
|
|||
|
|
terms: "Hizmet başlamadan önce ödeme yapılacaktır.",
|
|||
|
|
notes: "6 aylık hizmet anlaşması.",
|
|||
|
|
items: [
|
|||
|
|
{
|
|||
|
|
id: "5",
|
|||
|
|
orderId: "ORD003",
|
|||
|
|
materialId: "4",
|
|||
|
|
material: mockMaterials.find((m) => m.id === "4"),
|
|||
|
|
description: "Aylık makine bakım hizmeti",
|
|||
|
|
quantity: 6,
|
|||
|
|
unit: "ay",
|
|||
|
|
unitPrice: 12000,
|
|||
|
|
totalPrice: 72000,
|
|||
|
|
deliveryDate: new Date("2024-02-01"),
|
|||
|
|
receivedQuantity: 0,
|
|||
|
|
deliveredQuantity: 0,
|
|||
|
|
remainingQuantity: 6,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "6",
|
|||
|
|
orderId: "ORD003",
|
|||
|
|
materialId: "5",
|
|||
|
|
material: mockMaterials.find((m) => m.id === "5"),
|
|||
|
|
description: "Acil durum müdahale paketi",
|
|||
|
|
quantity: 1,
|
|||
|
|
unit: "paket",
|
|||
|
|
unitPrice: 13000,
|
|||
|
|
totalPrice: 13000,
|
|||
|
|
deliveryDate: new Date("2024-02-01"),
|
|||
|
|
receivedQuantity: 0,
|
|||
|
|
deliveredQuantity: 0,
|
|||
|
|
remainingQuantity: 1,
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
receipts: [],
|
|||
|
|
creationTime: new Date("2024-01-25"),
|
|||
|
|
lastModificationTime: new Date("2024-01-26"),
|
|||
|
|
requestId: "REQ003",
|
|||
|
|
requestTitle: "Makine Bakım Hizmeti",
|
|||
|
|
requestType: RequestTypeEnum.Service,
|
|||
|
|
quotationId: "QUO003",
|
|||
|
|
expectedDeliveryDate: new Date("2024-02-01"),
|
|||
|
|
actualDeliveryDate: new Date("2024-02-01"),
|
|||
|
|
deliveryTerms: "Yerinde hizmet",
|
|||
|
|
attachments: ["hizmet_sozlesmesi.pdf"],
|
|||
|
|
approvedBy: "Can Demirtaş",
|
|||
|
|
approvedAt: new Date("2024-01-25"),
|
|||
|
|
},
|
|||
|
|
];
|