Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel pdf generator

//get last record
$record = RecordModel::latest()->first();
$expNum = explode('-', $record->invoiceno);

//check first day in a year
if ( date('l',strtotime(date('Y-01-01'))) ){
    $nextInvoiceNumber = date('Y').'-0001';
} else {
    //increase 1 with last invoice number
    $nextInvoiceNumber = $expNum[0].'-'. $expNum[1]+1;
}


//now add into database $nextInvoiceNumber as a next number.
Comment

PREVIOUS NEXT
Code Example
Php :: how to upload images to sql database php PDO 
Php :: php script 
Php :: null php 
Php :: base64_decode 
Php :: laravel scope query 
Php :: laravel validate string 
Php :: laravel 
Php :: hide .php 
Php :: what does ? do in php 
Php :: laravel facade 
Php :: wordpress font awesome enque 
Php :: how to append one array to another array in php 
Php :: enable cors cakephp 
Php :: how to grab shortcode from custom post type 
Php :: unexpected end of file php 
Php :: dateinterval hh mm ss 
Php :: php login system 
Java :: java create window 
Java :: jenkins decrypt password script console 
Java :: spring boot call method after startup with repository 
Java :: java execution time 
Java :: java lambda foreach multiple statements 
Java :: javafx tableview remove all rows 
Java :: java get mouse coordinates 
Java :: how to install java on ubuntu 18.0.4 
Java :: max long 
Java :: The shrinker may have failed to optimize the Java bytecode. To disable the shrinker, pass the `--no-shrink` flag to this command. 
Java :: java selenium wait 
Java :: padding a string with 0 in java 
Java :: how to send file in request body rest assured 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =