<?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(
    "759" => array(
        "receiptTemplate"     => array(
            1 => "template/461.html",
        ),
        "headerNota"          => array(),
        "fixedElements"       => array(
            1 => array(
                "nomer"     => "No.",
                "dtime"     => "Date",
                "oleh_nama" => "Otorisasi Oleh",
                "pihakName" => "Penyetor",
            ),
        ),
        "headerTables"        => array(
            //            "extern2_nama" => "customer",
            //            "produk_nama" => "product name",
            //            "produk_ord_hrg" => "price",
            //            "produk_ord_jml" => "jumlah",
            //            "sub_total" => "sub total",
        ),
        "receiptMainFields"   => array(
            //            "jenis_label" => "activity",
            "nomer" => "no.",
            "dtime" => "date",
        ),
        "receiptDetailFields" => array(
            1 => array(
                "nama" => "Nomer",
                "pihakName" => "kasir",

            ),
        ),
        "receiptSumFields"    => array(
            1 => array(
                //                "sisa" => "receivable amount",
                //                "creditAmount" => "paid using credit",
                //                "nilai_entry" => "paid using cash account",
                //                "nilai_bayar" => "total amount of payment",
                //                "new_sisa" => "remain receivable (from list)",
            ),
        ),
        "receiptNumFields"    => array(
            1 => array(//                "sisa" => "due remain",
            ),
        ),
        "receipNumFields"     => array(
            1 => array(//                "sisa" => "due remain",
            ),
        ),
        "reportSumFields"     => array(//            "customers_id" => "customers_nama",

        ),
        "printLocation"       => "Printing/viewReceiptReg/",
        "receiptInword"       => array(),
        //bagian detail settlement
        "settlementHeaderByTransaksi" => array(
            1 => array(
                "nomor" => "Nomer",
                "dtime" => "Date",
                "paymentMethod" => "Payment",
                "customerName" => "konsumen",
                "pihakName" => "Kasir",
                // "no_meja" => "Table",
            ),
        ),
        "settlementByTransaksi" => array(
            1 => array(
                "produk_kode" => "kode",
                "nama" => "produk",
                "harga" => "Harga",
                "qty" => "Qty",
                "subtotal" => "SubTotal",
            ),
        ),
        "summaryByTransaksi" => array(
            1 => array(
                "harga_nett2" => "Total",
                "diskon" => "Diskon",
                // "pajak_total" => "Taxes",
                "grand_total" => "Grand Total",
                "bayar" => "Uang Diterima",
                "kembali" => "Kembalian",
            ),
        ),
        "labelByTransaksi" => array(
            1 => "By Transaksi",
        ),
        "settlementByMenu" => array(
            1 => array(
                "kode" => "kode",
                "nama" => "produk",
                // "satuan" => "satuan",
                "qty" => "Qty",
                "subtotal" => "SubTotal",
            ),
        ),
        "labelByMenu" => array(
            1 => "Summary penjualan produk",
        ),
        "settlementByPayment" => array(
            1 => array(
                "metode_bayar_nama" => "Payment Method",
                "nilai" => "SubTotal",
            ),
        ),
        "labelByPayment" => array(
            1 => "Summary By Payment Method",
        ),
        "settlementByBahan" => array(
            1 => array(
                "kode" => "kode",
                "nama" => "Produk",
                "satuan" => "Satuan",
                "qty_stok" => "Stok awal",
                "qty" => "dijual",
                "qty_saldo" => "stok akhir",
                "qty_kekurangan" => "kekurangan",
            ),
        ),
        "labelByBahan" => array(
            1 => "Mutasi produk",
        ),
        "settlementTotal" => array(
            1 => array(
                "1" => "Bruto",
                "2" => "Diskon",
                "3" => "Netto",
                "4" => "Pajak",
                "5" => "Grand Total",
            ),
        ),
        "settlementProduk"=>array(
            "id"=>"produk_id",
            "kode"=>"kode",
            "nama"=>"produk_nama",
            "jml" =>"produk_qty",
        ),
    ),
    "758" => array(
        "receiptTemplate"     => array(
            1 => "template/461.html",
        ),
        "headerNota"          => array(),
        "fixedElements"       => array(
            1 => array(
                "nomer"     => "No.",
                "dtime"     => "Date",
                "oleh_nama" => "Otorisasi Oleh",
                "pihakName" => "Penyetor",
            ),
        ),
        "headerTables"        => array(
            //            "extern2_nama" => "customer",
            //            "produk_nama" => "product name",
            //            "produk_ord_hrg" => "price",
            //            "produk_ord_jml" => "jumlah",
            //            "sub_total" => "sub total",
        ),
        "receiptMainFields"   => array(
            //            "jenis_label" => "activity",
            "nomer" => "no.",
            "dtime" => "date",
        ),
        "receiptDetailFields" => array(
            1 => array(
                "nama" => "Nomer",
                "pihakName" => "kasir",

            ),
        ),
        "receiptSumFields"    => array(
            1 => array(
                //                "sisa" => "receivable amount",
                //                "creditAmount" => "paid using credit",
                //                "nilai_entry" => "paid using cash account",
                //                "nilai_bayar" => "total amount of payment",
                //                "new_sisa" => "remain receivable (from list)",
            ),
        ),
        "receiptNumFields"    => array(
            1 => array(//                "sisa" => "due remain",
            ),
        ),
        "receipNumFields"     => array(
            1 => array(//                "sisa" => "due remain",
            ),
        ),
        "reportSumFields"     => array(//            "customers_id" => "customers_nama",

        ),
        "printLocation"       => "Printing/viewReceiptReg/",
        "receiptInword"       => array(),
        //bagian detail settlement
        "settlementHeaderByTransaksi" => array(
            1 => array(
                "nomor" => "Nomer",
                "datetime" => "Date",
                "metode_bayar_nama" => "Payment",
                "pihakName" => "Kasir",
                // "no_meja" => "Table",
            ),
        ),
        "settlementByTransaksi" => array(
            1 => array(
                "produk_kode" => "kode",
                "produk_nama" => "produk",
                "produk_harga" => "Harga",
                "produk_qty" => "Qty",
                "produk_subtotal" => "SubTotal",
            ),
        ),
        "summaryByTransaksi" => array(
            1 => array(
                "grand_total" => "Total",
                "diskon_total" => "Diskon",
                "pajak_total" => "Taxes",
                "validGrandTotal" => "Grand Total",
                "bayar_total" => "Uang Diterima",
                "kembalian" => "Kembalian",
            ),
        ),
        "labelByTransaksi" => array(
            1 => "By Transaksi",
        ),
        "settlementByMenu" => array(
            1 => array(
                "kode" => "kode",
                "nama" => "produk",
                // "satuan" => "satuan",
                "qty" => "Qty",
                "subtotal" => "SubTotal",
            ),
        ),
        "labelByMenu" => array(
            1 => "Summary penjualan produk",
        ),
        "settlementByPayment" => array(
            1 => array(
                "metode_bayar_nama" => "Payment Method",
                "nilai" => "SubTotal",
            ),
        ),
        "labelByPayment" => array(
            1 => "Summary By Payment Method",
        ),
        "settlementByBahan" => array(
            1 => array(
                "kode" => "kode",
                "nama" => "Produk",
                "satuan" => "Satuan",
                "qty_stok" => "Stok awal",
                "qty" => "dijual",
                "qty_saldo" => "stok akhir",
                "qty_kekurangan" => "kekurangan",
            ),
        ),
        "labelByBahan" => array(
            1 => "Mutasi produk",
        ),
        "settlementTotal" => array(
            1 => array(
                "1" => "Bruto",
                "2" => "Diskon",
                "3" => "Netto",
                "4" => "Pajak",
                "5" => "Grand Total",
            ),
        ),
        "settlementProduk"=>array(
            "id"=>"produk_id",
            "kode"=>"kode",
            "nama"=>"produk_nama",
            "jml" =>"produk_qty",
        ),
    ),
);

$config["receiptGlobal_config"] = array(
    "companyProfile"    =>
        "<h1 style='text-transform: uppercase;'>{companyProfile_alias}</h1>
      {companyProfile_alamat}<br> 
      {companyProfile_kelurahan} {companyProfile_kecamatan} {companyProfile_kabupaten} {companyProfile_propinsi}<br>
      Telp: {companyProfile_tlp_2}<br>
      NPWP***: {companyProfile_npwp}",
    "companyProfilePos" =>
        "<h4 class='text-center text-bold' style='text-transform: uppercase;margin-bottom: 0;'>{companyProfile_alias}</h4>" .
        "<div class='font-size-0-7 text-center'>" .
        "{companyProfile_kelurahan} {companyProfile_kecamatan} {companyProfile_kabupaten} {companyProfile_propinsi}<br>" .
        "Telp: {companyProfile_tlp_2}<br>" .
        "NPWP: {companyProfile_npwp}" .
        "</div>",
);