/* Decoded by unphp.net */ format("Y-m-d H:i:s"); $c3 = base64_decode(isset($b["status_order"]) ? $b["status_order"] : null); $c4 = base64_decode(isset($b["status_produk"]) ? $b["status_produk"] : null); $c5 = base64_decode(isset($b["id_pelanggan"]) ? $b["id_pelanggan"] : null); $c6 = base64_decode(isset($b["id_istributor"]) ? $b["id_istributor"] : null); $c7 = base64_decode(isset($b["id_principal"]) ? $b["id_principal"] : null); $c8 = base64_decode(isset($b["semua_id"]) ? $b["semua_id"] : null); $c9 = base64_decode(isset($b["no_nasional"]) ? $b["no_nasional"] : null); $c10 = base64_decode(isset($b["idh_id"]) ? $b["idh_id"] : null); $c11 = base64_decode(isset($b["nama_pelanggan"]) ? $b["nama_pelanggan"] : null); $c12 = base64_decode(isset($b["alamat_pelanggan"]) ? $b["alamat_pelanggan"] : null); $c13 = base64_decode(isset($b["kelurahan_pelanggan"]) ? $b["kelurahan_pelanggan"] : null); $c14 = base64_decode(isset($b["kecamatan_pelanggan"]) ? $b["kecamatan_pelanggan"] : null); $c15 = base64_decode(isset($b["kotakab_pelanggan"]) ? $b["kotakab_pelanggan"] : null); $c16 = base64_decode(isset($b["propinsi_pelanggan"]) ? $b["propinsi_pelanggan"] : null); $c17 = base64_decode(isset($b["hp_pelanggan"]) ? $b["hp_pelanggan"] : null); $c18 = base64_decode(isset($b["hp_terverifikasi"]) ? $b["hp_terverifikasi"] : null); $c19 = base64_decode(isset($b["email_pelanggan"]) ? $b["email_pelanggan"] : null); $c20 = base64_decode(isset($b["tipe_identitas_pelanggan"]) ? $b["tipe_identitas_pelanggan"] : null); $c21 = base64_decode(isset($b["nomor_identitas_pelanggan"]) ? $b["nomor_identitas_pelanggan"] : null); $c22 = base64_decode(isset($b["nama_penerima"]) ? $b["nama_penerima"] : null); $c23 = base64_decode(isset($b["alamat_penerima"]) ? $b["alamat_penerima"] : null); $c24 = base64_decode(isset($b["kelurahan_penerima"]) ? $b["kelurahan_penerima"] : null); $c25 = base64_decode(isset($b["kecamatan_penerima"]) ? $b["kecamatan_penerima"] : null); $c26 = base64_decode(isset($b["kotakab_penerima"]) ? $b["kotakab_penerima"] : null); $c27 = base64_decode(isset($b["propinsi_penerima"]) ? $b["propinsi_penerima"] : null); $c28 = base64_decode(isset($b["hp_penerima"]) ? $b["hp_penerima"] : null); $c29 = base64_decode(isset($b["email_penerima"]) ? $b["email_penerima"] : null); $c30 = base64_decode(isset($b["kode_salesman"]) ? $b["kode_salesman"] : null); $c31 = base64_decode(isset($b["nama_salesman"]) ? $b["nama_salesman"] : null); $c32 = base64_decode(isset($b["principal"]) ? $b["principal"] : null); $c33 = base64_decode(isset($b["kategori"]) ? $b["kategori"] : null); $c34 = base64_decode(isset($b["kode_barang"]) ? $b["kode_barang"] : null); $c35 = base64_decode(isset($b["nama_barang"]) ? $b["nama_barang"] : null); $c36 = base64_decode(isset($b["qty"]) ? $b["qty"] : null); $c37 = base64_decode(isset($b["qty_x"]) ? $b["qty_x"] : null); $c38 = base64_decode(isset($b["harga"]) ? $b["harga"] : null); $c39 = base64_decode(isset($b["sub_total"]) ? $b["sub_total"] : null); $c40 = base64_decode(isset($b["discount_1"]) ? $b["discount_1"] : null); $c41 = base64_decode(isset($b["discount_2"]) ? $b["discount_2"] : null); $c42 = base64_decode(isset($b["discount_3"]) ? $b["discount_3"] : null); $c43 = base64_decode(isset($b["discount_4"]) ? $b["discount_4"] : null); $c44 = base64_decode(isset($b["discount_5"]) ? $b["discount_5"] : null); $c45 = base64_decode(isset($b["nilai_1"]) ? $b["nilai_1"] : null); $c46 = base64_decode(isset($b["nilai_2"]) ? $b["nilai_2"] : null); $c47 = base64_decode(isset($b["nilai_3"]) ? $b["nilai_3"] : null); $c48 = base64_decode(isset($b["nilai_4"]) ? $b["nilai_4"] : null); $c49 = base64_decode(isset($b["nilai_5"]) ? $b["nilai_5"] : null); $c50 = base64_decode(isset($b["total"]) ? $b["total"] : null); $c51 = base64_decode(isset($b["titik_kirim"]) ? $b["titik_kirim"] : null); $c52 = base64_decode(isset($b["catatan_order"]) ? $b["catatan_order"] : null); $c53 = base64_decode(isset($b["checkout_salesman"]) ? $b["checkout_salesman"] : null); $c54 = base64_decode(isset($b["independency"]) ? $b["independency"] : null); $c55 = base64_decode(isset($b["tags_pelanggan"]) ? $b["tags_pelanggan"] : null); $c56 = base64_decode(isset($b["promocode_deduction_1"]) ? $b["promocode_deduction_1"] : null); $c57 = base64_decode(isset($b["promocode_deduction_2"]) ? $b["promocode_deduction_2"] : null); $c58 = base64_decode(isset($b["promocode_deduction_3"]) ? $b["promocode_deduction_3"] : null); $c59 = base64_decode(isset($b["promocode_token_1"]) ? $b["promocode_token_1"] : null); $c60 = base64_decode(isset($b["promocode_token_2"]) ? $b["promocode_token_2"] : null); $c61 = base64_decode(isset($b["promocode_token_3"]) ? $b["promocode_token_3"] : null); $c62 = base64_decode(isset($b["promocode_status_1"]) ? $b["promocode_status_1"] : null); $c63 = base64_decode(isset($b["promocode_status_2"]) ? $b["promocode_status_2"] : null); $c64 = base64_decode(isset($b["promocode_status_3"]) ? $b["promocode_status_3"] : null); $c65 = base64_decode(isset($b["store_promocode_confirmation_1"]) ? $b["store_promocode_confirmation_1"] : null); $c66 = base64_decode(isset($b["store_promocode_confirmation_2"]) ? $b["store_promocode_confirmation_2"] : null); $c67 = base64_decode(isset($b["store_promocode_confirmation_3"]) ? $b["store_promocode_confirmation_3"] : null); $c68 = base64_decode(isset($b["promo_point"]) ? $b["promo_point"] : null); if (empty($c1) || empty($c2)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxidh")->upsert(array(array("idhtrx" => $c0, "iddbdms" => '', "idhpo" => $c1, "tgl_order" => $c2, "status_order" => $c3, "status_produk" => $c4, "id_pelanggan" => $c5, "id_istributor" => $c6, "id_principal" => $c7, "semua_id" => $c8, "no_nasional" => $c9, "idh_id" => $c10, "nama_pelanggan" => $c11, "alamat_pelanggan" => $c12, "kelurahan_pelanggan" => $c13, "kecamatan_pelanggan" => $c14, "kotakab_pelanggan" => $c15, "propinsi_pelanggan" => $c16, "hp_pelanggan" => $c17, "hp_terverifikasi" => $c18, "email_pelanggan" => $c19, "tipe_identitas_pelanggan" => $c20, "nomor_identitas_pelanggan" => $c21, "nama_penerima" => $c22, "alamat_penerima" => $c23, "kelurahan_penerima" => $c24, "kecamatan_penerima" => $c25, "kotakab_penerima" => $c26, "propinsi_penerima" => $c27, "hp_penerima" => $c28, "email_penerima" => $c29, "kode_salesman" => $c30, "nama_salesman" => $c31, "principal" => $c32, "kategori" => $c33, "kode_barang" => $c34, "nama_barang" => $c35, "qty" => $c36, "qty_x" => $c37, "harga" => $c38, "sub_total" => $c39, "discount_1" => $c40, "discount_2" => $c41, "discount_3" => $c42, "discount_4" => $c43, "discount_5" => $c44, "nilai_1" => $c45, "nilai_2" => $c46, "nilai_3" => $c47, "nilai_4" => $c48, "nilai_5" => $c49, "total" => $c50, "titik_kirim" => $c51, "catatan_order" => $c52, "checkout_salesman" => $c53, "independency" => $c54, "tags_pelanggan" => $c55, "promocode_deduction_1" => $c56, "promocode_deduction_2" => $c57, "promocode_deduction_3" => $c58, "promocode_token_1" => $c59, "promocode_token_2" => $c60, "promocode_token_3" => $c61, "promocode_status_1" => $c62, "promocode_status_2" => $c63, "promocode_status_3" => $c64, "store_promocode_confirmation_1" => $c65, "store_promocode_confirmation_2" => $c66, "store_promocode_confirmation_3" => $c67, "promo_point" => $c68)), array("idhpo" => $c1, "id_pelanggan" => $c5, "id_istributor" => $c6, "id_principal" => $c7, "kode_salesman" => $c30, "nama_salesman" => $c31, "principal" => $c32, "checkout_salesman" => $c53, "independency" => $c54)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully added !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "TRUE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function up_scyllatrx($a) { $b = json_decode(str_replace("\", '', trim(preg_replace("/\s\s+/", '', $a))), true); $c0 = base64_decode(isset($b["uiddms"]) ? $b["uiddms"] : null); $c1 = base64_decode(isset($b["iddbdms"]) ? $b["iddbdms"] : null); $c2 = base64_decode(isset($b["orderno"]) ? $b["orderno"] : null); $c3 = base64_decode(isset($b["tglorder"]) ? $b["tglorder"] : null); $c4 = base64_decode(isset($b["slsno"]) ? $b["slsno"] : null); $c5 = base64_decode(isset($b["slsname"]) ? $b["slsname"] : null); $c6 = base64_decode(isset($b["custno"]) ? $b["custno"] : null); $c7 = base64_decode(isset($b["custname"]) ? $b["custname"] : null); $c8 = base64_decode(isset($b["alamat"]) ? $b["alamat"] : null); $c9 = base64_decode(isset($b["tglfaktur"]) ? $b["tglfaktur"] : null); $c10 = base64_decode(isset($b["invno"]) ? $b["invno"] : null); $c11 = base64_decode(isset($b["pcode"]) ? $b["pcode"] : null); $c12 = base64_decode(isset($b["pcodename"]) ? $b["pcodename"] : null); $c13 = base64_decode(isset($b["hargasatuan"]) ? $b["hargasatuan"] : null); $c14 = base64_decode(isset($b["proline"]) ? $b["proline"] : null); $c15 = base64_decode(isset($b["principal"]) ? $b["principal"] : null); $c16 = base64_decode(isset($b["supplier"]) ? $b["supplier"] : null); $c17 = base64_decode(isset($b["unit3"]) ? $b["unit3"] : null); $c18 = base64_decode(isset($b["convunit3"]) ? $b["convunit3"] : null); $c19 = base64_decode(isset($b["unit2"]) ? $b["unit2"] : null); $c20 = base64_decode(isset($b["convunit2"]) ? $b["convunit2"] : null); $c21 = base64_decode(isset($b["unit1"]) ? $b["unit1"] : null); $c22 = base64_decode(isset($b["pcs"]) ? $b["pcs"] : null); $c23 = base64_decode(isset($b["freegood"]) ? $b["freegood"] : null); $c24 = base64_decode(isset($b["jmlrupiah"]) ? $b["jmlrupiah"] : null); $c25 = base64_decode(isset($b["disc_promo"]) ? $b["disc_promo"] : null); $c26 = base64_decode(isset($b["persen_discount"]) ? $b["persen_discount"] : null); $c27 = base64_decode(isset($b["total_rupiah"]) ? $b["total_rupiah"] : null); $c28 = base64_decode(isset($b["dectax"]) ? $b["dectax"] : null); $c29 = base64_decode(isset($b["rp_netto"]) ? $b["rp_netto"] : null); if (empty($c0) || empty($c1) || empty($c2) || empty($c3) || empty($c4) || empty($c6) || empty($c11)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxdms")->upsert(array(array("uiddms" => $c0, "iddbdms" => $c1, "orderno" => $c2, "tglorder" => $c3, "slsno" => $c4, "slsname" => $c5, "custno" => $c6, "custname" => $c7, "alamat" => $c8, "tglfaktur" => $c9, "invno" => $c10, "pcode" => $c11, "pcodename" => $c12, "hargasatuan" => $c13, "proline" => $c14, "principal" => $c15, "supplier" => $c16, "unit3" => $c17, "convunit3" => $c18, "unit2" => $c19, "convunit2" => $c20, "unit1" => $c21, "pcs" => $c22, "freegood" => $c23, "jmlrupiah" => $c24, "disc_promo" => $c25, "persen_discount" => $c26, "total_rupiah" => $c27, "dectax" => $c28, "rp_netto" => $c29)), array("tglfaktur" => $c9, "invno" => $c10, "pcs" => $c22, "freegood" => $c23, "jmlrupiah" => $c24, "disc_promo" => $c25, "persen_discount" => $c26, "total_rupiah" => $c27, "dectax" => $c28, "rp_netto" => $c29)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully added !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "FALSE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function up_nd6trxorder($a) { $b = json_decode(str_replace("\", '', trim(preg_replace("/\s\s+/", '', $a))), true); $c0 = base64_decode(isset($b["uiddms"]) ? $b["uiddms"] : null); $c1 = base64_decode(isset($b["iddbdms"]) ? $b["iddbdms"] : null); $c2 = base64_decode(isset($b["orderno"]) ? $b["orderno"] : null); $c3 = base64_decode(isset($b["tglorder"]) ? $b["tglorder"] : null); $c4 = base64_decode(isset($b["slsno"]) ? $b["slsno"] : null); $c5 = base64_decode(isset($b["custno"]) ? $b["custno"] : null); $c6 = base64_decode(isset($b["tglfaktur"]) ? $b["tglfaktur"] : null); $c7 = base64_decode(isset($b["invno"]) ? $b["invno"] : null); $c8 = base64_decode(isset($b["pcode"]) ? $b["pcode"] : null); $c9 = base64_decode(isset($b["pcs"]) ? $b["pcs"] : null); $c10 = base64_decode(isset($b["freegood"]) ? $b["freegood"] : null); if (empty($c0) || empty($c1) || empty($c2) || empty($c3) || empty($c4) || empty($c5) || empty($c8)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxdms")->upsert(array(array("uiddms" => $c0, "iddbdms" => $c1, "orderno" => $c2, "tglorder" => $c3, "slsno" => $c4, "custno" => $c5, "tglfaktur" => $c6, "invno" => $c7, "pcode" => $c8, "pcs" => $c9, "freegood" => $c10)), array("tglfaktur" => $c6, "invno" => $c7, "pcs" => $c9, "freegood" => $c10)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully added !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "FALSE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function up_nd6trxsales($a) { $b = json_decode(str_replace("\", '', trim(preg_replace("/\s\s+/", '', $a))), true); $c0 = base64_decode(isset($b["uiddms"]) ? $b["uiddms"] : null); $c1 = base64_decode(isset($b["iddbdms"]) ? $b["iddbdms"] : null); $c2 = base64_decode(isset($b["tglfaktur"]) ? $b["tglfaktur"] : null); $c3 = base64_decode(isset($b["invno"]) ? $b["invno"] : null); $c4 = base64_decode(isset($b["pcode"]) ? $b["pcode"] : null); $c5 = base64_decode(isset($b["pcs"]) ? $b["pcs"] : null); $c6 = base64_decode(isset($b["freegood"]) ? $b["freegood"] : null); $c7 = base64_decode(isset($b["jmlrupiah"]) ? $b["jmlrupiah"] : null); $c8 = base64_decode(isset($b["disc_promo"]) ? $b["disc_promo"] : null); $c9 = base64_decode(isset($b["persen_discount"]) ? $b["persen_discount"] : null); $c10 = base64_decode(isset($b["total_rupiah"]) ? $b["total_rupiah"] : null); $c11 = base64_decode(isset($b["dectax"]) ? $b["dectax"] : null); $c12 = base64_decode(isset($b["rp_netto"]) ? $b["rp_netto"] : null); if (empty($c0) || empty($c1) || empty($c2) || empty($c3) || empty($c4)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxdms")->where("uiddms", $c0)->update(array("tglfaktur" => $c2, "invno" => $c3, "pcode" => $c4, "pcs" => $c5, "freegood" => $c6, "jmlrupiah" => $c7, "disc_promo" => $c8, "persen_discount" => $c9, "total_rupiah" => $c10, "dectax" => $c11, "rp_netto" => $c12)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function up_nd6trxcustomer($a) { $b = json_decode(str_replace("\", '', trim(preg_replace("/\s\s+/", '', $a))), true); $c0 = base64_decode(isset($b["iddbdms"]) ? $b["iddbdms"] : null); $c1 = base64_decode(isset($b["custno"]) ? $b["custno"] : null); $c2 = base64_decode(isset($b["custname"]) ? $b["custname"] : null); $c3 = base64_decode(isset($b["alamat"]) ? $b["alamat"] : null); if (empty($c0) || empty($c1) || empty($c2)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxdms")->where("iddbdms", $c0)->where("custno", $c1)->update(array("custname" => $c2, "alamat" => $c3)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function up_nd6trxsku($a) { $b = json_decode(str_replace("\", '', trim(preg_replace("/\s\s+/", '', $a))), true); $c0 = base64_decode(isset($b["iddbdms"]) ? $b["iddbdms"] : null); $c1 = base64_decode(isset($b["pcode"]) ? $b["pcode"] : null); $c2 = base64_decode(isset($b["pcodename"]) ? $b["pcodename"] : null); $c3 = base64_decode(isset($b["hargasatuan"]) ? $b["hargasatuan"] : null); $c4 = base64_decode(isset($b["unit3"]) ? $b["unit3"] : null); $c5 = base64_decode(isset($b["convunit3"]) ? $b["convunit3"] : null); $c6 = base64_decode(isset($b["unit2"]) ? $b["unit2"] : null); $c7 = base64_decode(isset($b["convunit2"]) ? $b["convunit2"] : null); $c8 = base64_decode(isset($b["unit1"]) ? $b["unit1"] : null); if (empty($c0) || empty($c1) || empty($c2) || empty($c3) || empty($c4) || empty($c5) || empty($c6) || empty($c7) || empty($c8)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxdms")->where("iddbdms", $c0)->where("pcode", $c1)->update(array("pcodename" => $c2, "hargasatuan" => $c3, "unit3" => $c4, "convunit3" => $c5, "unit2" => $c6, "convunit2" => $c7, "unit1" => $c8)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function up_nd6trxsls($a) { $b = json_decode(str_replace("\", '', trim(preg_replace("/\s\s+/", '', $a))), true); $c0 = base64_decode(isset($b["iddbdms"]) ? $b["iddbdms"] : null); $c1 = base64_decode(isset($b["slsno"]) ? $b["slsno"] : null); $c2 = base64_decode(isset($b["slsname"]) ? $b["slsname"] : null); if (empty($c0) || empty($c1) || empty($c2)) { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "500")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { $d = DB::connection("myidh")->table("trxdms")->where("iddbdms", $c0)->where("slsno", $c1)->update(array("slsname" => $c2)); if ($d) { return response()->json(array("error" => "FALSE", "error_msg" => "successfully update !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("error" => "TRUE", "error_msg" => "Failed !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "400")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } public static function pekok_response($data, $a) { if ($data == "cdn-01") { return response()->json(array("error" => "TRUE", "error_msg" => "Invalid Request", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-02") { return response()->json(array("error" => "TRUE", "error_msg" => "Invalid Content Type", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-03") { return response()->json(array("error" => "TRUE", "error_msg" => "Invalid AUTHORIZATION", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-04") { return response()->json(array("error" => "TRUE", "error_msg" => "Invalid Token", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-05") { return response()->json(array("error" => "TRUE", "error_msg" => "Invalid SIGNATURE", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-06") { return response()->json(array("error" => "TRUE", "error_msg" => "Login credentials are wrong. Please try again !", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-07") { return response()->json(array("error" => "TRUE", "error_msg" => "Invalid Token ! " . " " . $a, "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-08") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " salesman data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-09") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " sku data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-10") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " customer data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-11") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " skudefine data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-12") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " customerdefine data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-13") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " skustock data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-14") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " produsen data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-15") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " sales data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-16") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " salesdetail data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-17") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " salesdetailpromo data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-18") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " pay data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-19") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " paydetail data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-20") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " receive data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-21") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " receivedetail data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-22") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " receivedetail data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-23") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " getvabca data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } elseif ($data == "cdn-24") { return response()->json(array("error" => "FALSE", "error_msg" => $a . " upvabca data have been updated!", "datetime" => Carbon::createFromFormat("Y-m-d H:i:s", Carbon::now("Asia/Jakarta"))), "200")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } else { return response()->json(array("responseCode" => "5047300", "responseMessage" => "Timeout"), "401")->setEncodingOptions(JSON_UNESCAPED_SLASHES); } } } ?>