Invoice report
This commit is contained in:
+24
-7
@@ -31,17 +31,34 @@ $( function () {
|
||||
};
|
||||
} );
|
||||
|
||||
function uploadFile(file, foreignID, tablename, callback){
|
||||
function uploadFile( file, foreignID, tablename, callback ) {
|
||||
var url = 'index.php/utils/fileUpload/upload/' + foreignID + '/' + tablename;
|
||||
var xhr = new XMLHttpRequest();
|
||||
var fd = new FormData();
|
||||
xhr.open("POST", url, true);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
xhr.open( "POST", url, true );
|
||||
xhr.onreadystatechange = function () {
|
||||
if ( xhr.readyState == 4 && xhr.status == 200 ) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
fd.append("userfile", file);
|
||||
fd.append( "userfile", file );
|
||||
|
||||
xhr.send( fd );
|
||||
}
|
||||
|
||||
dbo.monthLabels = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'];
|
||||
|
||||
dbo.currentMonth = (new Date()).getMonth();
|
||||
dbo.monthArray = [];
|
||||
for ( var I = 0; I < 12; I++ ) {
|
||||
dbo.monthArray.push( {monthID: I, month: dbo.monthLabels[I]} );
|
||||
}
|
||||
|
||||
dbo.currentYear = (new Date()).getFullYear();
|
||||
dbo.years = []
|
||||
for ( var I = (dbo.currentYear - 2); I <= dbo.currentYear + 2; I++ ) {
|
||||
dbo.years.push( {year: I} );
|
||||
}
|
||||
|
||||
|
||||
|
||||
xhr.send(fd);
|
||||
}
|
||||
Reference in New Issue
Block a user