NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Ext.onReady(function () {
var edit = Ext.create('Ext.window.Window', {
title: 'Edit',
layout: 'fit',
closeAction: 'hide',
height: 200,
width: 400,
items:[{
xtype: 'form',
style:'padding-top:10px',
items: [{
xtype: 'textfield',
fieldLabel: 'JobId',
style:'margin-left:30px'
},{
xtype: 'textfield',
fieldLabel: 'Ship To',
style:'margin-left:30px'
}],
bbar: [{
xtype: 'container',
style:'padding-bottom:10px',
layout: 'hbox',

items: [{
xtype: 'button',
text:'save',
style:'margin-left:100px'
}, {
xtype: 'button',
text:'cancel',
style:'margin-left:50px',
handler: function(){this.up('window').close();},

}],
autoShow:true,
}]
}],
listeners:{
rowclick: function(grid,idx){
Ext.getCmp('btnHold').enable();
}
}
});

Ext.create('Ext.data.Store', {
storeId: 'Allinvoices',
pageSize: 20,
autoLoad:true,
enablePaging: true,
proxy: {
type: 'ajax',
url:'DbRead',
actionMethods :{
read: 'GET'},
extraParams: {
invoicetype: 'all'
},
reader:{
type: 'json',
rootProperty:'rows',
totalProperty: 'results',
successProperty: 'success'
}
},
fields:['id','accountId','documentNumberNorm','companyCode','fiscalYear','branch','customerNumberNorm','fkCustomerMapId','documentDateNorm','baselineDateNorm','dueDateNorm','invoiceNumberNorm','openAmountNorm','paymentTerms','clearingDateNorm','isOpen','orderType','orderDate','businessArea','shipDate','jobId','taxAmt','currentDisputAmount','shipTo','documentId','documentDate','actualOpenAmount','dueDate','invoiceAge','isvalidDispute','retainageAmount','postingKey','strategyId','currency','debitCreditIndicator','validOpenAmount','customerName'],
});
Ext.create('Ext.data.Store', {
storeId: 'Openinvoices',
pageSize: 20,
autoLoad:true,
enablePaging: true,
proxy: {
type: 'ajax',
url:'DbRead',
actionMethods :{
read: 'GET'},
extraParams: {
invoicetype: 'open'
},
reader:{
type: 'json',
rootProperty:'rows',
totalProperty: 'results',
successProperty: 'success'
}
},
fields:['id','accountId','documentNumberNorm','companyCode','fiscalYear','branch','customerNumberNorm','fkCustomerMapId','documentDateNorm','baselineDateNorm','dueDateNorm','invoiceNumberNorm','openAmountNorm','paymentTerms','clearingDateNorm','isOpen','orderType','orderDate','businessArea','shipDate','jobId','taxAmt','currentDisputAmount','shipTo','documentId','documentDate','actualOpenAmount','dueDate','invoiceAge','isvalidDispute','retainageAmount','postingKey','strategyId','currency','debitCreditIndicator','validOpenAmount','customerName']
});
Ext.create('Ext.data.Store', {
storeId: 'Closeinvoices',
pageSize: 20,
autoLoad:true,
enablePaging: true,
proxy: {
type: 'ajax',
url:'DbRead',
actionMethods :{
read: 'GET'},
extraParams: {
invoicetype: 'close'
},
reader:{
type: 'json',
rootProperty:'rows',
totalProperty: 'results',
successProperty: 'success'
}
},
fields:['id','accountId','documentNumberNorm','companyCode','fiscalYear','branch','customerNumberNorm','fkCustomerMapId','documentDateNorm','baselineDateNorm','dueDateNorm','invoiceNumberNorm','openAmountNorm','paymentTerms','clearingDateNorm','isOpen','orderType','orderDate','businessArea','shipDate','jobId','taxAmt','currentDisputAmount','shipTo','documentId','documentDate','actualOpenAmount','dueDate','invoiceAge','isvalidDispute','retainageAmount','postingKey','strategyId','currency','debitCreditIndicator','validOpenAmount','customerName']
});
var grid1=Ext.create('Ext.grid.Panel', {
itemId: 'all_invoices_grid_panel',
dockedItems : [ {
xtype : 'toolbar',
dock : 'top',
itemId : 'allInvoicesToolbar',
items : [ {
xtype : 'button',
text : 'Edit',
itemId : 'allInvoicesEditButton',
listeners: {
click: function () {
edit.show()
}
}
}, {
xtype : 'button',
text : 'Predict',
itemId : 'allInvoicesPredictButton',
listeners: {
click: function () {

}
},
handler : function() {
alert('You clicked the predit button!');
}
}, '->',
{
xtype : 'button',
itemId : 'allInvoicesAdvancesearchButton',
text : 'Advance Search',
enableToggle : true,
listeners : {
click : function() {
if (c) {
all_Adder.show();
c = false;
}
else {
all_Adder.hide();
c = true;
}
}
},
handler : function(){

}
}],
} ],
store: Ext.data.StoreManager.lookup('Allinvoices'),
columns:[
{text:'Payment Terms' ,dataIndex: 'paymentTerms'},
{text:'Clearing Date' ,dataIndex: 'clearingDateNorm'},
{text:'Is Open' ,dataIndex: 'isOpen'},
{text:'Order Type' ,dataIndex: 'orderType'},
{text:'Order Date' ,dataIndex: 'orderDate'},
{text:'Business Area' ,dataIndex: 'businessArea'},
{text:'Ship Date' ,dataIndex: 'shipDate'},
{text:'Job ID' ,dataIndex: 'jobId'},
{text:'Tax Amt' ,dataIndex: 'taxAmt'},
{text:'Current Dispute Amount' ,dataIndex: 'currentDisputAmount'},
{text:'Ship To' ,dataIndex: 'shipTo'},
{text:'Customer Name' ,dataIndex: 'customerName'},
{text:'Document Id' ,dataIndex: 'documentId'},
{text:'Document Date' ,dataIndex: 'documentDate'},
{text:'Actual Open Amount' ,dataIndex: 'actualOpenAmount'},
{text:'Due Date' ,dataIndex: 'dueDate'},
{text:'Invoice Age' ,dataIndex: 'invoiceAge'},
{text:'Is Valid Dispute' ,dataIndex: 'isvalidDispute'},
{text:'Retainage Amount' ,dataIndex: 'retainageAmount'},
{text:'Posting Key' ,dataIndex: 'postingKey'},
{text:'Currency' ,dataIndex: 'currency'},
{text:'Debit Credit Indicator' ,dataIndex: 'debitCreditIndicator'},
{text:'Valid Open Amount' ,dataIndex: 'validOpenAmount'},
{text:'Document Number' ,dataIndex: 'documentNumberNorm'},
{text:'Company Code' ,dataIndex: 'companyCode'},
{text:'Fiscal Year' ,dataIndex: 'fiscalYear'},
{text:'Branch' ,dataIndex: 'branch'},
{text:'Customer Number' ,dataIndex: 'customerNumberNorm'},
{text:'Document Date' ,dataIndex: 'documentDateNorm'},
{text:'Baseline Date' ,dataIndex: 'baselineDateNorm'},
{text:'Due Date' ,dataIndex: 'dueDateNorm'},
{text:'Invoice Number' ,dataIndex: 'invoiceNumberNorm'},
{text:'Open Amount' ,dataIndex: 'openAmountNorm'}
],
tbar:{
xtype: 'pagingtoolbar',
displayInfo: true,
displayMsg: 'Invoices'+' {0}-{1} of {2}',
store: 'Allinvoices'
},
autoheight:true,
autowidth:true,
selModel: 'checkboxmodel'
});
var gridPanel1=Ext.ComponentQuery.query('#all_invoices_grid_panel')[0];
//works
gridPanel1.getSelectionModel().on('selectionchange',function(){
var v = gridPanel1.getSelectionModel().getSelection().length;
//Ext.ComponentQuery.query('#all_invoices_panel')[0].getSelectionModel().getSelection().length;
console.log(v);
if(v == 1)
{
Ext.ComponentQuery.query('#allInvoicesEditButton')[0].enable();
}
else
{
Ext.ComponentQuery.query('#allInvoicesEditButton')[0].disable();
}
});

var grid2=Ext.create('Ext.grid.Panel', {
itemId: 'open_invoices_grid_panel',
dockedItems : [ {
xtype : 'toolbar',
dock : 'top',
itemId : 'OpenInvoicesToolbar',
items : [ {
xtype : 'button',
text : 'Edit',
itemId : 'OpenInvoicesEditButton',
listeners: {
click: function () {
edit.show()
}
}
}, {
xtype : 'button',
text : 'Predict',
itemId : 'OpenInvoicesPredictButton',
listeners: {
click: function () {

}
},
handler : function() {
alert('You clicked the predit button!');
}
}, '->',
{
xtype : 'button',
itemId : 'OpenInvoicesAdvancesearchButton',
text : 'Advance Search',
enableToggle : true,
listeners : {
click : function() {
if (c) {
all_Adder.show();
c = false;
}
else {
all_Adder.hide();
c = true;
}
}
},
handler : function(){

}
}],
} ],
store: Ext.data.StoreManager.lookup('Openinvoices'),
columns:[
{text:'Payment Terms' ,dataIndex: 'paymentTerms'},
{text:'Clearing Date' ,dataIndex: 'clearingDateNorm'},
{text:'Is Open' ,dataIndex: 'isOpen'},
{text:'Order Type' ,dataIndex: 'orderType'},
{text:'Order Date' ,dataIndex: 'orderDate'},
{text:'Business Area' ,dataIndex: 'businessArea'},
{text:'Ship Date' ,dataIndex: 'shipDate'},
{text:'Job ID' ,dataIndex: 'jobId'},
{text:'Tax Amt' ,dataIndex: 'taxAmt'},
{text:'Current Dispute Amount' ,dataIndex: 'currentDisputAmount'},
{text:'Ship To' ,dataIndex: 'shipTo'},
{text:'Customer Name' ,dataIndex: 'customerName'},
{text:'Document Id' ,dataIndex: 'documentId'},
{text:'Document Date' ,dataIndex: 'documentDate'},
{text:'Actual Open Amount' ,dataIndex: 'actualOpenAmount'},
{text:'Due Date' ,dataIndex: 'dueDate'},
{text:'Invoice Age' ,dataIndex: 'invoiceAge'},
{text:'Is Valid Dispute' ,dataIndex: 'isvalidDispute'},
{text:'Retainage Amount' ,dataIndex: 'retainageAmount'},
{text:'Posting Key' ,dataIndex: 'postingKey'},
{text:'Currency' ,dataIndex: 'currency'},
{text:'Debit Credit Indicator' ,dataIndex: 'debitCreditIndicator'},
{text:'Valid Open Amount' ,dataIndex: 'validOpenAmount'},
{text:'Document Number' ,dataIndex: 'documentNumberNorm'},
{text:'Company Code' ,dataIndex: 'companyCode'},
{text:'Fiscal Year' ,dataIndex: 'fiscalYear'},
{text:'Branch' ,dataIndex: 'branch'},
{text:'Customer Number' ,dataIndex: 'customerNumberNorm'},
{text:'Document Date' ,dataIndex: 'documentDateNorm'},
{text:'Baseline Date' ,dataIndex: 'baselineDateNorm'},
{text:'Due Date' ,dataIndex: 'dueDateNorm'},
{text:'Invoice Number' ,dataIndex: 'invoiceNumberNorm'},
{text:'Open Amount' ,dataIndex: 'openAmountNorm'}
],tbar:{
xtype: 'pagingtoolbar',
displayInfo: true,
displayMsg: 'Invoices'+' {0}-{1} of {2}',
store: 'Openinvoices'
},
autoheight:true,
autowidth:true,
selModel: 'checkboxmodel'

});
var gridPanel2=Ext.ComponentQuery.query('#open_invoices_grid_panel')[0];
//works
gridPanel2.getSelectionModel().on('selectionchange',function(){
var v = gridPanel2.getSelectionModel().getSelection().length;
//Ext.ComponentQuery.query('#all_invoices_panel')[0].getSelectionModel().getSelection().length;
console.log(v);
if(v == 1)
{
Ext.ComponentQuery.query('#OpenInvoicesEditButton')[0].enable();
}
else
{
Ext.ComponentQuery.query('#OpenInvoicesEditButton')[0].disable();
}
});

var grid3=Ext.create('Ext.grid.Panel', {
itemId: 'Closed_invoices_grid_panel',
dockedItems : [ {
xtype : 'toolbar',
dock : 'top',
itemId : 'CloseInvoicesToolbar',
items : [ {
xtype : 'button',
text : 'Edit',
itemId : 'CloseInvoicesEditButton',
listeners: {
click: function () {
edit.show()
}
}
}, {
xtype : 'button',
text : 'Predict',
itemId : 'CloseInvoices_predict_button',
listeners: {
click: function () {

}
},
handler : function() {
alert('You clicked the predit button!');
}
}, '->',
{
xtype : 'button',
itemId : 'all_invoices_advancesearch_button',
text : 'Advance Search',
enableToggle : true,
listeners : {
click : function() {
if (c) {
all_Adder.show();
c = false;
}
else {
all_Adder.hide();
c = true;
}
}
},
handler : function(){

}
}],
} ],
store: Ext.data.StoreManager.lookup('Closeinvoices'),
columns:[
{text:'Payment Terms' ,dataIndex: 'paymentTerms'},
{text:'Clearing Date' ,dataIndex: 'clearingDateNorm'},
{text:'Is Open' ,dataIndex: 'isOpen'},
{text:'Order Type' ,dataIndex: 'orderType'},
{text:'Order Date' ,dataIndex: 'orderDate'},
{text:'Business Area' ,dataIndex: 'businessArea'},
{text:'Ship Date' ,dataIndex: 'shipDate'},
{text:'Job ID' ,dataIndex: 'jobId'},
{text:'Tax Amt' ,dataIndex: 'taxAmt'},
{text:'Current Dispute Amount' ,dataIndex: 'currentDisputAmount'},
{text:'Ship To' ,dataIndex: 'shipTo'},
{text:'Customer Name' ,dataIndex: 'customerName'},
{text:'Document Id' ,dataIndex: 'documentId'},
{text:'Document Date' ,dataIndex: 'documentDate'},
{text:'Actual Open Amount' ,dataIndex: 'actualOpenAmount'},
{text:'Due Date' ,dataIndex: 'dueDate'},
{text:'Invoice Age' ,dataIndex: 'invoiceAge'},
{text:'Is Valid Dispute' ,dataIndex: 'isvalidDispute'},
{text:'Retainage Amount' ,dataIndex: 'retainageAmount'},
{text:'Posting Key' ,dataIndex: 'postingKey'},
{text:'Currency' ,dataIndex: 'currency'},
{text:'Debit Credit Indicator' ,dataIndex: 'debitCreditIndicator'},
{text:'Valid Open Amount' ,dataIndex: 'validOpenAmount'},
{text:'Document Number' ,dataIndex: 'documentNumberNorm'},
{text:'Company Code' ,dataIndex: 'companyCode'},
{text:'Fiscal Year' ,dataIndex: 'fiscalYear'},
{text:'Branch' ,dataIndex: 'branch'},
{text:'Customer Number' ,dataIndex: 'customerNumberNorm'},
{text:'Document Date' ,dataIndex: 'documentDateNorm'},
{text:'Baseline Date' ,dataIndex: 'baselineDateNorm'},
{text:'Due Date' ,dataIndex: 'dueDateNorm'},
{text:'Invoice Number' ,dataIndex: 'invoiceNumberNorm'},
{text:'Open Amount' ,dataIndex: 'openAmountNorm'},
],tbar:{
xtype: 'pagingtoolbar',
displayInfo: true,
displayMsg: 'Invoices'+' {0}-{1} of {2}',
store: 'Closeinvoices'
},
autoheight:true,
autowidth:true,
selModel: 'checkboxmodel'
});
var gridPanel3=Ext.ComponentQuery.query('#Closed_invoices_grid_panel')[0];
//works
gridPanel3.getSelectionModel().on('selectionchange',function(){
var v = gridPanel3.getSelectionModel().getSelection().length;
//Ext.ComponentQuery.query('#all_invoices_panel')[0].getSelectionModel().getSelection().length;
console.log(v);
if(v == 1)
{
Ext.ComponentQuery.query('#CloseInvoicesEditButton')[0].enable();
}
else
{
Ext.ComponentQuery.query('#CloseInvoicesEditButton')[0].disable();
}
});
var allinvoices=Ext.create('Ext.panel.Panel', {
title: 'All Invoices',
itemId : 'all_invoices_panel',
autowidth: true,
autoheight:true,
items:[grid1]

});
var Openinvoices=Ext.create('Ext.panel.Panel', {
title: 'Open Invoices',
autowidth: true,
autoheight:true,
items:[
grid2]
//renderTo: Ext.getBody()
});
var Closeinvoices=Ext.create('Ext.panel.Panel', {
title: 'Close Invoices',
autowidth: true,
autoheight:true,
items:[
grid3]
//renderTo: Ext.getBody()
});

Ext.create('Ext.TabPanel', {
fullscreen: true,
tabBarPosition: 'bottom',

defaults: {
styleHtmlContent: true
},

items: [
allinvoices,Openinvoices,Closeinvoices

],
renderTo: Ext.getBody()

});










});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.