<?php

//region urusan tanggal-menanggal
date_default_timezone_set('asia/jakarta');
$date = new DateTime(date("Y-m-d")); // Y-m-d
$date->add(new DateInterval('P30D'));
//endregion

$config["coTransaksiLayout"] = array(
    "582" => array(
        "receiptTemplate" => array(
            1 => "template/582sr.html",
            2 => "template/582spd.html",
        ),
        "headerNota" => array(
            "customer" => array(
                "customers_nam" => "name",
                "alamat_1" => "address",
                "tlp_1" => "phone",
                "tlp_2" => "handphone",
                "fax" => "fax",
            ),
            "delivery addrress" => array(
                "dtime" => "date",
                "suppliers_nama" => "Supplier",
                "tlp_1" => "phone",
                "alamat_1" => "address",
                "dtime_jatuh_tempo" => "jatuh tempo",
                "pembayaran" => "payment method",
                "alias" => "attn",

            ),
            "purchase order" => array(
                "nomer" => "receipt no.",
                "currency" => "currency",
                "delivery_date" => "delivery date",
                "top" => "term of payment",
                "tos" => "term of shipment",
                "capacity" => "address",
            ),

        ),
        "fixedElements" => array(
            1 => array(
                "nomer" => "No",
                "dtime" => "Date",
                "oleh_name" => "",
                //                "customerDetails_alamat_1" => "Billing address",
                //                "top_nama" => "Term of Payment",
            ),
            2 => array(
                "nomer" => "No",
                "dtime" => "Date",
                //                "shippingDate_value" => "Consignment notesss",
                "nomer_top" => "SO No.",
                //                "tos_nama" => "Term of Shipment",
                "keterangan" => "Remark",
            ),

            //            3 => array(
            //                "nomer" => "No",
            //                "shippingDate_value" => "Delivery Date",
            //                "nomer_top" => "SO No.",
            //                "tos_nama" => "Term of Shipment",
            //                "keterangan" => "Remark",
            //                //                "top_nama" => "Term of Payment",
            //                //                "capacity_nama" => "Capacity",
            //                //                "dueDate_value" => "Due Date",
            //                //                "dtime" => "Date",
            //            ),
            //            4 => array(
            //                "nomer" => "No",
            //                "shippingDate_value" => "Delivery Date",
            //                "nomer_top" => "SO No.",
            //                "tos_nama" => "Term of Shipment",
            //                "keterangan" => "Remark",
            //                //                "top_nama" => "Term of Payment",
            //                //                "capacity_nama" => "Capacity",
            //                //                "dueDate_value" => "Due Date",
            //                //                "dtime" => "Date",
            //            ),
            //            5 => array(
            //                "nomer" => "INV No",
            //                "nomer_top" => "SO No.",
            //                "dtime" => "Date",
            //                "top_nama" => "Term of Payment",
            //                "dueDate_value" => "Due Date",
            //                //                "tos_nama" => "Term of Shipment",
            //                //                "capacity_nama" => "Capacity",
            //                //                "shippingDate_value" => "Delivery Date",
            //            ),
            //            6 => array(
            //                "nomer" => "No",
            //                "dtime" => "Date",
            //                "customerDetails_alamat_1" => "Billing address",
            //                "customerDetails_nama" => "PIC name",
            //                "customerDetails_tlp_1" => "Phone",
            //                "customerDetails_tlp_2" => "Handphone",
            //                "customerDetails_email" => "Email",
            //                "customerDetails_npwp" => "Tax ID/NPWP",
            //                "top_nama" => "Term of Payment",
            //                //                "tos_nama" => "Term of Shipment",
            //                //                "capacity_nama" => "Capacity",
            //                "dueDate_value" => "Due Date",
            //                "shippingDate_value" => "Delivery Date",
            //            ),
        ),
        "fixedSignatures" => array(
            1 => array(
                "customer" => array(
                    "label" => ".Confirmed and approved by",
                    "contents" => "customerDetails_nama",
                    //                "caption_department" => "",
                ),
            ),
            2 => array(
                "customer" => array(
                    "label" => ".Confirmed and received by",
                    "contents" => "customerDetails_nama",
                    //                "caption_department" => "",
                ),
            ),

        ),
        "headerTables" => array(
            "produk_nama" => "item name",
            "produk_ord_hrg" => "price",
            "produk_ord_jml" => "jumlah",
            "sub_total" => "sub total",
        ),
        "receiptMainFields" => array(
            "jenis_label" => "activity",
            "nomer" => "receipt no.",
            "customers_nama" => "customer",
            "dtime" => "date",
        ),
        "receiptDetailFields" => array(
            1 => array(
                //                "produk_nama+produk_ord_jml" => "item name",
                "produk_nama" => "item name",
                "produk_ord_jml" => "qty",
                "satuan" => "satuan",
            ),
            2 => array(
                "produk_nama" => "item name",
                "produk_ord_jml" => "qty",
                "satuan" => "satuan",
                //                "berat_gross" => "berat",
                //                "volume_gross" => "volume",
            ),

        ),
        "receiptSumFields" => array(
            1 => array(
                "harga_nett1" => "HARGA JUAL",
                "add_disc" => "DISKON TAMBAHAN",
                "creditAmount" => "CREDIT AMOUNT",
                "harga_nett3" => "TOTAL YANG HARUS DIBAYAR",
                "bayar" => "TUNAI",
                "kembali" => "KEMBALI",
                "disc" => "ANDA HEMAT"
            ),

        ),
        "receiptSumBottom" => array(
            "items" => "ITEM(s)",
            "units" => "UNIT(s)",
        ),
        "receiptNonTunai" => array(
            "pembayaran_sys" => "Metode Pembayaran",
            "card_number" => "Card Number",
            "card_name" => "Card Holder Name"
        ),
        "reportSumFields" => array(
            "customers_id" => "customers_nama",
        ),
        "printLocation" => "Printing/viewSmallReceipt/",
        "staticFooter" => array(
            3 => "GROSIR/I/LOG001/R00",
            5 => "GROSIR/I/FA005/R00",
        ),
        "allowPrint" => array(
            1 => array("size" => "small"),
            //            2 => array("size" => "normal"),
        ),
        "smallPrint" => array(
            1 => array(
                "dtime" => "date",
                "nomer" => "no nota",
                "oleh_nama" => "kasir",

            ),
        ),
        "headerTablesSmall" => array(
            "produk_nama" => "NAMA BARANG / KODE",
            "produk_ord_jml" => "QTY",
            "harga_nett1" => "H.SATUAN",
            //            "disc"           => "DISC",
            "subtotal" => "TOTAL",
        ),

        "reviewDetailCompactListsLabel" => array(
            "nama" => "Description",
            //            "produk_kode" => "part no",
            "qty" => "qty",
            "satuan" => "UOM",

            "harga" => "unit price",
            "subtotal" => "total price",

        ),
        "reviewMainCompactListsLabel" => array(
            "nomer" => "Nomer",
            "customerDetails__nama" => "name",
            "customerDetails__alamat_1" => "address",
            "customerDetails__tlp_1" => "phone",
            "customerDetails__tlp_2" => "handphone",
            "customerDetails__npwp" => "npwp",
        ),
        "reviewCompactListDetailSum" => array(
            "qty" => "qty",
            "*" => "-",
            "-" => "-",
            "harga" => "grand total",
        ),
        "reviewCompactListSum" => array(
            //            "harga" => "Total Amount",
            //            "ppn" => "VAT",
            //            "hpp_nppn" => "Grand Total",
            "harga_nett1" => "HARGA JUAL",
            "add_disc" => "DISKON TAMBAHAN",
            "creditAmount" => "CREDIT AMOUNT",
            "harga_nett3" => "TOTAL YANG HARUS DIBAYAR",
            "bayar" => "TUNAI",
            "kembali" => "KEMBALI",
            "disc" => "ANDA HEMAT"
        ),
        "reviewAddRows" => array(
            //            "top__nama" => "pembayaran",
            //            "dp" => "downpayment",
            //            "paymentMethod" => "paymentMethod",
        ),
        "reviewSign" => array(
            1 => array(
                "sign_1",
            ),
            2 => array(
                "sign_1",
                "sign_2",
            ),
        ),
    ),
    "982" => array(
        "receiptTemplate" => array(
            1 => "template/982r.html",
            2 => "template/982.html",
        ),
        "headerNota" => array(
            "customer" => array(
                "customers_nam" => "name",
                "alamat_1" => "address",
                "tlp_1" => "phone",
                "tlp_2" => "handphone",
                "fax" => "fax",
            ),
            "purchase order" => array(
                "nomer" => "receipt no.",
                "currency" => "currency",
                "delivery_date" => "delivery date",
                "top" => "term of payment",
                "tos" => "term of shipment",
                "capacity" => "address",
            ),
        ),
        "fixedElements" => array(
            1 => array(
                "nomer" => "No",
                "dtime" => "Date",
                //                "shippingDate_value" => "Delivery Date",
                "top_nama" => "Term of Payment",
                //                "tos_nama" => "Term of Shipment",
                //                "capacity_nama" => "Capacity",
                //                "dueDate_value" => "Due Date",
            ),
            2 => array(
                "nomer" => "RET No",
                "nomer_top" => "INV No.",
                "dtime" => "Date",
                //                "shippingDate_value" => "Delivery Date",
                "top_nama" => "Term of Payment",
                //                "tos_nama" => "Term of Shipment",
                //                "capacity_nama" => "Capacity",
                "dueDate_value" => "Due Date",
            ),
        ),
        "fixedSignatures" => array(
            1 => array(
                "customer" => array(
                    "label" => ".Confirmed and approved by",
                    "contents" => "customerDetails_nama",
                    //                "caption_department" => "",
                ),
            ),
            2 => array(
                "customer" => array(
                    "label" => ".Confirmed and approved by",
                    "contents" => "customerDetails_nama",
                    //                "caption_department" => "",
                ),
            ),
        ),
        "headerTables" => array(
            "produk_nama" => "item name",
            "produk_ord_hrg" => "price",
            "produk_ord_jml" => "jumlah",
            "sub_total" => "sub total",
        ),
        "receiptMainFields" => array(
            "jenis_label" => "activity",
            "nomer" => "receipt no.",
            "customers_nama" => "customer",
            "dtime" => "date",
        ),
        "receiptDetailFields" => array(
            1 => array(
                "produk_nama" => "item name",
                "produk_ord_jml" => "qty",
                "satuan" => "satuan",
                //                "jual_nppn" => "price",
                //            "ppn" => "ppn",
                //                "subtotal" => "subtotal",
            ),
            2 => array(
                "produk_nama" => "item name",
                "produk_ord_jml" => "qty",
                "satuan" => "satuan",
                //                "jual_nppn" => "price",
                //            "ppn" => "ppn",
                //                "subtotal" => "subtotal",
            ),
        ),
        "receiptSumFields" => array(
            1 => array(
                //                "harga" => "amount",
                //                "disc" => "discount",
                //                "ppn" => "vat",
                "harga_nett2" => "total",
                "add_disc" => "additional disc",
                "harga_nett3" => "grand total",
            ),
            2 => array(
                //                "harga" => "amount",
                //                "ppn" => "vat",
                "harga_nett2" => "total",
                "add_disc" => "additional disc",
                "harga_nett3" => "grand total",
            ),

        ),
        "reportSumFields" => array(
            "customers_id" => "customers_nama",

        ),
        //        "printLocation" => "Transaksi/viewReceipt/",
        "printLocation" => "Printing/viewSmallReceipt/",
        "allowPrint" => array(
            1 => array("size" => "small"),
            2 => array("size" => "small"),
        ),
        "smallPrint" => array(
            1 => array(
                "dtime" => "date",
                "nomer" => "no nota",
                "oleh_nama" => "kasir",
            ),
        ),
        "headerTablesSmall" => array(
            "produk_nama" => "NAMA BARANG / KODE",
            "produk_ord_jml" => "QTY",
            "harga_nett1" => "H.SATUAN",
            //            "disc"           => "DISC",
            "subtotal" => "TOTAL",
        ),
    ),
);