





















const db = require('../models');
const Users = db.users;






const Organizations = db.organizations;

const OrganizationMemberships = db.organization_memberships;

const TaxRates = db.tax_rates;

const PaymentTerms = db.payment_terms;

const NumberingSequences = db.numbering_sequences;

const Clients = db.clients;

const Suppliers = db.suppliers;

const ProductCategories = db.product_categories;

const Units = db.units;

const Products = db.products;

const Warehouses = db.warehouses;

const Quotes = db.quotes;

const QuoteItems = db.quote_items;

const SalesOrders = db.sales_orders;

const SalesOrderItems = db.sales_order_items;

const DeliveryNotes = db.delivery_notes;

const DeliveryNoteItems = db.delivery_note_items;

const Invoices = db.invoices;

const InvoiceItems = db.invoice_items;

const Payments = db.payments;

const CreditNotes = db.credit_notes;

const CreditNoteItems = db.credit_note_items;

const PurchaseOrders = db.purchase_orders;

const PurchaseOrderItems = db.purchase_order_items;

const StockReceptions = db.stock_receptions;

const StockReceptionItems = db.stock_reception_items;

const StockReservations = db.stock_reservations;

const StockMovements = db.stock_movements;

const InventoryCounts = db.inventory_counts;

const InventoryCountItems = db.inventory_count_items;

const ImportJobs = db.import_jobs;

const AuditLogs = db.audit_logs;







const OrganizationsData = [
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
];



const OrganizationMembershipsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "org_role": "viewer",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "org_role": "viewer",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "org_role": "staff",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "org_role": "sales",
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "org_role": "accounting",
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
    },
    
];



const TaxRatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "rate_percent": 3.97,
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "rate_percent": 3.29,
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "rate_percent": 5.63,
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "rate_percent": 3.29,
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "rate_percent": 2.57,
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
];



const PaymentTermsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "due_days": 3,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "due_days": 5,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "due_days": 4,
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                "is_default": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "due_days": 4,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_default": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "due_days": 4,
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_default": false,
            
        
    
    },
    
];



const NumberingSequencesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "purchase_order",
            
        
    
        
        
            
                "prefix": "Alan Turing",
            
        
    
        
        
            
                "next_number": 5,
            
        
    
        
        
            
                "padding": 9,
            
        
    
        
        
            
                "format_hint": "Alan Turing",
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "quote",
            
        
    
        
        
            
                "prefix": "Ada Lovelace",
            
        
    
        
        
            
                "next_number": 6,
            
        
    
        
        
            
                "padding": 9,
            
        
    
        
        
            
                "format_hint": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "delivery_note",
            
        
    
        
        
            
                "prefix": "Ada Lovelace",
            
        
    
        
        
            
                "next_number": 1,
            
        
    
        
        
            
                "padding": 1,
            
        
    
        
        
            
                "format_hint": "Alan Turing",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "delivery_note",
            
        
    
        
        
            
                "prefix": "Grace Hopper",
            
        
    
        
        
            
                "next_number": 3,
            
        
    
        
        
            
                "padding": 7,
            
        
    
        
        
            
                "format_hint": "Marie Curie",
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "invoice",
            
        
    
        
        
            
                "prefix": "Alan Turing",
            
        
    
        
        
            
                "next_number": 9,
            
        
    
        
        
            
                "padding": 3,
            
        
    
        
        
            
                "format_hint": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const ClientsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Grace Hopper",
            
        
    
        
        
            
                "company_name": "Alan Turing",
            
        
    
        
        
            
                "contact_name": "Ada Lovelace",
            
        
    
        
        
            
                "email": "Grace Hopper",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "city": "Ada Lovelace",
            
        
    
        
        
            
                "ice": "Ada Lovelace",
            
        
    
        
        
            
                "if_number": "Alan Turing",
            
        
    
        
        
            
                "rc": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                "company_name": "Alan Turing",
            
        
    
        
        
            
                "contact_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Alan Turing",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "city": "Alan Turing",
            
        
    
        
        
            
                "ice": "Ada Lovelace",
            
        
    
        
        
            
                "if_number": "Grace Hopper",
            
        
    
        
        
            
                "rc": "Marie Curie",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "company_name": "Alan Turing",
            
        
    
        
        
            
                "contact_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "ice": "Marie Curie",
            
        
    
        
        
            
                "if_number": "Ada Lovelace",
            
        
    
        
        
            
                "rc": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "company_name": "Grace Hopper",
            
        
    
        
        
            
                "contact_name": "Marie Curie",
            
        
    
        
        
            
                "email": "Alan Turing",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "address": "Alan Turing",
            
        
    
        
        
            
                "city": "Alan Turing",
            
        
    
        
        
            
                "ice": "Ada Lovelace",
            
        
    
        
        
            
                "if_number": "Marie Curie",
            
        
    
        
        
            
                "rc": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Marie Curie",
            
        
    
        
        
            
                "company_name": "Marie Curie",
            
        
    
        
        
            
                "contact_name": "Ada Lovelace",
            
        
    
        
        
            
                "email": "Grace Hopper",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "city": "Alan Turing",
            
        
    
        
        
            
                "ice": "Grace Hopper",
            
        
    
        
        
            
                "if_number": "Ada Lovelace",
            
        
    
        
        
            
                "rc": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SuppliersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Marie Curie",
            
        
    
        
        
            
                "company_name": "Alan Turing",
            
        
    
        
        
            
                "contact_name": "Ada Lovelace",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Marie Curie",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "city": "Ada Lovelace",
            
        
    
        
        
            
                "ice": "Marie Curie",
            
        
    
        
        
            
                "if_number": "Alan Turing",
            
        
    
        
        
            
                "rc": "Grace Hopper",
            
        
    
        
        
            
                "bank_name": "Marie Curie",
            
        
    
        
        
            
                "bank_account": "Marie Curie",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                "company_name": "Ada Lovelace",
            
        
    
        
        
            
                "contact_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Marie Curie",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "city": "Grace Hopper",
            
        
    
        
        
            
                "ice": "Alan Turing",
            
        
    
        
        
            
                "if_number": "Marie Curie",
            
        
    
        
        
            
                "rc": "Alan Turing",
            
        
    
        
        
            
                "bank_name": "Marie Curie",
            
        
    
        
        
            
                "bank_account": "Marie Curie",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                "company_name": "Grace Hopper",
            
        
    
        
        
            
                "contact_name": "Marie Curie",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "ice": "Ada Lovelace",
            
        
    
        
        
            
                "if_number": "Ada Lovelace",
            
        
    
        
        
            
                "rc": "Ada Lovelace",
            
        
    
        
        
            
                "bank_name": "Alan Turing",
            
        
    
        
        
            
                "bank_account": "Alan Turing",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "company_name": "Alan Turing",
            
        
    
        
        
            
                "contact_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Marie Curie",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "ice": "Ada Lovelace",
            
        
    
        
        
            
                "if_number": "Marie Curie",
            
        
    
        
        
            
                "rc": "Ada Lovelace",
            
        
    
        
        
            
                "bank_name": "Grace Hopper",
            
        
    
        
        
            
                "bank_account": "Marie Curie",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Marie Curie",
            
        
    
        
        
            
                "company_name": "Grace Hopper",
            
        
    
        
        
            
                "contact_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "ice": "Ada Lovelace",
            
        
    
        
        
            
                "if_number": "Marie Curie",
            
        
    
        
        
            
                "rc": "Ada Lovelace",
            
        
    
        
        
            
                "bank_name": "Grace Hopper",
            
        
    
        
        
            
                "bank_account": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
];



const ProductCategoriesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
];



const UnitsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "symbol": "Grace Hopper",
            
        
    
        
        
            
                "precision": 9.56,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "symbol": "Ada Lovelace",
            
        
    
        
        
            
                "precision": 3.0,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "symbol": "Grace Hopper",
            
        
    
        
        
            
                "precision": 7.5,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "symbol": "Ada Lovelace",
            
        
    
        
        
            
                "precision": 0.19,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "symbol": "Alan Turing",
            
        
    
        
        
            
                "precision": 2.06,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const ProductsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sku": "Ada Lovelace",
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sale_price_ht": 5.87,
            
        
    
        
        
            
                "purchase_price_ht": 9.17,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "stock_on_hand": 8.4,
            
        
    
        
        
            
                "stock_reserved": 9.35,
            
        
    
        
        
            
                "reorder_level": 9.32,
            
        
    
        
        
            
                "weighted_avg_cost": 8.27,
            
        
    
        
        
            
                "track_stock": false,
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sku": "Alan Turing",
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sale_price_ht": 1.26,
            
        
    
        
        
            
                "purchase_price_ht": 5.94,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "stock_on_hand": 7.4,
            
        
    
        
        
            
                "stock_reserved": 8.87,
            
        
    
        
        
            
                "reorder_level": 2.27,
            
        
    
        
        
            
                "weighted_avg_cost": 0.14,
            
        
    
        
        
            
                "track_stock": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sku": "Ada Lovelace",
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sale_price_ht": 3.18,
            
        
    
        
        
            
                "purchase_price_ht": 0.41,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "stock_on_hand": 2.13,
            
        
    
        
        
            
                "stock_reserved": 4.88,
            
        
    
        
        
            
                "reorder_level": 9.81,
            
        
    
        
        
            
                "weighted_avg_cost": 5.88,
            
        
    
        
        
            
                "track_stock": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sku": "Alan Turing",
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sale_price_ht": 7.68,
            
        
    
        
        
            
                "purchase_price_ht": 0.05,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "stock_on_hand": 6.65,
            
        
    
        
        
            
                "stock_reserved": 9.3,
            
        
    
        
        
            
                "reorder_level": 2.31,
            
        
    
        
        
            
                "weighted_avg_cost": 0.39,
            
        
    
        
        
            
                "track_stock": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sku": "Ada Lovelace",
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sale_price_ht": 9.25,
            
        
    
        
        
            
                "purchase_price_ht": 2.83,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "stock_on_hand": 7.39,
            
        
    
        
        
            
                "stock_reserved": 8.92,
            
        
    
        
        
            
                "reorder_level": 9.83,
            
        
    
        
        
            
                "weighted_avg_cost": 6.29,
            
        
    
        
        
            
                "track_stock": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
    },
    
];



const WarehousesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "address": "Alan Turing",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const QuotesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quote_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "valid_until": new Date(Date.now()),
            
        
    
        
        
            
                "status": "sent",
            
        
    
        
        
            
                "subtotal_ht": 5.85,
            
        
    
        
        
            
                "tax_total": 0.08,
            
        
    
        
        
            
                "total_ttc": 1.35,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quote_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "valid_until": new Date(Date.now()),
            
        
    
        
        
            
                "status": "sent",
            
        
    
        
        
            
                "subtotal_ht": 3.92,
            
        
    
        
        
            
                "tax_total": 3.23,
            
        
    
        
        
            
                "total_ttc": 1.75,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quote_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "valid_until": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "subtotal_ht": 9.34,
            
        
    
        
        
            
                "tax_total": 0.68,
            
        
    
        
        
            
                "total_ttc": 1.06,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quote_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "valid_until": new Date(Date.now()),
            
        
    
        
        
            
                "status": "rejected",
            
        
    
        
        
            
                "subtotal_ht": 3.82,
            
        
    
        
        
            
                "tax_total": 7.11,
            
        
    
        
        
            
                "total_ttc": 7.89,
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quote_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "valid_until": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "subtotal_ht": 4.61,
            
        
    
        
        
            
                "tax_total": 1.27,
            
        
    
        
        
            
                "total_ttc": 1.21,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
];



const QuoteItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 6.16,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                "unit_price_ht": 2.17,
            
        
    
        
        
            
                "discount_percent": 2.9,
            
        
    
        
        
            
                "tax_rate_percent": 3.9,
            
        
    
        
        
            
                "line_total_ht": 4.51,
            
        
    
        
        
            
                "line_tax_total": 5.46,
            
        
    
        
        
            
                "line_total_ttc": 0.09,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 9.61,
            
        
    
        
        
            
                "unit_label": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price_ht": 6.17,
            
        
    
        
        
            
                "discount_percent": 8.33,
            
        
    
        
        
            
                "tax_rate_percent": 0.11,
            
        
    
        
        
            
                "line_total_ht": 3.86,
            
        
    
        
        
            
                "line_tax_total": 2.7,
            
        
    
        
        
            
                "line_total_ttc": 1.12,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 8.82,
            
        
    
        
        
            
                "unit_label": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price_ht": 4.72,
            
        
    
        
        
            
                "discount_percent": 7.56,
            
        
    
        
        
            
                "tax_rate_percent": 5.14,
            
        
    
        
        
            
                "line_total_ht": 8.97,
            
        
    
        
        
            
                "line_tax_total": 7.82,
            
        
    
        
        
            
                "line_total_ttc": 2.33,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Alan Turing",
            
        
    
        
        
            
                "quantity": 5.69,
            
        
    
        
        
            
                "unit_label": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price_ht": 7.02,
            
        
    
        
        
            
                "discount_percent": 4.92,
            
        
    
        
        
            
                "tax_rate_percent": 5.71,
            
        
    
        
        
            
                "line_total_ht": 1.28,
            
        
    
        
        
            
                "line_tax_total": 4.8,
            
        
    
        
        
            
                "line_total_ttc": 4.92,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 2.87,
            
        
    
        
        
            
                "unit_label": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price_ht": 7.62,
            
        
    
        
        
            
                "discount_percent": 6.62,
            
        
    
        
        
            
                "tax_rate_percent": 3.99,
            
        
    
        
        
            
                "line_total_ht": 0.99,
            
        
    
        
        
            
                "line_tax_total": 4.18,
            
        
    
        
        
            
                "line_total_ttc": 9.78,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SalesOrdersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_delivery_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "confirmed",
            
        
    
        
        
            
                "subtotal_ht": 1.99,
            
        
    
        
        
            
                "tax_total": 3.88,
            
        
    
        
        
            
                "total_ttc": 7.63,
            
        
    
        
        
            
                "stock_reserved": false,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_delivery_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "invoiced",
            
        
    
        
        
            
                "subtotal_ht": 6.27,
            
        
    
        
        
            
                "tax_total": 9.0,
            
        
    
        
        
            
                "total_ttc": 0.89,
            
        
    
        
        
            
                "stock_reserved": true,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_delivery_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "delivered",
            
        
    
        
        
            
                "subtotal_ht": 9.27,
            
        
    
        
        
            
                "tax_total": 7.84,
            
        
    
        
        
            
                "total_ttc": 3.49,
            
        
    
        
        
            
                "stock_reserved": false,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_delivery_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "preparing",
            
        
    
        
        
            
                "subtotal_ht": 8.02,
            
        
    
        
        
            
                "tax_total": 0.05,
            
        
    
        
        
            
                "total_ttc": 8.03,
            
        
    
        
        
            
                "stock_reserved": false,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_delivery_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "delivered",
            
        
    
        
        
            
                "subtotal_ht": 1.15,
            
        
    
        
        
            
                "tax_total": 3.59,
            
        
    
        
        
            
                "total_ttc": 4.11,
            
        
    
        
        
            
                "stock_reserved": true,
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
];



const SalesOrderItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 1.09,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                "unit_price_ht": 7.18,
            
        
    
        
        
            
                "discount_percent": 2.29,
            
        
    
        
        
            
                "tax_rate_percent": 4.65,
            
        
    
        
        
            
                "line_total_ht": 5.1,
            
        
    
        
        
            
                "line_tax_total": 3.44,
            
        
    
        
        
            
                "line_total_ttc": 3.58,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 6.04,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 0.85,
            
        
    
        
        
            
                "discount_percent": 8.45,
            
        
    
        
        
            
                "tax_rate_percent": 3.22,
            
        
    
        
        
            
                "line_total_ht": 5.87,
            
        
    
        
        
            
                "line_tax_total": 2.09,
            
        
    
        
        
            
                "line_total_ttc": 1.28,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 6.3,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 7.64,
            
        
    
        
        
            
                "discount_percent": 2.9,
            
        
    
        
        
            
                "tax_rate_percent": 7.3,
            
        
    
        
        
            
                "line_total_ht": 2.27,
            
        
    
        
        
            
                "line_tax_total": 9.0,
            
        
    
        
        
            
                "line_total_ttc": 3.12,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 4.9,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                "unit_price_ht": 9.63,
            
        
    
        
        
            
                "discount_percent": 4.96,
            
        
    
        
        
            
                "tax_rate_percent": 6.25,
            
        
    
        
        
            
                "line_total_ht": 8.4,
            
        
    
        
        
            
                "line_tax_total": 6.73,
            
        
    
        
        
            
                "line_total_ttc": 5.07,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 3.53,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 0.61,
            
        
    
        
        
            
                "discount_percent": 0.64,
            
        
    
        
        
            
                "tax_rate_percent": 7.07,
            
        
    
        
        
            
                "line_total_ht": 4.14,
            
        
    
        
        
            
                "line_tax_total": 3.89,
            
        
    
        
        
            
                "line_total_ttc": 6.81,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DeliveryNotesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_note_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "carrier_name": "Alan Turing",
            
        
    
        
        
            
                "tracking_reference": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_note_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "carrier_name": "Alan Turing",
            
        
    
        
        
            
                "tracking_reference": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_note_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "carrier_name": "Grace Hopper",
            
        
    
        
        
            
                "tracking_reference": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_note_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "carrier_name": "Ada Lovelace",
            
        
    
        
        
            
                "tracking_reference": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_note_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "delivered",
            
        
    
        
        
            
                "carrier_name": "Ada Lovelace",
            
        
    
        
        
            
                "tracking_reference": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
];



const DeliveryNoteItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Alan Turing",
            
        
    
        
        
            
                "quantity": 2.94,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 0.74,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 3.22,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 7.08,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 4.94,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InvoicesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "due_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "overdue",
            
        
    
        
        
            
                "subtotal_ht": 9.88,
            
        
    
        
        
            
                "tax_total": 6.82,
            
        
    
        
        
            
                "total_ttc": 8.71,
            
        
    
        
        
            
                "amount_paid": 5.32,
            
        
    
        
        
            
                "is_exported_accounting": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "due_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "overdue",
            
        
    
        
        
            
                "subtotal_ht": 6.59,
            
        
    
        
        
            
                "tax_total": 9.99,
            
        
    
        
        
            
                "total_ttc": 1.16,
            
        
    
        
        
            
                "amount_paid": 5.24,
            
        
    
        
        
            
                "is_exported_accounting": false,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "due_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "issued",
            
        
    
        
        
            
                "subtotal_ht": 3.93,
            
        
    
        
        
            
                "tax_total": 8.19,
            
        
    
        
        
            
                "total_ttc": 2.32,
            
        
    
        
        
            
                "amount_paid": 1.22,
            
        
    
        
        
            
                "is_exported_accounting": false,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "due_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "issued",
            
        
    
        
        
            
                "subtotal_ht": 8.68,
            
        
    
        
        
            
                "tax_total": 1.62,
            
        
    
        
        
            
                "total_ttc": 6.08,
            
        
    
        
        
            
                "amount_paid": 2.61,
            
        
    
        
        
            
                "is_exported_accounting": false,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "due_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "paid",
            
        
    
        
        
            
                "subtotal_ht": 5.1,
            
        
    
        
        
            
                "tax_total": 8.43,
            
        
    
        
        
            
                "total_ttc": 9.64,
            
        
    
        
        
            
                "amount_paid": 1.72,
            
        
    
        
        
            
                "is_exported_accounting": false,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
];



const InvoiceItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 6.74,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                "unit_price_ht": 3.16,
            
        
    
        
        
            
                "discount_percent": 9.77,
            
        
    
        
        
            
                "tax_rate_percent": 0.06,
            
        
    
        
        
            
                "line_total_ht": 8.13,
            
        
    
        
        
            
                "line_tax_total": 6.72,
            
        
    
        
        
            
                "line_total_ttc": 8.15,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 7.95,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 8.3,
            
        
    
        
        
            
                "discount_percent": 0.75,
            
        
    
        
        
            
                "tax_rate_percent": 0.39,
            
        
    
        
        
            
                "line_total_ht": 7.44,
            
        
    
        
        
            
                "line_tax_total": 6.1,
            
        
    
        
        
            
                "line_total_ttc": 6.04,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 7.75,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                "unit_price_ht": 2.33,
            
        
    
        
        
            
                "discount_percent": 2.09,
            
        
    
        
        
            
                "tax_rate_percent": 2.27,
            
        
    
        
        
            
                "line_total_ht": 5.51,
            
        
    
        
        
            
                "line_tax_total": 4.91,
            
        
    
        
        
            
                "line_total_ttc": 1.29,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 8.72,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 4.1,
            
        
    
        
        
            
                "discount_percent": 5.81,
            
        
    
        
        
            
                "tax_rate_percent": 5.83,
            
        
    
        
        
            
                "line_total_ht": 6.24,
            
        
    
        
        
            
                "line_tax_total": 3.46,
            
        
    
        
        
            
                "line_total_ttc": 1.67,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 7.27,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                "unit_price_ht": 3.42,
            
        
    
        
        
            
                "discount_percent": 2.14,
            
        
    
        
        
            
                "tax_rate_percent": 9.42,
            
        
    
        
        
            
                "line_total_ht": 0.11,
            
        
    
        
        
            
                "line_tax_total": 6.15,
            
        
    
        
        
            
                "line_total_ttc": 5.77,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_date": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 1.65,
            
        
    
        
        
            
                "method": "other",
            
        
    
        
        
            
                "reference": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_date": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 4.43,
            
        
    
        
        
            
                "method": "check",
            
        
    
        
        
            
                "reference": "Alan Turing",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_date": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 5.88,
            
        
    
        
        
            
                "method": "cash",
            
        
    
        
        
            
                "reference": "Marie Curie",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_date": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 4.53,
            
        
    
        
        
            
                "method": "other",
            
        
    
        
        
            
                "reference": "Alan Turing",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_date": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 4.9,
            
        
    
        
        
            
                "method": "check",
            
        
    
        
        
            
                "reference": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
];



const CreditNotesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "credit_note_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "applied",
            
        
    
        
        
            
                "subtotal_ht": 0.08,
            
        
    
        
        
            
                "tax_total": 9.79,
            
        
    
        
        
            
                "total_ttc": 2.28,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "reason": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "credit_note_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "applied",
            
        
    
        
        
            
                "subtotal_ht": 3.81,
            
        
    
        
        
            
                "tax_total": 1.77,
            
        
    
        
        
            
                "total_ttc": 6.62,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "reason": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "credit_note_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "applied",
            
        
    
        
        
            
                "subtotal_ht": 7.18,
            
        
    
        
        
            
                "tax_total": 6.41,
            
        
    
        
        
            
                "total_ttc": 8.0,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "reason": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "credit_note_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "subtotal_ht": 3.39,
            
        
    
        
        
            
                "tax_total": 8.86,
            
        
    
        
        
            
                "total_ttc": 3.65,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "reason": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "credit_note_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "issue_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "subtotal_ht": 8.39,
            
        
    
        
        
            
                "tax_total": 1.92,
            
        
    
        
        
            
                "total_ttc": 8.8,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "reason": "Alan Turing",
            
        
    
    },
    
];



const CreditNoteItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 4.91,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                "unit_price_ht": 6.56,
            
        
    
        
        
            
                "tax_rate_percent": 0.25,
            
        
    
        
        
            
                "line_total_ht": 4.71,
            
        
    
        
        
            
                "line_tax_total": 2.22,
            
        
    
        
        
            
                "line_total_ttc": 6.08,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 5.71,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                "unit_price_ht": 1.65,
            
        
    
        
        
            
                "tax_rate_percent": 2.89,
            
        
    
        
        
            
                "line_total_ht": 8.9,
            
        
    
        
        
            
                "line_tax_total": 7.01,
            
        
    
        
        
            
                "line_total_ttc": 9.08,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 1.85,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 5.37,
            
        
    
        
        
            
                "tax_rate_percent": 5.96,
            
        
    
        
        
            
                "line_total_ht": 9.56,
            
        
    
        
        
            
                "line_tax_total": 3.68,
            
        
    
        
        
            
                "line_total_ttc": 6.64,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Marie Curie",
            
        
    
        
        
            
                "quantity": 8.78,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                "unit_price_ht": 8.8,
            
        
    
        
        
            
                "tax_rate_percent": 4.07,
            
        
    
        
        
            
                "line_total_ht": 5.87,
            
        
    
        
        
            
                "line_tax_total": 0.62,
            
        
    
        
        
            
                "line_total_ttc": 3.17,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Grace Hopper",
            
        
    
        
        
            
                "quantity": 3.08,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                "unit_price_ht": 6.46,
            
        
    
        
        
            
                "tax_rate_percent": 1.23,
            
        
    
        
        
            
                "line_total_ht": 4.93,
            
        
    
        
        
            
                "line_tax_total": 8.76,
            
        
    
        
        
            
                "line_total_ttc": 6.8,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PurchaseOrdersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "purchase_order_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_receipt_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "sent",
            
        
    
        
        
            
                "subtotal_ht": 9.71,
            
        
    
        
        
            
                "tax_total": 2.71,
            
        
    
        
        
            
                "total_ttc": 7.68,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "purchase_order_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_receipt_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "received",
            
        
    
        
        
            
                "subtotal_ht": 5.82,
            
        
    
        
        
            
                "tax_total": 3.66,
            
        
    
        
        
            
                "total_ttc": 1.86,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "purchase_order_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_receipt_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "confirmed",
            
        
    
        
        
            
                "subtotal_ht": 0.92,
            
        
    
        
        
            
                "tax_total": 3.68,
            
        
    
        
        
            
                "total_ttc": 8.68,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "purchase_order_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_receipt_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "subtotal_ht": 3.38,
            
        
    
        
        
            
                "tax_total": 5.19,
            
        
    
        
        
            
                "total_ttc": 0.85,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "purchase_order_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_date": new Date(Date.now()),
            
        
    
        
        
            
                "expected_receipt_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "subtotal_ht": 2.93,
            
        
    
        
        
            
                "tax_total": 6.77,
            
        
    
        
        
            
                "total_ttc": 1.21,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
];



const PurchaseOrderItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Alan Turing",
            
        
    
        
        
            
                "quantity": 9.26,
            
        
    
        
        
            
                "unit_label": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price_ht": 9.88,
            
        
    
        
        
            
                "tax_rate_percent": 4.22,
            
        
    
        
        
            
                "line_total_ht": 0.33,
            
        
    
        
        
            
                "line_tax_total": 3.05,
            
        
    
        
        
            
                "line_total_ttc": 9.31,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Alan Turing",
            
        
    
        
        
            
                "quantity": 2.2,
            
        
    
        
        
            
                "unit_label": "Marie Curie",
            
        
    
        
        
            
                "unit_price_ht": 4.13,
            
        
    
        
        
            
                "tax_rate_percent": 9.13,
            
        
    
        
        
            
                "line_total_ht": 6.01,
            
        
    
        
        
            
                "line_tax_total": 2.63,
            
        
    
        
        
            
                "line_total_ttc": 1.46,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Alan Turing",
            
        
    
        
        
            
                "quantity": 0.39,
            
        
    
        
        
            
                "unit_label": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price_ht": 2.54,
            
        
    
        
        
            
                "tax_rate_percent": 4.61,
            
        
    
        
        
            
                "line_total_ht": 9.21,
            
        
    
        
        
            
                "line_tax_total": 7.65,
            
        
    
        
        
            
                "line_total_ttc": 0.03,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Alan Turing",
            
        
    
        
        
            
                "quantity": 8.29,
            
        
    
        
        
            
                "unit_label": "Alan Turing",
            
        
    
        
        
            
                "unit_price_ht": 4.75,
            
        
    
        
        
            
                "tax_rate_percent": 5.19,
            
        
    
        
        
            
                "line_total_ht": 8.43,
            
        
    
        
        
            
                "line_tax_total": 6.15,
            
        
    
        
        
            
                "line_total_ttc": 0.65,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "designation": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 7.08,
            
        
    
        
        
            
                "unit_label": "Grace Hopper",
            
        
    
        
        
            
                "unit_price_ht": 3.15,
            
        
    
        
        
            
                "tax_rate_percent": 9.56,
            
        
    
        
        
            
                "line_total_ht": 3.85,
            
        
    
        
        
            
                "line_tax_total": 2.2,
            
        
    
        
        
            
                "line_total_ttc": 9.45,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StockReceptionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reception_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "received_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reception_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "received_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reception_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "received_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reception_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "received_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "validated",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reception_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "received_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
];



const StockReceptionItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_received": 4.75,
            
        
    
        
        
            
                "unit_cost_ht": 8.42,
            
        
    
        
        
            
                "expiry_date": new Date(Date.now()),
            
        
    
        
        
            
                "batch_code": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_received": 5.69,
            
        
    
        
        
            
                "unit_cost_ht": 1.83,
            
        
    
        
        
            
                "expiry_date": new Date(Date.now()),
            
        
    
        
        
            
                "batch_code": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_received": 1.59,
            
        
    
        
        
            
                "unit_cost_ht": 7.8,
            
        
    
        
        
            
                "expiry_date": new Date(Date.now()),
            
        
    
        
        
            
                "batch_code": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_received": 9.4,
            
        
    
        
        
            
                "unit_cost_ht": 3.6,
            
        
    
        
        
            
                "expiry_date": new Date(Date.now()),
            
        
    
        
        
            
                "batch_code": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_received": 4.76,
            
        
    
        
        
            
                "unit_cost_ht": 4.74,
            
        
    
        
        
            
                "expiry_date": new Date(Date.now()),
            
        
    
        
        
            
                "batch_code": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StockReservationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_reserved": 8.15,
            
        
    
        
        
            
                "reserved_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "released",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_reserved": 9.96,
            
        
    
        
        
            
                "reserved_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "consumed",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_reserved": 7.46,
            
        
    
        
        
            
                "reserved_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "reserved",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_reserved": 5.57,
            
        
    
        
        
            
                "reserved_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "released",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_reserved": 4.37,
            
        
    
        
        
            
                "reserved_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "released",
            
        
    
    },
    
];



const StockMovementsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "moved_at": new Date(Date.now()),
            
        
    
        
        
            
                "movement_type": "unreservation",
            
        
    
        
        
            
                "quantity": 8.36,
            
        
    
        
        
            
                "unit_cost_ht": 2.07,
            
        
    
        
        
            
                "reference": "Alan Turing",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "moved_at": new Date(Date.now()),
            
        
    
        
        
            
                "movement_type": "transfer_out",
            
        
    
        
        
            
                "quantity": 1.49,
            
        
    
        
        
            
                "unit_cost_ht": 4.09,
            
        
    
        
        
            
                "reference": "Alan Turing",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "moved_at": new Date(Date.now()),
            
        
    
        
        
            
                "movement_type": "reservation",
            
        
    
        
        
            
                "quantity": 8.26,
            
        
    
        
        
            
                "unit_cost_ht": 6.93,
            
        
    
        
        
            
                "reference": "Marie Curie",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "moved_at": new Date(Date.now()),
            
        
    
        
        
            
                "movement_type": "sale_delivery",
            
        
    
        
        
            
                "quantity": 0.76,
            
        
    
        
        
            
                "unit_cost_ht": 6.15,
            
        
    
        
        
            
                "reference": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "moved_at": new Date(Date.now()),
            
        
    
        
        
            
                "movement_type": "unreservation",
            
        
    
        
        
            
                "quantity": 9.58,
            
        
    
        
        
            
                "unit_cost_ht": 8.49,
            
        
    
        
        
            
                "reference": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
];



const InventoryCountsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "inventory_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "inventory_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "inventory_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "inventory_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "inventory_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
];



const InventoryCountItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_system": 9.18,
            
        
    
        
        
            
                "quantity_counted": 5.76,
            
        
    
        
        
            
                "quantity_diff": 5.21,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_system": 1.16,
            
        
    
        
        
            
                "quantity_counted": 0.65,
            
        
    
        
        
            
                "quantity_diff": 7.91,
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_system": 3.85,
            
        
    
        
        
            
                "quantity_counted": 0.65,
            
        
    
        
        
            
                "quantity_diff": 0.47,
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_system": 8.92,
            
        
    
        
        
            
                "quantity_counted": 8.83,
            
        
    
        
        
            
                "quantity_diff": 9.14,
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_system": 7.56,
            
        
    
        
        
            
                "quantity_counted": 3.38,
            
        
    
        
        
            
                "quantity_diff": 5.83,
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ImportJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "export_excel",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "processed_count": 6,
            
        
    
        
        
            
                "error_count": 1,
            
        
    
        
        
            
                "log": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "export_pdf",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "processed_count": 5,
            
        
    
        
        
            
                "error_count": 7,
            
        
    
        
        
            
                "log": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "bulk_invoice_create",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "processed_count": 5,
            
        
    
        
        
            
                "error_count": 9,
            
        
    
        
        
            
                "log": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "export_zip",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "processed_count": 7,
            
        
    
        
        
            
                "error_count": 6,
            
        
    
        
        
            
                "log": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "import_products_excel",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "processed_count": 2,
            
        
    
        
        
            
                "error_count": 2,
            
        
    
        
        
            
                "log": "Alan Turing",
            
        
    
    },
    
];



const AuditLogsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "action": "export",
            
        
    
        
        
            
                "entity_name": "Ada Lovelace",
            
        
    
        
        
            
                "record_reference": "Alan Turing",
            
        
    
        
        
            
                "ip_address": "Grace Hopper",
            
        
    
        
        
            
                "user_agent": "Marie Curie",
            
        
    
        
        
            
                "details": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "action": "import",
            
        
    
        
        
            
                "entity_name": "Alan Turing",
            
        
    
        
        
            
                "record_reference": "Marie Curie",
            
        
    
        
        
            
                "ip_address": "Grace Hopper",
            
        
    
        
        
            
                "user_agent": "Ada Lovelace",
            
        
    
        
        
            
                "details": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "action": "status_change",
            
        
    
        
        
            
                "entity_name": "Ada Lovelace",
            
        
    
        
        
            
                "record_reference": "Grace Hopper",
            
        
    
        
        
            
                "ip_address": "Alan Turing",
            
        
    
        
        
            
                "user_agent": "Ada Lovelace",
            
        
    
        
        
            
                "details": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "action": "export",
            
        
    
        
        
            
                "entity_name": "Ada Lovelace",
            
        
    
        
        
            
                "record_reference": "Ada Lovelace",
            
        
    
        
        
            
                "ip_address": "Ada Lovelace",
            
        
    
        
        
            
                "user_agent": "Alan Turing",
            
        
    
        
        
            
                "details": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "action": "import",
            
        
    
        
        
            
                "entity_name": "Grace Hopper",
            
        
    
        
        
            
                "record_reference": "Grace Hopper",
            
        
    
        
        
            
                "ip_address": "Alan Turing",
            
        
    
        
        
            
                "user_agent": "Ada Lovelace",
            
        
    
        
        
            
                "details": "Ada Lovelace",
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            
            async function associateUserWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User0 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (User0?.setOrganization)
                {
                    await
                    User0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User1 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (User1?.setOrganization)
                {
                    await
                    User1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User2 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (User2?.setOrganization)
                {
                    await
                    User2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User3 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (User3?.setOrganization)
                {
                    await
                    User3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User4 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (User4?.setOrganization)
                {
                    await
                    User4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
    
    
        
    

    
    
    
        
            
            async function associateOrganizationMembershipWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrganizationMembership0 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrganizationMembership0?.setOrganization)
                {
                    await
                    OrganizationMembership0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrganizationMembership1 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrganizationMembership1?.setOrganization)
                {
                    await
                    OrganizationMembership1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrganizationMembership2 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrganizationMembership2?.setOrganization)
                {
                    await
                    OrganizationMembership2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrganizationMembership3 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrganizationMembership3?.setOrganization)
                {
                    await
                    OrganizationMembership3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrganizationMembership4 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (OrganizationMembership4?.setOrganization)
                {
                    await
                    OrganizationMembership4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
            
            async function associateOrganizationMembershipWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const OrganizationMembership0 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrganizationMembership0?.setUser)
                {
                    await
                    OrganizationMembership0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const OrganizationMembership1 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrganizationMembership1?.setUser)
                {
                    await
                    OrganizationMembership1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const OrganizationMembership2 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrganizationMembership2?.setUser)
                {
                    await
                    OrganizationMembership2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const OrganizationMembership3 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrganizationMembership3?.setUser)
                {
                    await
                    OrganizationMembership3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const OrganizationMembership4 = await OrganizationMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (OrganizationMembership4?.setUser)
                {
                    await
                    OrganizationMembership4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateTaxRateWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaxRate0 = await TaxRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TaxRate0?.setOrganization)
                {
                    await
                    TaxRate0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaxRate1 = await TaxRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TaxRate1?.setOrganization)
                {
                    await
                    TaxRate1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaxRate2 = await TaxRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TaxRate2?.setOrganization)
                {
                    await
                    TaxRate2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaxRate3 = await TaxRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TaxRate3?.setOrganization)
                {
                    await
                    TaxRate3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaxRate4 = await TaxRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TaxRate4?.setOrganization)
                {
                    await
                    TaxRate4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associatePaymentTermWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTerm0 = await PaymentTerms.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PaymentTerm0?.setOrganization)
                {
                    await
                    PaymentTerm0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTerm1 = await PaymentTerms.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PaymentTerm1?.setOrganization)
                {
                    await
                    PaymentTerm1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTerm2 = await PaymentTerms.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PaymentTerm2?.setOrganization)
                {
                    await
                    PaymentTerm2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTerm3 = await PaymentTerms.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PaymentTerm3?.setOrganization)
                {
                    await
                    PaymentTerm3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTerm4 = await PaymentTerms.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PaymentTerm4?.setOrganization)
                {
                    await
                    PaymentTerm4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateNumberingSequenceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const NumberingSequence0 = await NumberingSequences.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (NumberingSequence0?.setOrganization)
                {
                    await
                    NumberingSequence0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const NumberingSequence1 = await NumberingSequences.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (NumberingSequence1?.setOrganization)
                {
                    await
                    NumberingSequence1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const NumberingSequence2 = await NumberingSequences.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (NumberingSequence2?.setOrganization)
                {
                    await
                    NumberingSequence2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const NumberingSequence3 = await NumberingSequences.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (NumberingSequence3?.setOrganization)
                {
                    await
                    NumberingSequence3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const NumberingSequence4 = await NumberingSequences.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (NumberingSequence4?.setOrganization)
                {
                    await
                    NumberingSequence4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateClientWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Client0 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Client0?.setOrganization)
                {
                    await
                    Client0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Client1 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Client1?.setOrganization)
                {
                    await
                    Client1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Client2 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Client2?.setOrganization)
                {
                    await
                    Client2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Client3 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Client3?.setOrganization)
                {
                    await
                    Client3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Client4 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Client4?.setOrganization)
                {
                    await
                    Client4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateClientWithPayment_term() {
            
                const relatedPayment_term0 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Client0 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Client0?.setPayment_term)
                {
                    await
                    Client0.
                    setPayment_term(relatedPayment_term0);
                }
            
                const relatedPayment_term1 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Client1 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Client1?.setPayment_term)
                {
                    await
                    Client1.
                    setPayment_term(relatedPayment_term1);
                }
            
                const relatedPayment_term2 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Client2 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Client2?.setPayment_term)
                {
                    await
                    Client2.
                    setPayment_term(relatedPayment_term2);
                }
            
                const relatedPayment_term3 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Client3 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Client3?.setPayment_term)
                {
                    await
                    Client3.
                    setPayment_term(relatedPayment_term3);
                }
            
                const relatedPayment_term4 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Client4 = await Clients.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Client4?.setPayment_term)
                {
                    await
                    Client4.
                    setPayment_term(relatedPayment_term4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSupplierWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Supplier0 = await Suppliers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Supplier0?.setOrganization)
                {
                    await
                    Supplier0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Supplier1 = await Suppliers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Supplier1?.setOrganization)
                {
                    await
                    Supplier1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Supplier2 = await Suppliers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Supplier2?.setOrganization)
                {
                    await
                    Supplier2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Supplier3 = await Suppliers.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Supplier3?.setOrganization)
                {
                    await
                    Supplier3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Supplier4 = await Suppliers.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Supplier4?.setOrganization)
                {
                    await
                    Supplier4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateProductCategoryWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory0 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductCategory0?.setOrganization)
                {
                    await
                    ProductCategory0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory1 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductCategory1?.setOrganization)
                {
                    await
                    ProductCategory1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory2 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductCategory2?.setOrganization)
                {
                    await
                    ProductCategory2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory3 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductCategory3?.setOrganization)
                {
                    await
                    ProductCategory3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory4 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ProductCategory4?.setOrganization)
                {
                    await
                    ProductCategory4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateUnitWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Unit0 = await Units.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Unit0?.setOrganization)
                {
                    await
                    Unit0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Unit1 = await Units.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Unit1?.setOrganization)
                {
                    await
                    Unit1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Unit2 = await Units.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Unit2?.setOrganization)
                {
                    await
                    Unit2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Unit3 = await Units.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Unit3?.setOrganization)
                {
                    await
                    Unit3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Unit4 = await Units.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Unit4?.setOrganization)
                {
                    await
                    Unit4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateProductWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setOrganization)
                {
                    await
                    Product0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setOrganization)
                {
                    await
                    Product1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setOrganization)
                {
                    await
                    Product2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setOrganization)
                {
                    await
                    Product3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product4 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Product4?.setOrganization)
                {
                    await
                    Product4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateProductWithCategory() {
            
                const relatedCategory0 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setCategory)
                {
                    await
                    Product0.
                    setCategory(relatedCategory0);
                }
            
                const relatedCategory1 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setCategory)
                {
                    await
                    Product1.
                    setCategory(relatedCategory1);
                }
            
                const relatedCategory2 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setCategory)
                {
                    await
                    Product2.
                    setCategory(relatedCategory2);
                }
            
                const relatedCategory3 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setCategory)
                {
                    await
                    Product3.
                    setCategory(relatedCategory3);
                }
            
                const relatedCategory4 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product4 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Product4?.setCategory)
                {
                    await
                    Product4.
                    setCategory(relatedCategory4);
                }
            
        }
        
    
        
            
            async function associateProductWithUnit() {
            
                const relatedUnit0 = await Units.findOne({
                    offset: Math.floor(Math.random() * (await Units.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setUnit)
                {
                    await
                    Product0.
                    setUnit(relatedUnit0);
                }
            
                const relatedUnit1 = await Units.findOne({
                    offset: Math.floor(Math.random() * (await Units.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setUnit)
                {
                    await
                    Product1.
                    setUnit(relatedUnit1);
                }
            
                const relatedUnit2 = await Units.findOne({
                    offset: Math.floor(Math.random() * (await Units.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setUnit)
                {
                    await
                    Product2.
                    setUnit(relatedUnit2);
                }
            
                const relatedUnit3 = await Units.findOne({
                    offset: Math.floor(Math.random() * (await Units.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setUnit)
                {
                    await
                    Product3.
                    setUnit(relatedUnit3);
                }
            
                const relatedUnit4 = await Units.findOne({
                    offset: Math.floor(Math.random() * (await Units.count())),
                });
                const Product4 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Product4?.setUnit)
                {
                    await
                    Product4.
                    setUnit(relatedUnit4);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateProductWithTax_rate() {
            
                const relatedTax_rate0 = await TaxRates.findOne({
                    offset: Math.floor(Math.random() * (await TaxRates.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setTax_rate)
                {
                    await
                    Product0.
                    setTax_rate(relatedTax_rate0);
                }
            
                const relatedTax_rate1 = await TaxRates.findOne({
                    offset: Math.floor(Math.random() * (await TaxRates.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setTax_rate)
                {
                    await
                    Product1.
                    setTax_rate(relatedTax_rate1);
                }
            
                const relatedTax_rate2 = await TaxRates.findOne({
                    offset: Math.floor(Math.random() * (await TaxRates.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setTax_rate)
                {
                    await
                    Product2.
                    setTax_rate(relatedTax_rate2);
                }
            
                const relatedTax_rate3 = await TaxRates.findOne({
                    offset: Math.floor(Math.random() * (await TaxRates.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setTax_rate)
                {
                    await
                    Product3.
                    setTax_rate(relatedTax_rate3);
                }
            
                const relatedTax_rate4 = await TaxRates.findOne({
                    offset: Math.floor(Math.random() * (await TaxRates.count())),
                });
                const Product4 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Product4?.setTax_rate)
                {
                    await
                    Product4.
                    setTax_rate(relatedTax_rate4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateWarehousWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Warehous0 = await Warehouses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Warehous0?.setOrganization)
                {
                    await
                    Warehous0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Warehous1 = await Warehouses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Warehous1?.setOrganization)
                {
                    await
                    Warehous1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Warehous2 = await Warehouses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Warehous2?.setOrganization)
                {
                    await
                    Warehous2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Warehous3 = await Warehouses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Warehous3?.setOrganization)
                {
                    await
                    Warehous3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Warehous4 = await Warehouses.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Warehous4?.setOrganization)
                {
                    await
                    Warehous4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateQuoteWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quote0 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quote0?.setOrganization)
                {
                    await
                    Quote0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quote1 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quote1?.setOrganization)
                {
                    await
                    Quote1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quote2 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quote2?.setOrganization)
                {
                    await
                    Quote2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quote3 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quote3?.setOrganization)
                {
                    await
                    Quote3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quote4 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quote4?.setOrganization)
                {
                    await
                    Quote4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateQuoteWithClient() {
            
                const relatedClient0 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Quote0 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quote0?.setClient)
                {
                    await
                    Quote0.
                    setClient(relatedClient0);
                }
            
                const relatedClient1 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Quote1 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quote1?.setClient)
                {
                    await
                    Quote1.
                    setClient(relatedClient1);
                }
            
                const relatedClient2 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Quote2 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quote2?.setClient)
                {
                    await
                    Quote2.
                    setClient(relatedClient2);
                }
            
                const relatedClient3 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Quote3 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quote3?.setClient)
                {
                    await
                    Quote3.
                    setClient(relatedClient3);
                }
            
                const relatedClient4 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Quote4 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quote4?.setClient)
                {
                    await
                    Quote4.
                    setClient(relatedClient4);
                }
            
        }
        
    
        
            
            async function associateQuoteWithPayment_term() {
            
                const relatedPayment_term0 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Quote0 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quote0?.setPayment_term)
                {
                    await
                    Quote0.
                    setPayment_term(relatedPayment_term0);
                }
            
                const relatedPayment_term1 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Quote1 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quote1?.setPayment_term)
                {
                    await
                    Quote1.
                    setPayment_term(relatedPayment_term1);
                }
            
                const relatedPayment_term2 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Quote2 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quote2?.setPayment_term)
                {
                    await
                    Quote2.
                    setPayment_term(relatedPayment_term2);
                }
            
                const relatedPayment_term3 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Quote3 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quote3?.setPayment_term)
                {
                    await
                    Quote3.
                    setPayment_term(relatedPayment_term3);
                }
            
                const relatedPayment_term4 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Quote4 = await Quotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quote4?.setPayment_term)
                {
                    await
                    Quote4.
                    setPayment_term(relatedPayment_term4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateQuoteItemWithQuote() {
            
                const relatedQuote0 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const QuoteItem0 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuoteItem0?.setQuote)
                {
                    await
                    QuoteItem0.
                    setQuote(relatedQuote0);
                }
            
                const relatedQuote1 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const QuoteItem1 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuoteItem1?.setQuote)
                {
                    await
                    QuoteItem1.
                    setQuote(relatedQuote1);
                }
            
                const relatedQuote2 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const QuoteItem2 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuoteItem2?.setQuote)
                {
                    await
                    QuoteItem2.
                    setQuote(relatedQuote2);
                }
            
                const relatedQuote3 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const QuoteItem3 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuoteItem3?.setQuote)
                {
                    await
                    QuoteItem3.
                    setQuote(relatedQuote3);
                }
            
                const relatedQuote4 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const QuoteItem4 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuoteItem4?.setQuote)
                {
                    await
                    QuoteItem4.
                    setQuote(relatedQuote4);
                }
            
        }
        
    
        
            
            async function associateQuoteItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const QuoteItem0 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuoteItem0?.setProduct)
                {
                    await
                    QuoteItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const QuoteItem1 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuoteItem1?.setProduct)
                {
                    await
                    QuoteItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const QuoteItem2 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuoteItem2?.setProduct)
                {
                    await
                    QuoteItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const QuoteItem3 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuoteItem3?.setProduct)
                {
                    await
                    QuoteItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const QuoteItem4 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuoteItem4?.setProduct)
                {
                    await
                    QuoteItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateQuoteItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuoteItem0 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuoteItem0?.setOrganization)
                {
                    await
                    QuoteItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuoteItem1 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuoteItem1?.setOrganization)
                {
                    await
                    QuoteItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuoteItem2 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuoteItem2?.setOrganization)
                {
                    await
                    QuoteItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuoteItem3 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuoteItem3?.setOrganization)
                {
                    await
                    QuoteItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuoteItem4 = await QuoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuoteItem4?.setOrganization)
                {
                    await
                    QuoteItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSalesOrderWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrder0 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrder0?.setOrganization)
                {
                    await
                    SalesOrder0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrder1 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrder1?.setOrganization)
                {
                    await
                    SalesOrder1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrder2 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrder2?.setOrganization)
                {
                    await
                    SalesOrder2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrder3 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrder3?.setOrganization)
                {
                    await
                    SalesOrder3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrder4 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrder4?.setOrganization)
                {
                    await
                    SalesOrder4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateSalesOrderWithClient() {
            
                const relatedClient0 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const SalesOrder0 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrder0?.setClient)
                {
                    await
                    SalesOrder0.
                    setClient(relatedClient0);
                }
            
                const relatedClient1 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const SalesOrder1 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrder1?.setClient)
                {
                    await
                    SalesOrder1.
                    setClient(relatedClient1);
                }
            
                const relatedClient2 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const SalesOrder2 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrder2?.setClient)
                {
                    await
                    SalesOrder2.
                    setClient(relatedClient2);
                }
            
                const relatedClient3 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const SalesOrder3 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrder3?.setClient)
                {
                    await
                    SalesOrder3.
                    setClient(relatedClient3);
                }
            
                const relatedClient4 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const SalesOrder4 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrder4?.setClient)
                {
                    await
                    SalesOrder4.
                    setClient(relatedClient4);
                }
            
        }
        
    
        
            
            async function associateSalesOrderWithSource_quote() {
            
                const relatedSource_quote0 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const SalesOrder0 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrder0?.setSource_quote)
                {
                    await
                    SalesOrder0.
                    setSource_quote(relatedSource_quote0);
                }
            
                const relatedSource_quote1 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const SalesOrder1 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrder1?.setSource_quote)
                {
                    await
                    SalesOrder1.
                    setSource_quote(relatedSource_quote1);
                }
            
                const relatedSource_quote2 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const SalesOrder2 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrder2?.setSource_quote)
                {
                    await
                    SalesOrder2.
                    setSource_quote(relatedSource_quote2);
                }
            
                const relatedSource_quote3 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const SalesOrder3 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrder3?.setSource_quote)
                {
                    await
                    SalesOrder3.
                    setSource_quote(relatedSource_quote3);
                }
            
                const relatedSource_quote4 = await Quotes.findOne({
                    offset: Math.floor(Math.random() * (await Quotes.count())),
                });
                const SalesOrder4 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrder4?.setSource_quote)
                {
                    await
                    SalesOrder4.
                    setSource_quote(relatedSource_quote4);
                }
            
        }
        
    
        
            
            async function associateSalesOrderWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const SalesOrder0 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrder0?.setWarehouse)
                {
                    await
                    SalesOrder0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const SalesOrder1 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrder1?.setWarehouse)
                {
                    await
                    SalesOrder1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const SalesOrder2 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrder2?.setWarehouse)
                {
                    await
                    SalesOrder2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const SalesOrder3 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrder3?.setWarehouse)
                {
                    await
                    SalesOrder3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const SalesOrder4 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrder4?.setWarehouse)
                {
                    await
                    SalesOrder4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
            
            async function associateSalesOrderWithPayment_term() {
            
                const relatedPayment_term0 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const SalesOrder0 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrder0?.setPayment_term)
                {
                    await
                    SalesOrder0.
                    setPayment_term(relatedPayment_term0);
                }
            
                const relatedPayment_term1 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const SalesOrder1 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrder1?.setPayment_term)
                {
                    await
                    SalesOrder1.
                    setPayment_term(relatedPayment_term1);
                }
            
                const relatedPayment_term2 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const SalesOrder2 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrder2?.setPayment_term)
                {
                    await
                    SalesOrder2.
                    setPayment_term(relatedPayment_term2);
                }
            
                const relatedPayment_term3 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const SalesOrder3 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrder3?.setPayment_term)
                {
                    await
                    SalesOrder3.
                    setPayment_term(relatedPayment_term3);
                }
            
                const relatedPayment_term4 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const SalesOrder4 = await SalesOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrder4?.setPayment_term)
                {
                    await
                    SalesOrder4.
                    setPayment_term(relatedPayment_term4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateSalesOrderItemWithSales_order() {
            
                const relatedSales_order0 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const SalesOrderItem0 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrderItem0?.setSales_order)
                {
                    await
                    SalesOrderItem0.
                    setSales_order(relatedSales_order0);
                }
            
                const relatedSales_order1 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const SalesOrderItem1 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrderItem1?.setSales_order)
                {
                    await
                    SalesOrderItem1.
                    setSales_order(relatedSales_order1);
                }
            
                const relatedSales_order2 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const SalesOrderItem2 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrderItem2?.setSales_order)
                {
                    await
                    SalesOrderItem2.
                    setSales_order(relatedSales_order2);
                }
            
                const relatedSales_order3 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const SalesOrderItem3 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrderItem3?.setSales_order)
                {
                    await
                    SalesOrderItem3.
                    setSales_order(relatedSales_order3);
                }
            
                const relatedSales_order4 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const SalesOrderItem4 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrderItem4?.setSales_order)
                {
                    await
                    SalesOrderItem4.
                    setSales_order(relatedSales_order4);
                }
            
        }
        
    
        
            
            async function associateSalesOrderItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const SalesOrderItem0 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrderItem0?.setProduct)
                {
                    await
                    SalesOrderItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const SalesOrderItem1 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrderItem1?.setProduct)
                {
                    await
                    SalesOrderItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const SalesOrderItem2 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrderItem2?.setProduct)
                {
                    await
                    SalesOrderItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const SalesOrderItem3 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrderItem3?.setProduct)
                {
                    await
                    SalesOrderItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const SalesOrderItem4 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrderItem4?.setProduct)
                {
                    await
                    SalesOrderItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSalesOrderItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrderItem0 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesOrderItem0?.setOrganization)
                {
                    await
                    SalesOrderItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrderItem1 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesOrderItem1?.setOrganization)
                {
                    await
                    SalesOrderItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrderItem2 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesOrderItem2?.setOrganization)
                {
                    await
                    SalesOrderItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrderItem3 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SalesOrderItem3?.setOrganization)
                {
                    await
                    SalesOrderItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesOrderItem4 = await SalesOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SalesOrderItem4?.setOrganization)
                {
                    await
                    SalesOrderItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDeliveryNoteWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNote0 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNote0?.setOrganization)
                {
                    await
                    DeliveryNote0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNote1 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNote1?.setOrganization)
                {
                    await
                    DeliveryNote1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNote2 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNote2?.setOrganization)
                {
                    await
                    DeliveryNote2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNote3 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNote3?.setOrganization)
                {
                    await
                    DeliveryNote3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNote4 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNote4?.setOrganization)
                {
                    await
                    DeliveryNote4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateDeliveryNoteWithSales_order() {
            
                const relatedSales_order0 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const DeliveryNote0 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNote0?.setSales_order)
                {
                    await
                    DeliveryNote0.
                    setSales_order(relatedSales_order0);
                }
            
                const relatedSales_order1 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const DeliveryNote1 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNote1?.setSales_order)
                {
                    await
                    DeliveryNote1.
                    setSales_order(relatedSales_order1);
                }
            
                const relatedSales_order2 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const DeliveryNote2 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNote2?.setSales_order)
                {
                    await
                    DeliveryNote2.
                    setSales_order(relatedSales_order2);
                }
            
                const relatedSales_order3 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const DeliveryNote3 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNote3?.setSales_order)
                {
                    await
                    DeliveryNote3.
                    setSales_order(relatedSales_order3);
                }
            
                const relatedSales_order4 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const DeliveryNote4 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNote4?.setSales_order)
                {
                    await
                    DeliveryNote4.
                    setSales_order(relatedSales_order4);
                }
            
        }
        
    
        
            
            async function associateDeliveryNoteWithClient() {
            
                const relatedClient0 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const DeliveryNote0 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNote0?.setClient)
                {
                    await
                    DeliveryNote0.
                    setClient(relatedClient0);
                }
            
                const relatedClient1 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const DeliveryNote1 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNote1?.setClient)
                {
                    await
                    DeliveryNote1.
                    setClient(relatedClient1);
                }
            
                const relatedClient2 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const DeliveryNote2 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNote2?.setClient)
                {
                    await
                    DeliveryNote2.
                    setClient(relatedClient2);
                }
            
                const relatedClient3 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const DeliveryNote3 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNote3?.setClient)
                {
                    await
                    DeliveryNote3.
                    setClient(relatedClient3);
                }
            
                const relatedClient4 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const DeliveryNote4 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNote4?.setClient)
                {
                    await
                    DeliveryNote4.
                    setClient(relatedClient4);
                }
            
        }
        
    
        
            
            async function associateDeliveryNoteWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const DeliveryNote0 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNote0?.setWarehouse)
                {
                    await
                    DeliveryNote0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const DeliveryNote1 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNote1?.setWarehouse)
                {
                    await
                    DeliveryNote1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const DeliveryNote2 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNote2?.setWarehouse)
                {
                    await
                    DeliveryNote2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const DeliveryNote3 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNote3?.setWarehouse)
                {
                    await
                    DeliveryNote3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const DeliveryNote4 = await DeliveryNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNote4?.setWarehouse)
                {
                    await
                    DeliveryNote4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateDeliveryNoteItemWithDelivery_note() {
            
                const relatedDelivery_note0 = await DeliveryNotes.findOne({
                    offset: Math.floor(Math.random() * (await DeliveryNotes.count())),
                });
                const DeliveryNoteItem0 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNoteItem0?.setDelivery_note)
                {
                    await
                    DeliveryNoteItem0.
                    setDelivery_note(relatedDelivery_note0);
                }
            
                const relatedDelivery_note1 = await DeliveryNotes.findOne({
                    offset: Math.floor(Math.random() * (await DeliveryNotes.count())),
                });
                const DeliveryNoteItem1 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNoteItem1?.setDelivery_note)
                {
                    await
                    DeliveryNoteItem1.
                    setDelivery_note(relatedDelivery_note1);
                }
            
                const relatedDelivery_note2 = await DeliveryNotes.findOne({
                    offset: Math.floor(Math.random() * (await DeliveryNotes.count())),
                });
                const DeliveryNoteItem2 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNoteItem2?.setDelivery_note)
                {
                    await
                    DeliveryNoteItem2.
                    setDelivery_note(relatedDelivery_note2);
                }
            
                const relatedDelivery_note3 = await DeliveryNotes.findOne({
                    offset: Math.floor(Math.random() * (await DeliveryNotes.count())),
                });
                const DeliveryNoteItem3 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNoteItem3?.setDelivery_note)
                {
                    await
                    DeliveryNoteItem3.
                    setDelivery_note(relatedDelivery_note3);
                }
            
                const relatedDelivery_note4 = await DeliveryNotes.findOne({
                    offset: Math.floor(Math.random() * (await DeliveryNotes.count())),
                });
                const DeliveryNoteItem4 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNoteItem4?.setDelivery_note)
                {
                    await
                    DeliveryNoteItem4.
                    setDelivery_note(relatedDelivery_note4);
                }
            
        }
        
    
        
            
            async function associateDeliveryNoteItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const DeliveryNoteItem0 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNoteItem0?.setProduct)
                {
                    await
                    DeliveryNoteItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const DeliveryNoteItem1 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNoteItem1?.setProduct)
                {
                    await
                    DeliveryNoteItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const DeliveryNoteItem2 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNoteItem2?.setProduct)
                {
                    await
                    DeliveryNoteItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const DeliveryNoteItem3 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNoteItem3?.setProduct)
                {
                    await
                    DeliveryNoteItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const DeliveryNoteItem4 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNoteItem4?.setProduct)
                {
                    await
                    DeliveryNoteItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateDeliveryNoteItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNoteItem0 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DeliveryNoteItem0?.setOrganization)
                {
                    await
                    DeliveryNoteItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNoteItem1 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DeliveryNoteItem1?.setOrganization)
                {
                    await
                    DeliveryNoteItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNoteItem2 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DeliveryNoteItem2?.setOrganization)
                {
                    await
                    DeliveryNoteItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNoteItem3 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DeliveryNoteItem3?.setOrganization)
                {
                    await
                    DeliveryNoteItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DeliveryNoteItem4 = await DeliveryNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DeliveryNoteItem4?.setOrganization)
                {
                    await
                    DeliveryNoteItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInvoiceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setOrganization)
                {
                    await
                    Invoice0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setOrganization)
                {
                    await
                    Invoice1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setOrganization)
                {
                    await
                    Invoice2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice3 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Invoice3?.setOrganization)
                {
                    await
                    Invoice3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice4 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Invoice4?.setOrganization)
                {
                    await
                    Invoice4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateInvoiceWithClient() {
            
                const relatedClient0 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setClient)
                {
                    await
                    Invoice0.
                    setClient(relatedClient0);
                }
            
                const relatedClient1 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setClient)
                {
                    await
                    Invoice1.
                    setClient(relatedClient1);
                }
            
                const relatedClient2 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setClient)
                {
                    await
                    Invoice2.
                    setClient(relatedClient2);
                }
            
                const relatedClient3 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Invoice3 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Invoice3?.setClient)
                {
                    await
                    Invoice3.
                    setClient(relatedClient3);
                }
            
                const relatedClient4 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const Invoice4 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Invoice4?.setClient)
                {
                    await
                    Invoice4.
                    setClient(relatedClient4);
                }
            
        }
        
    
        
            
            async function associateInvoiceWithSales_order() {
            
                const relatedSales_order0 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setSales_order)
                {
                    await
                    Invoice0.
                    setSales_order(relatedSales_order0);
                }
            
                const relatedSales_order1 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setSales_order)
                {
                    await
                    Invoice1.
                    setSales_order(relatedSales_order1);
                }
            
                const relatedSales_order2 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setSales_order)
                {
                    await
                    Invoice2.
                    setSales_order(relatedSales_order2);
                }
            
                const relatedSales_order3 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const Invoice3 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Invoice3?.setSales_order)
                {
                    await
                    Invoice3.
                    setSales_order(relatedSales_order3);
                }
            
                const relatedSales_order4 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const Invoice4 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Invoice4?.setSales_order)
                {
                    await
                    Invoice4.
                    setSales_order(relatedSales_order4);
                }
            
        }
        
    
        
            
            async function associateInvoiceWithPayment_term() {
            
                const relatedPayment_term0 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setPayment_term)
                {
                    await
                    Invoice0.
                    setPayment_term(relatedPayment_term0);
                }
            
                const relatedPayment_term1 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setPayment_term)
                {
                    await
                    Invoice1.
                    setPayment_term(relatedPayment_term1);
                }
            
                const relatedPayment_term2 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setPayment_term)
                {
                    await
                    Invoice2.
                    setPayment_term(relatedPayment_term2);
                }
            
                const relatedPayment_term3 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Invoice3 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Invoice3?.setPayment_term)
                {
                    await
                    Invoice3.
                    setPayment_term(relatedPayment_term3);
                }
            
                const relatedPayment_term4 = await PaymentTerms.findOne({
                    offset: Math.floor(Math.random() * (await PaymentTerms.count())),
                });
                const Invoice4 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Invoice4?.setPayment_term)
                {
                    await
                    Invoice4.
                    setPayment_term(relatedPayment_term4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateInvoiceItemWithInvoice() {
            
                const relatedInvoice0 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceItem0 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceItem0?.setInvoice)
                {
                    await
                    InvoiceItem0.
                    setInvoice(relatedInvoice0);
                }
            
                const relatedInvoice1 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceItem1 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceItem1?.setInvoice)
                {
                    await
                    InvoiceItem1.
                    setInvoice(relatedInvoice1);
                }
            
                const relatedInvoice2 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceItem2 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceItem2?.setInvoice)
                {
                    await
                    InvoiceItem2.
                    setInvoice(relatedInvoice2);
                }
            
                const relatedInvoice3 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceItem3 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InvoiceItem3?.setInvoice)
                {
                    await
                    InvoiceItem3.
                    setInvoice(relatedInvoice3);
                }
            
                const relatedInvoice4 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceItem4 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InvoiceItem4?.setInvoice)
                {
                    await
                    InvoiceItem4.
                    setInvoice(relatedInvoice4);
                }
            
        }
        
    
        
            
            async function associateInvoiceItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceItem0 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceItem0?.setProduct)
                {
                    await
                    InvoiceItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceItem1 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceItem1?.setProduct)
                {
                    await
                    InvoiceItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceItem2 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceItem2?.setProduct)
                {
                    await
                    InvoiceItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceItem3 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InvoiceItem3?.setProduct)
                {
                    await
                    InvoiceItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceItem4 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InvoiceItem4?.setProduct)
                {
                    await
                    InvoiceItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInvoiceItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceItem0 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceItem0?.setOrganization)
                {
                    await
                    InvoiceItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceItem1 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceItem1?.setOrganization)
                {
                    await
                    InvoiceItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceItem2 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceItem2?.setOrganization)
                {
                    await
                    InvoiceItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceItem3 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InvoiceItem3?.setOrganization)
                {
                    await
                    InvoiceItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceItem4 = await InvoiceItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InvoiceItem4?.setOrganization)
                {
                    await
                    InvoiceItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePaymentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setOrganization)
                {
                    await
                    Payment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setOrganization)
                {
                    await
                    Payment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setOrganization)
                {
                    await
                    Payment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment3 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payment3?.setOrganization)
                {
                    await
                    Payment3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment4 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Payment4?.setOrganization)
                {
                    await
                    Payment4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
            
            async function associatePaymentWithInvoice() {
            
                const relatedInvoice0 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setInvoice)
                {
                    await
                    Payment0.
                    setInvoice(relatedInvoice0);
                }
            
                const relatedInvoice1 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setInvoice)
                {
                    await
                    Payment1.
                    setInvoice(relatedInvoice1);
                }
            
                const relatedInvoice2 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setInvoice)
                {
                    await
                    Payment2.
                    setInvoice(relatedInvoice2);
                }
            
                const relatedInvoice3 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment3 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payment3?.setInvoice)
                {
                    await
                    Payment3.
                    setInvoice(relatedInvoice3);
                }
            
                const relatedInvoice4 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment4 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Payment4?.setInvoice)
                {
                    await
                    Payment4.
                    setInvoice(relatedInvoice4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateCreditNoteWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNote0 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CreditNote0?.setOrganization)
                {
                    await
                    CreditNote0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNote1 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CreditNote1?.setOrganization)
                {
                    await
                    CreditNote1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNote2 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CreditNote2?.setOrganization)
                {
                    await
                    CreditNote2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNote3 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CreditNote3?.setOrganization)
                {
                    await
                    CreditNote3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNote4 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CreditNote4?.setOrganization)
                {
                    await
                    CreditNote4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateCreditNoteWithInvoice() {
            
                const relatedInvoice0 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const CreditNote0 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CreditNote0?.setInvoice)
                {
                    await
                    CreditNote0.
                    setInvoice(relatedInvoice0);
                }
            
                const relatedInvoice1 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const CreditNote1 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CreditNote1?.setInvoice)
                {
                    await
                    CreditNote1.
                    setInvoice(relatedInvoice1);
                }
            
                const relatedInvoice2 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const CreditNote2 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CreditNote2?.setInvoice)
                {
                    await
                    CreditNote2.
                    setInvoice(relatedInvoice2);
                }
            
                const relatedInvoice3 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const CreditNote3 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CreditNote3?.setInvoice)
                {
                    await
                    CreditNote3.
                    setInvoice(relatedInvoice3);
                }
            
                const relatedInvoice4 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const CreditNote4 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CreditNote4?.setInvoice)
                {
                    await
                    CreditNote4.
                    setInvoice(relatedInvoice4);
                }
            
        }
        
    
        
            
            async function associateCreditNoteWithClient() {
            
                const relatedClient0 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const CreditNote0 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CreditNote0?.setClient)
                {
                    await
                    CreditNote0.
                    setClient(relatedClient0);
                }
            
                const relatedClient1 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const CreditNote1 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CreditNote1?.setClient)
                {
                    await
                    CreditNote1.
                    setClient(relatedClient1);
                }
            
                const relatedClient2 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const CreditNote2 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CreditNote2?.setClient)
                {
                    await
                    CreditNote2.
                    setClient(relatedClient2);
                }
            
                const relatedClient3 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const CreditNote3 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CreditNote3?.setClient)
                {
                    await
                    CreditNote3.
                    setClient(relatedClient3);
                }
            
                const relatedClient4 = await Clients.findOne({
                    offset: Math.floor(Math.random() * (await Clients.count())),
                });
                const CreditNote4 = await CreditNotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CreditNote4?.setClient)
                {
                    await
                    CreditNote4.
                    setClient(relatedClient4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateCreditNoteItemWithCredit_note() {
            
                const relatedCredit_note0 = await CreditNotes.findOne({
                    offset: Math.floor(Math.random() * (await CreditNotes.count())),
                });
                const CreditNoteItem0 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CreditNoteItem0?.setCredit_note)
                {
                    await
                    CreditNoteItem0.
                    setCredit_note(relatedCredit_note0);
                }
            
                const relatedCredit_note1 = await CreditNotes.findOne({
                    offset: Math.floor(Math.random() * (await CreditNotes.count())),
                });
                const CreditNoteItem1 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CreditNoteItem1?.setCredit_note)
                {
                    await
                    CreditNoteItem1.
                    setCredit_note(relatedCredit_note1);
                }
            
                const relatedCredit_note2 = await CreditNotes.findOne({
                    offset: Math.floor(Math.random() * (await CreditNotes.count())),
                });
                const CreditNoteItem2 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CreditNoteItem2?.setCredit_note)
                {
                    await
                    CreditNoteItem2.
                    setCredit_note(relatedCredit_note2);
                }
            
                const relatedCredit_note3 = await CreditNotes.findOne({
                    offset: Math.floor(Math.random() * (await CreditNotes.count())),
                });
                const CreditNoteItem3 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CreditNoteItem3?.setCredit_note)
                {
                    await
                    CreditNoteItem3.
                    setCredit_note(relatedCredit_note3);
                }
            
                const relatedCredit_note4 = await CreditNotes.findOne({
                    offset: Math.floor(Math.random() * (await CreditNotes.count())),
                });
                const CreditNoteItem4 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CreditNoteItem4?.setCredit_note)
                {
                    await
                    CreditNoteItem4.
                    setCredit_note(relatedCredit_note4);
                }
            
        }
        
    
        
            
            async function associateCreditNoteItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CreditNoteItem0 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CreditNoteItem0?.setProduct)
                {
                    await
                    CreditNoteItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CreditNoteItem1 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CreditNoteItem1?.setProduct)
                {
                    await
                    CreditNoteItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CreditNoteItem2 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CreditNoteItem2?.setProduct)
                {
                    await
                    CreditNoteItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CreditNoteItem3 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CreditNoteItem3?.setProduct)
                {
                    await
                    CreditNoteItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CreditNoteItem4 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CreditNoteItem4?.setProduct)
                {
                    await
                    CreditNoteItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCreditNoteItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNoteItem0 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CreditNoteItem0?.setOrganization)
                {
                    await
                    CreditNoteItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNoteItem1 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CreditNoteItem1?.setOrganization)
                {
                    await
                    CreditNoteItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNoteItem2 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CreditNoteItem2?.setOrganization)
                {
                    await
                    CreditNoteItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNoteItem3 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CreditNoteItem3?.setOrganization)
                {
                    await
                    CreditNoteItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CreditNoteItem4 = await CreditNoteItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CreditNoteItem4?.setOrganization)
                {
                    await
                    CreditNoteItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePurchaseOrderWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrder0 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PurchaseOrder0?.setOrganization)
                {
                    await
                    PurchaseOrder0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrder1 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PurchaseOrder1?.setOrganization)
                {
                    await
                    PurchaseOrder1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrder2 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PurchaseOrder2?.setOrganization)
                {
                    await
                    PurchaseOrder2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrder3 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PurchaseOrder3?.setOrganization)
                {
                    await
                    PurchaseOrder3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrder4 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PurchaseOrder4?.setOrganization)
                {
                    await
                    PurchaseOrder4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associatePurchaseOrderWithSupplier() {
            
                const relatedSupplier0 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const PurchaseOrder0 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PurchaseOrder0?.setSupplier)
                {
                    await
                    PurchaseOrder0.
                    setSupplier(relatedSupplier0);
                }
            
                const relatedSupplier1 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const PurchaseOrder1 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PurchaseOrder1?.setSupplier)
                {
                    await
                    PurchaseOrder1.
                    setSupplier(relatedSupplier1);
                }
            
                const relatedSupplier2 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const PurchaseOrder2 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PurchaseOrder2?.setSupplier)
                {
                    await
                    PurchaseOrder2.
                    setSupplier(relatedSupplier2);
                }
            
                const relatedSupplier3 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const PurchaseOrder3 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PurchaseOrder3?.setSupplier)
                {
                    await
                    PurchaseOrder3.
                    setSupplier(relatedSupplier3);
                }
            
                const relatedSupplier4 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const PurchaseOrder4 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PurchaseOrder4?.setSupplier)
                {
                    await
                    PurchaseOrder4.
                    setSupplier(relatedSupplier4);
                }
            
        }
        
    
        
            
            async function associatePurchaseOrderWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const PurchaseOrder0 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PurchaseOrder0?.setWarehouse)
                {
                    await
                    PurchaseOrder0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const PurchaseOrder1 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PurchaseOrder1?.setWarehouse)
                {
                    await
                    PurchaseOrder1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const PurchaseOrder2 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PurchaseOrder2?.setWarehouse)
                {
                    await
                    PurchaseOrder2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const PurchaseOrder3 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PurchaseOrder3?.setWarehouse)
                {
                    await
                    PurchaseOrder3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const PurchaseOrder4 = await PurchaseOrders.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PurchaseOrder4?.setWarehouse)
                {
                    await
                    PurchaseOrder4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associatePurchaseOrderItemWithPurchase_order() {
            
                const relatedPurchase_order0 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const PurchaseOrderItem0 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PurchaseOrderItem0?.setPurchase_order)
                {
                    await
                    PurchaseOrderItem0.
                    setPurchase_order(relatedPurchase_order0);
                }
            
                const relatedPurchase_order1 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const PurchaseOrderItem1 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PurchaseOrderItem1?.setPurchase_order)
                {
                    await
                    PurchaseOrderItem1.
                    setPurchase_order(relatedPurchase_order1);
                }
            
                const relatedPurchase_order2 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const PurchaseOrderItem2 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PurchaseOrderItem2?.setPurchase_order)
                {
                    await
                    PurchaseOrderItem2.
                    setPurchase_order(relatedPurchase_order2);
                }
            
                const relatedPurchase_order3 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const PurchaseOrderItem3 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PurchaseOrderItem3?.setPurchase_order)
                {
                    await
                    PurchaseOrderItem3.
                    setPurchase_order(relatedPurchase_order3);
                }
            
                const relatedPurchase_order4 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const PurchaseOrderItem4 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PurchaseOrderItem4?.setPurchase_order)
                {
                    await
                    PurchaseOrderItem4.
                    setPurchase_order(relatedPurchase_order4);
                }
            
        }
        
    
        
            
            async function associatePurchaseOrderItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const PurchaseOrderItem0 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PurchaseOrderItem0?.setProduct)
                {
                    await
                    PurchaseOrderItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const PurchaseOrderItem1 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PurchaseOrderItem1?.setProduct)
                {
                    await
                    PurchaseOrderItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const PurchaseOrderItem2 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PurchaseOrderItem2?.setProduct)
                {
                    await
                    PurchaseOrderItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const PurchaseOrderItem3 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PurchaseOrderItem3?.setProduct)
                {
                    await
                    PurchaseOrderItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const PurchaseOrderItem4 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PurchaseOrderItem4?.setProduct)
                {
                    await
                    PurchaseOrderItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePurchaseOrderItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrderItem0 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PurchaseOrderItem0?.setOrganization)
                {
                    await
                    PurchaseOrderItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrderItem1 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PurchaseOrderItem1?.setOrganization)
                {
                    await
                    PurchaseOrderItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrderItem2 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PurchaseOrderItem2?.setOrganization)
                {
                    await
                    PurchaseOrderItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrderItem3 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PurchaseOrderItem3?.setOrganization)
                {
                    await
                    PurchaseOrderItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PurchaseOrderItem4 = await PurchaseOrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (PurchaseOrderItem4?.setOrganization)
                {
                    await
                    PurchaseOrderItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStockReceptionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReception0 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReception0?.setOrganization)
                {
                    await
                    StockReception0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReception1 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReception1?.setOrganization)
                {
                    await
                    StockReception1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReception2 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReception2?.setOrganization)
                {
                    await
                    StockReception2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReception3 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReception3?.setOrganization)
                {
                    await
                    StockReception3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReception4 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReception4?.setOrganization)
                {
                    await
                    StockReception4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateStockReceptionWithPurchase_order() {
            
                const relatedPurchase_order0 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const StockReception0 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReception0?.setPurchase_order)
                {
                    await
                    StockReception0.
                    setPurchase_order(relatedPurchase_order0);
                }
            
                const relatedPurchase_order1 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const StockReception1 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReception1?.setPurchase_order)
                {
                    await
                    StockReception1.
                    setPurchase_order(relatedPurchase_order1);
                }
            
                const relatedPurchase_order2 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const StockReception2 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReception2?.setPurchase_order)
                {
                    await
                    StockReception2.
                    setPurchase_order(relatedPurchase_order2);
                }
            
                const relatedPurchase_order3 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const StockReception3 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReception3?.setPurchase_order)
                {
                    await
                    StockReception3.
                    setPurchase_order(relatedPurchase_order3);
                }
            
                const relatedPurchase_order4 = await PurchaseOrders.findOne({
                    offset: Math.floor(Math.random() * (await PurchaseOrders.count())),
                });
                const StockReception4 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReception4?.setPurchase_order)
                {
                    await
                    StockReception4.
                    setPurchase_order(relatedPurchase_order4);
                }
            
        }
        
    
        
            
            async function associateStockReceptionWithSupplier() {
            
                const relatedSupplier0 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const StockReception0 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReception0?.setSupplier)
                {
                    await
                    StockReception0.
                    setSupplier(relatedSupplier0);
                }
            
                const relatedSupplier1 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const StockReception1 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReception1?.setSupplier)
                {
                    await
                    StockReception1.
                    setSupplier(relatedSupplier1);
                }
            
                const relatedSupplier2 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const StockReception2 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReception2?.setSupplier)
                {
                    await
                    StockReception2.
                    setSupplier(relatedSupplier2);
                }
            
                const relatedSupplier3 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const StockReception3 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReception3?.setSupplier)
                {
                    await
                    StockReception3.
                    setSupplier(relatedSupplier3);
                }
            
                const relatedSupplier4 = await Suppliers.findOne({
                    offset: Math.floor(Math.random() * (await Suppliers.count())),
                });
                const StockReception4 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReception4?.setSupplier)
                {
                    await
                    StockReception4.
                    setSupplier(relatedSupplier4);
                }
            
        }
        
    
        
            
            async function associateStockReceptionWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReception0 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReception0?.setWarehouse)
                {
                    await
                    StockReception0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReception1 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReception1?.setWarehouse)
                {
                    await
                    StockReception1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReception2 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReception2?.setWarehouse)
                {
                    await
                    StockReception2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReception3 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReception3?.setWarehouse)
                {
                    await
                    StockReception3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReception4 = await StockReceptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReception4?.setWarehouse)
                {
                    await
                    StockReception4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateStockReceptionItemWithStock_reception() {
            
                const relatedStock_reception0 = await StockReceptions.findOne({
                    offset: Math.floor(Math.random() * (await StockReceptions.count())),
                });
                const StockReceptionItem0 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReceptionItem0?.setStock_reception)
                {
                    await
                    StockReceptionItem0.
                    setStock_reception(relatedStock_reception0);
                }
            
                const relatedStock_reception1 = await StockReceptions.findOne({
                    offset: Math.floor(Math.random() * (await StockReceptions.count())),
                });
                const StockReceptionItem1 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReceptionItem1?.setStock_reception)
                {
                    await
                    StockReceptionItem1.
                    setStock_reception(relatedStock_reception1);
                }
            
                const relatedStock_reception2 = await StockReceptions.findOne({
                    offset: Math.floor(Math.random() * (await StockReceptions.count())),
                });
                const StockReceptionItem2 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReceptionItem2?.setStock_reception)
                {
                    await
                    StockReceptionItem2.
                    setStock_reception(relatedStock_reception2);
                }
            
                const relatedStock_reception3 = await StockReceptions.findOne({
                    offset: Math.floor(Math.random() * (await StockReceptions.count())),
                });
                const StockReceptionItem3 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReceptionItem3?.setStock_reception)
                {
                    await
                    StockReceptionItem3.
                    setStock_reception(relatedStock_reception3);
                }
            
                const relatedStock_reception4 = await StockReceptions.findOne({
                    offset: Math.floor(Math.random() * (await StockReceptions.count())),
                });
                const StockReceptionItem4 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReceptionItem4?.setStock_reception)
                {
                    await
                    StockReceptionItem4.
                    setStock_reception(relatedStock_reception4);
                }
            
        }
        
    
        
            
            async function associateStockReceptionItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReceptionItem0 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReceptionItem0?.setProduct)
                {
                    await
                    StockReceptionItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReceptionItem1 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReceptionItem1?.setProduct)
                {
                    await
                    StockReceptionItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReceptionItem2 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReceptionItem2?.setProduct)
                {
                    await
                    StockReceptionItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReceptionItem3 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReceptionItem3?.setProduct)
                {
                    await
                    StockReceptionItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReceptionItem4 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReceptionItem4?.setProduct)
                {
                    await
                    StockReceptionItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStockReceptionItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReceptionItem0 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReceptionItem0?.setOrganization)
                {
                    await
                    StockReceptionItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReceptionItem1 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReceptionItem1?.setOrganization)
                {
                    await
                    StockReceptionItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReceptionItem2 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReceptionItem2?.setOrganization)
                {
                    await
                    StockReceptionItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReceptionItem3 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReceptionItem3?.setOrganization)
                {
                    await
                    StockReceptionItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReceptionItem4 = await StockReceptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReceptionItem4?.setOrganization)
                {
                    await
                    StockReceptionItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStockReservationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReservation0 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReservation0?.setOrganization)
                {
                    await
                    StockReservation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReservation1 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReservation1?.setOrganization)
                {
                    await
                    StockReservation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReservation2 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReservation2?.setOrganization)
                {
                    await
                    StockReservation2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReservation3 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReservation3?.setOrganization)
                {
                    await
                    StockReservation3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockReservation4 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReservation4?.setOrganization)
                {
                    await
                    StockReservation4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
            
            async function associateStockReservationWithSales_order() {
            
                const relatedSales_order0 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const StockReservation0 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReservation0?.setSales_order)
                {
                    await
                    StockReservation0.
                    setSales_order(relatedSales_order0);
                }
            
                const relatedSales_order1 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const StockReservation1 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReservation1?.setSales_order)
                {
                    await
                    StockReservation1.
                    setSales_order(relatedSales_order1);
                }
            
                const relatedSales_order2 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const StockReservation2 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReservation2?.setSales_order)
                {
                    await
                    StockReservation2.
                    setSales_order(relatedSales_order2);
                }
            
                const relatedSales_order3 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const StockReservation3 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReservation3?.setSales_order)
                {
                    await
                    StockReservation3.
                    setSales_order(relatedSales_order3);
                }
            
                const relatedSales_order4 = await SalesOrders.findOne({
                    offset: Math.floor(Math.random() * (await SalesOrders.count())),
                });
                const StockReservation4 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReservation4?.setSales_order)
                {
                    await
                    StockReservation4.
                    setSales_order(relatedSales_order4);
                }
            
        }
        
    
        
            
            async function associateStockReservationWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReservation0 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReservation0?.setProduct)
                {
                    await
                    StockReservation0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReservation1 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReservation1?.setProduct)
                {
                    await
                    StockReservation1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReservation2 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReservation2?.setProduct)
                {
                    await
                    StockReservation2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReservation3 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReservation3?.setProduct)
                {
                    await
                    StockReservation3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockReservation4 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReservation4?.setProduct)
                {
                    await
                    StockReservation4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
            
            async function associateStockReservationWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReservation0 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockReservation0?.setWarehouse)
                {
                    await
                    StockReservation0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReservation1 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockReservation1?.setWarehouse)
                {
                    await
                    StockReservation1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReservation2 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockReservation2?.setWarehouse)
                {
                    await
                    StockReservation2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReservation3 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockReservation3?.setWarehouse)
                {
                    await
                    StockReservation3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockReservation4 = await StockReservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockReservation4?.setWarehouse)
                {
                    await
                    StockReservation4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateStockMovementWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockMovement0 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockMovement0?.setOrganization)
                {
                    await
                    StockMovement0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockMovement1 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockMovement1?.setOrganization)
                {
                    await
                    StockMovement1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockMovement2 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockMovement2?.setOrganization)
                {
                    await
                    StockMovement2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockMovement3 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockMovement3?.setOrganization)
                {
                    await
                    StockMovement3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StockMovement4 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockMovement4?.setOrganization)
                {
                    await
                    StockMovement4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
            
            async function associateStockMovementWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockMovement0 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockMovement0?.setProduct)
                {
                    await
                    StockMovement0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockMovement1 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockMovement1?.setProduct)
                {
                    await
                    StockMovement1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockMovement2 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockMovement2?.setProduct)
                {
                    await
                    StockMovement2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockMovement3 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockMovement3?.setProduct)
                {
                    await
                    StockMovement3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const StockMovement4 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockMovement4?.setProduct)
                {
                    await
                    StockMovement4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
            
            async function associateStockMovementWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockMovement0 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StockMovement0?.setWarehouse)
                {
                    await
                    StockMovement0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockMovement1 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StockMovement1?.setWarehouse)
                {
                    await
                    StockMovement1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockMovement2 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StockMovement2?.setWarehouse)
                {
                    await
                    StockMovement2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockMovement3 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StockMovement3?.setWarehouse)
                {
                    await
                    StockMovement3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const StockMovement4 = await StockMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StockMovement4?.setWarehouse)
                {
                    await
                    StockMovement4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateInventoryCountWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCount0 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryCount0?.setOrganization)
                {
                    await
                    InventoryCount0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCount1 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryCount1?.setOrganization)
                {
                    await
                    InventoryCount1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCount2 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryCount2?.setOrganization)
                {
                    await
                    InventoryCount2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCount3 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryCount3?.setOrganization)
                {
                    await
                    InventoryCount3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCount4 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InventoryCount4?.setOrganization)
                {
                    await
                    InventoryCount4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
            
            async function associateInventoryCountWithWarehouse() {
            
                const relatedWarehouse0 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const InventoryCount0 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryCount0?.setWarehouse)
                {
                    await
                    InventoryCount0.
                    setWarehouse(relatedWarehouse0);
                }
            
                const relatedWarehouse1 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const InventoryCount1 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryCount1?.setWarehouse)
                {
                    await
                    InventoryCount1.
                    setWarehouse(relatedWarehouse1);
                }
            
                const relatedWarehouse2 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const InventoryCount2 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryCount2?.setWarehouse)
                {
                    await
                    InventoryCount2.
                    setWarehouse(relatedWarehouse2);
                }
            
                const relatedWarehouse3 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const InventoryCount3 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryCount3?.setWarehouse)
                {
                    await
                    InventoryCount3.
                    setWarehouse(relatedWarehouse3);
                }
            
                const relatedWarehouse4 = await Warehouses.findOne({
                    offset: Math.floor(Math.random() * (await Warehouses.count())),
                });
                const InventoryCount4 = await InventoryCounts.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InventoryCount4?.setWarehouse)
                {
                    await
                    InventoryCount4.
                    setWarehouse(relatedWarehouse4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateInventoryCountItemWithInventory_count() {
            
                const relatedInventory_count0 = await InventoryCounts.findOne({
                    offset: Math.floor(Math.random() * (await InventoryCounts.count())),
                });
                const InventoryCountItem0 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryCountItem0?.setInventory_count)
                {
                    await
                    InventoryCountItem0.
                    setInventory_count(relatedInventory_count0);
                }
            
                const relatedInventory_count1 = await InventoryCounts.findOne({
                    offset: Math.floor(Math.random() * (await InventoryCounts.count())),
                });
                const InventoryCountItem1 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryCountItem1?.setInventory_count)
                {
                    await
                    InventoryCountItem1.
                    setInventory_count(relatedInventory_count1);
                }
            
                const relatedInventory_count2 = await InventoryCounts.findOne({
                    offset: Math.floor(Math.random() * (await InventoryCounts.count())),
                });
                const InventoryCountItem2 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryCountItem2?.setInventory_count)
                {
                    await
                    InventoryCountItem2.
                    setInventory_count(relatedInventory_count2);
                }
            
                const relatedInventory_count3 = await InventoryCounts.findOne({
                    offset: Math.floor(Math.random() * (await InventoryCounts.count())),
                });
                const InventoryCountItem3 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryCountItem3?.setInventory_count)
                {
                    await
                    InventoryCountItem3.
                    setInventory_count(relatedInventory_count3);
                }
            
                const relatedInventory_count4 = await InventoryCounts.findOne({
                    offset: Math.floor(Math.random() * (await InventoryCounts.count())),
                });
                const InventoryCountItem4 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InventoryCountItem4?.setInventory_count)
                {
                    await
                    InventoryCountItem4.
                    setInventory_count(relatedInventory_count4);
                }
            
        }
        
    
        
            
            async function associateInventoryCountItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryCountItem0 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryCountItem0?.setProduct)
                {
                    await
                    InventoryCountItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryCountItem1 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryCountItem1?.setProduct)
                {
                    await
                    InventoryCountItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryCountItem2 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryCountItem2?.setProduct)
                {
                    await
                    InventoryCountItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryCountItem3 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryCountItem3?.setProduct)
                {
                    await
                    InventoryCountItem3.
                    setProduct(relatedProduct3);
                }
            
                const relatedProduct4 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryCountItem4 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InventoryCountItem4?.setProduct)
                {
                    await
                    InventoryCountItem4.
                    setProduct(relatedProduct4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInventoryCountItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCountItem0 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryCountItem0?.setOrganization)
                {
                    await
                    InventoryCountItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCountItem1 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryCountItem1?.setOrganization)
                {
                    await
                    InventoryCountItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCountItem2 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryCountItem2?.setOrganization)
                {
                    await
                    InventoryCountItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCountItem3 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryCountItem3?.setOrganization)
                {
                    await
                    InventoryCountItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryCountItem4 = await InventoryCountItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (InventoryCountItem4?.setOrganization)
                {
                    await
                    InventoryCountItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateImportJobWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ImportJob0 = await ImportJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ImportJob0?.setOrganization)
                {
                    await
                    ImportJob0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ImportJob1 = await ImportJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ImportJob1?.setOrganization)
                {
                    await
                    ImportJob1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ImportJob2 = await ImportJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ImportJob2?.setOrganization)
                {
                    await
                    ImportJob2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ImportJob3 = await ImportJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ImportJob3?.setOrganization)
                {
                    await
                    ImportJob3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ImportJob4 = await ImportJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ImportJob4?.setOrganization)
                {
                    await
                    ImportJob4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateAuditLogWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setOrganization)
                {
                    await
                    AuditLog0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setOrganization)
                {
                    await
                    AuditLog1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setOrganization)
                {
                    await
                    AuditLog2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog3 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditLog3?.setOrganization)
                {
                    await
                    AuditLog3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog4 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AuditLog4?.setOrganization)
                {
                    await
                    AuditLog4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    
        
            
            async function associateAuditLogWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setUser)
                {
                    await
                    AuditLog0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setUser)
                {
                    await
                    AuditLog1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setUser)
                {
                    await
                    AuditLog2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog3 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditLog3?.setUser)
                {
                    await
                    AuditLog3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog4 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AuditLog4?.setUser)
                {
                    await
                    AuditLog4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await OrganizationMemberships.bulkCreate(OrganizationMembershipsData);
                
            
            
                
                await TaxRates.bulkCreate(TaxRatesData);
                
            
            
                
                await PaymentTerms.bulkCreate(PaymentTermsData);
                
            
            
                
                await NumberingSequences.bulkCreate(NumberingSequencesData);
                
            
            
                
                await Clients.bulkCreate(ClientsData);
                
            
            
                
                await Suppliers.bulkCreate(SuppliersData);
                
            
            
                
                await ProductCategories.bulkCreate(ProductCategoriesData);
                
            
            
                
                await Units.bulkCreate(UnitsData);
                
            
            
                
                await Products.bulkCreate(ProductsData);
                
            
            
                
                await Warehouses.bulkCreate(WarehousesData);
                
            
            
                
                await Quotes.bulkCreate(QuotesData);
                
            
            
                
                await QuoteItems.bulkCreate(QuoteItemsData);
                
            
            
                
                await SalesOrders.bulkCreate(SalesOrdersData);
                
            
            
                
                await SalesOrderItems.bulkCreate(SalesOrderItemsData);
                
            
            
                
                await DeliveryNotes.bulkCreate(DeliveryNotesData);
                
            
            
                
                await DeliveryNoteItems.bulkCreate(DeliveryNoteItemsData);
                
            
            
                
                await Invoices.bulkCreate(InvoicesData);
                
            
            
                
                await InvoiceItems.bulkCreate(InvoiceItemsData);
                
            
            
                
                await Payments.bulkCreate(PaymentsData);
                
            
            
                
                await CreditNotes.bulkCreate(CreditNotesData);
                
            
            
                
                await CreditNoteItems.bulkCreate(CreditNoteItemsData);
                
            
            
                
                await PurchaseOrders.bulkCreate(PurchaseOrdersData);
                
            
            
                
                await PurchaseOrderItems.bulkCreate(PurchaseOrderItemsData);
                
            
            
                
                await StockReceptions.bulkCreate(StockReceptionsData);
                
            
            
                
                await StockReceptionItems.bulkCreate(StockReceptionItemsData);
                
            
            
                
                await StockReservations.bulkCreate(StockReservationsData);
                
            
            
                
                await StockMovements.bulkCreate(StockMovementsData);
                
            
            
                
                await InventoryCounts.bulkCreate(InventoryCountsData);
                
            
            
                
                await InventoryCountItems.bulkCreate(InventoryCountItemsData);
                
            
            
                
                await ImportJobs.bulkCreate(ImportJobsData);
                
            
            
                
                await AuditLogs.bulkCreate(AuditLogsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                        
                        await associateOrganizationMembershipWithOrganization(),
                    
                
                    
                        
                        await associateOrganizationMembershipWithUser(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateTaxRateWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePaymentTermWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateNumberingSequenceWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateClientWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateClientWithPayment_term(),
                    
                
            
                
                
                    
                        
                        await associateSupplierWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateProductCategoryWithOrganization(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateUnitWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateProductWithOrganization(),
                    
                
                    
                
                    
                
                    
                        
                        await associateProductWithCategory(),
                    
                
                    
                        
                        await associateProductWithUnit(),
                    
                
                    
                
                    
                
                    
                        
                        await associateProductWithTax_rate(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateWarehousWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateQuoteWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateQuoteWithClient(),
                    
                
                    
                        
                        await associateQuoteWithPayment_term(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateQuoteItemWithQuote(),
                    
                
                    
                        
                        await associateQuoteItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateQuoteItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSalesOrderWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateSalesOrderWithClient(),
                    
                
                    
                        
                        await associateSalesOrderWithSource_quote(),
                    
                
                    
                        
                        await associateSalesOrderWithWarehouse(),
                    
                
                    
                        
                        await associateSalesOrderWithPayment_term(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateSalesOrderItemWithSales_order(),
                    
                
                    
                        
                        await associateSalesOrderItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSalesOrderItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDeliveryNoteWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateDeliveryNoteWithSales_order(),
                    
                
                    
                        
                        await associateDeliveryNoteWithClient(),
                    
                
                    
                        
                        await associateDeliveryNoteWithWarehouse(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateDeliveryNoteItemWithDelivery_note(),
                    
                
                    
                        
                        await associateDeliveryNoteItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDeliveryNoteItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInvoiceWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateInvoiceWithClient(),
                    
                
                    
                        
                        await associateInvoiceWithSales_order(),
                    
                
                    
                        
                        await associateInvoiceWithPayment_term(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateInvoiceItemWithInvoice(),
                    
                
                    
                        
                        await associateInvoiceItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInvoiceItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePaymentWithOrganization(),
                    
                
                    
                        
                        await associatePaymentWithInvoice(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateCreditNoteWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateCreditNoteWithInvoice(),
                    
                
                    
                        
                        await associateCreditNoteWithClient(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateCreditNoteItemWithCredit_note(),
                    
                
                    
                        
                        await associateCreditNoteItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCreditNoteItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePurchaseOrderWithOrganization(),
                    
                
                    
                
                    
                        
                        await associatePurchaseOrderWithSupplier(),
                    
                
                    
                        
                        await associatePurchaseOrderWithWarehouse(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePurchaseOrderItemWithPurchase_order(),
                    
                
                    
                        
                        await associatePurchaseOrderItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePurchaseOrderItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStockReceptionWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateStockReceptionWithPurchase_order(),
                    
                
                    
                        
                        await associateStockReceptionWithSupplier(),
                    
                
                    
                        
                        await associateStockReceptionWithWarehouse(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateStockReceptionItemWithStock_reception(),
                    
                
                    
                        
                        await associateStockReceptionItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStockReceptionItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStockReservationWithOrganization(),
                    
                
                    
                        
                        await associateStockReservationWithSales_order(),
                    
                
                    
                        
                        await associateStockReservationWithProduct(),
                    
                
                    
                        
                        await associateStockReservationWithWarehouse(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateStockMovementWithOrganization(),
                    
                
                    
                        
                        await associateStockMovementWithProduct(),
                    
                
                    
                        
                        await associateStockMovementWithWarehouse(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateInventoryCountWithOrganization(),
                    
                
                    
                
                    
                        
                        await associateInventoryCountWithWarehouse(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateInventoryCountItemWithInventory_count(),
                    
                
                    
                        
                        await associateInventoryCountItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInventoryCountItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateImportJobWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAuditLogWithOrganization(),
                    
                
                    
                        
                        await associateAuditLogWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('organization_memberships', null, {});
            
            
            await queryInterface.bulkDelete('tax_rates', null, {});
            
            
            await queryInterface.bulkDelete('payment_terms', null, {});
            
            
            await queryInterface.bulkDelete('numbering_sequences', null, {});
            
            
            await queryInterface.bulkDelete('clients', null, {});
            
            
            await queryInterface.bulkDelete('suppliers', null, {});
            
            
            await queryInterface.bulkDelete('product_categories', null, {});
            
            
            await queryInterface.bulkDelete('units', null, {});
            
            
            await queryInterface.bulkDelete('products', null, {});
            
            
            await queryInterface.bulkDelete('warehouses', null, {});
            
            
            await queryInterface.bulkDelete('quotes', null, {});
            
            
            await queryInterface.bulkDelete('quote_items', null, {});
            
            
            await queryInterface.bulkDelete('sales_orders', null, {});
            
            
            await queryInterface.bulkDelete('sales_order_items', null, {});
            
            
            await queryInterface.bulkDelete('delivery_notes', null, {});
            
            
            await queryInterface.bulkDelete('delivery_note_items', null, {});
            
            
            await queryInterface.bulkDelete('invoices', null, {});
            
            
            await queryInterface.bulkDelete('invoice_items', null, {});
            
            
            await queryInterface.bulkDelete('payments', null, {});
            
            
            await queryInterface.bulkDelete('credit_notes', null, {});
            
            
            await queryInterface.bulkDelete('credit_note_items', null, {});
            
            
            await queryInterface.bulkDelete('purchase_orders', null, {});
            
            
            await queryInterface.bulkDelete('purchase_order_items', null, {});
            
            
            await queryInterface.bulkDelete('stock_receptions', null, {});
            
            
            await queryInterface.bulkDelete('stock_reception_items', null, {});
            
            
            await queryInterface.bulkDelete('stock_reservations', null, {});
            
            
            await queryInterface.bulkDelete('stock_movements', null, {});
            
            
            await queryInterface.bulkDelete('inventory_counts', null, {});
            
            
            await queryInterface.bulkDelete('inventory_count_items', null, {});
            
            
            await queryInterface.bulkDelete('import_jobs', null, {});
            
            
            await queryInterface.bulkDelete('audit_logs', null, {});
            
        
    },
};