D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
config.php
back
Copy
<?php error_reporting(0); date_default_timezone_set("Asia/Kolkata"); // $servername = "localhost"; // $username = "mwuljkys_invoice"; // $password = "HYJ5Yz2h~KHa"; // $dbname = "mwuljkys_invoice"; // $servername = "localhost"; // $username = "desigits_invoice"; // $password = "admin@123##"; // $dbname = "desigits_invoice"; // $conn = new mysqli($servername, $username, $password, $dbname); ?> <?php // $servername = "localhost"; // $username = "mwuljkys_invoice"; // $password = "HYJ5Yz2h~KHa"; // $dbname = "mwuljkys_invoice"; $servername = "localhost"; $username = "shubmkcj_urbane"; $password = "admin@123##"; $dbname = "shubmkcj_urbane"; $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } mysqli_set_charset($conn,'utf8'); /// $start_with=1; function create_slug_bill($string){ $slug = str_pad($string, 2, '0', STR_PAD_LEFT); return $slug; } //take static because of client wanted to change on feb not jan $get_c_year="2022"; // format UM/2022/01 $current_bill_Date = date('Y-m-d'); $current_bill_Date=date('Y-m-d', strtotime($current_bill_Date)); $contractDateBegin = date('Y-m-d', strtotime("$get_c_year-01-31")); //echo "<br>"; $newEndingDate = date("Y-m-d", strtotime(date("Y-m-d", strtotime($contractDateBegin)) . " + 1 year")); if (($current_bill_Date >= $contractDateBegin) && ($current_bill_Date <= $newEndingDate)){ $prefix_bill="UM/$get_c_year/"; }else{ $prefix_bill="UM/$get_c_year/"; } /* Every Year of If you wanted to change number of PI/Invoice/PO, You have to change in 3 pages like 1. config.php -> change variable value -> $get_c_year="2022"; on line no 50 2. insert-proforma.php -> $get_performa_ids=create_slug_bill($get_performa_ids+1); // $get_performa_ids=create_slug_bill(1); a) comment line no 16 b) uncomment line no 17 and create a proforma. c) after create new proforma then 1) comment line no 17 2) uncomment line no 16 3. create-purchase-order.php -> on line no 157 $get_performa_ids=create_slug_bill($get_performa_ids+1); // $get_performa_ids=create_slug_bill(1); same process line point 2 a) comment line no 157 b) uncomment line no 158 and create a Purchase Order. c) after creating new Purchase Order then 1) comment line no 158 2) uncomment line no 157 */ ?>