fix disabled Invoice is validate
This commit is contained in:
parent
ec0aba426c
commit
f16830c5a0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -48,6 +48,8 @@ export class Facture {
|
||||
this.isDocumentAlreadyGeneratedClass = this.getDocumentStateClass(isDocumentAlreadyGenerated);
|
||||
this.isDocumentAlreadySentClass = this.getDocumentStateClass(isDocumentAlreadySent);
|
||||
|
||||
this.isValidated = isDocumentAlreadyGenerated && isDocumentAlreadySent;
|
||||
|
||||
this.clientName = this.nom;
|
||||
if(isFactureSingle == false){
|
||||
const isFactureClientWithoutGroup = myresp.facture_client_id != null && myresp.facture_client_id != 0;
|
||||
@ -75,13 +77,28 @@ export class Facture {
|
||||
*/
|
||||
getDTRow() {
|
||||
let myrow = [
|
||||
'<input class="factureToPay" data-id= '+ this.id + ' type="checkbox" name="factureToPay" value="' + this.id + '"/>',
|
||||
`<input class="factureToPay" data-id="${this.id}" type="checkbox" name="factureToPay" value="${this.id}"/>`,
|
||||
|
||||
'<div>' + this.user_id + '</div>',
|
||||
'<div class="factureNum" data-table="facture" data-column="num" data-id="' + this.id + '">' + this.num + '</div>',
|
||||
'<input style="margin:0;padding:0;" class="inputDate devisOrFactureInputDate" type="date" value=' + this.date + ' data-table="facture" data-column="date" data-id="' + this.id + '"/>',
|
||||
'<input style="margin:0;padding:0;" class="inputDate devisOrFactureInputDate" type="date" value=' + this.date_paiement + ' data-table="facture" data-column="date_paiement" data-id="' + this.id + '"/>',
|
||||
|
||||
this.isValidated
|
||||
? `<div>${this.num}</div>`
|
||||
: `<div class="factureNum" data-table="facture" data-column="num" data-id="${this.id}">${this.num}</div>`,
|
||||
|
||||
this.isValidated
|
||||
? `<div>${this.date}</div>`
|
||||
: `<input class="inputDate devisOrFactureInputDate" type="date" value="${this.date}" data-table="facture" data-column="date" data-id="${this.id}"/>`,
|
||||
|
||||
this.isValidated
|
||||
? `<div>${this.date_paiement}</div>`
|
||||
: `<input class="inputDate devisOrFactureInputDate" type="date" value="${this.date_paiement}" data-table="facture" data-column="date_paiement" data-id="${this.id}"/>`,
|
||||
|
||||
'<div>' + this.type_paiement + '</div>',
|
||||
'<div class="selectAvailableDevis" data-table="facture" data-column="id_devis" data-id="' + this.id + '" data-current="' + this.id_devis + '">' + this.nom_defunt + ' | <span style="font-size: 0.7rem">' + this.prenom + ' ' + this.nom + '</span></div>',
|
||||
|
||||
this.isValidated
|
||||
? `<div>${this.nom_defunt} | <span style="font-size: 0.7rem">${this.prenom} ${this.nom}</span></div>`
|
||||
: `<div class="selectAvailableDevis" data-table="facture" data-column="id_devis" data-id="${this.id}" data-current="${this.id_devis}">${this.nom_defunt} | <span style="font-size: 0.7rem">${this.prenom} ${this.nom}</span></div>`,
|
||||
|
||||
'<div>' + this.clientName + '</div>',
|
||||
'<div>' + this.factureProduits + '</div>',
|
||||
'<div>' + this.status_paiement + '</div>',
|
||||
@ -89,7 +106,10 @@ export class Facture {
|
||||
'<div><span class="badge '+this.isDocumentAlreadyGeneratedClass+'">' + this.isDocumentAlreadyGeneratedLabel + '</span></div>',
|
||||
'<div><span class="badge '+this.isDocumentAlreadySentClass+'">' + this.isDocumentAlreadySentLabel + '</span></div>',
|
||||
'<div><span>'+this.totalTtc + '</span></div>',
|
||||
'<div style="display:inline-block;margin-right:0px;width:80%;"><a href="' + this.baseUrl +'"><button>' + t('gestion', 'Open') + '</button></a></div><div data-modifier="facture" data-id=' + this.id + ' data-table="facture" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div>',
|
||||
|
||||
this.isValidated
|
||||
? '<div><a href="' + this.baseUrl +'"><button>' + t('gestion', 'Open') + '</button></a></div>'
|
||||
: '<div style="display:inline-block;width:80%;"><a href="' + this.baseUrl +'"><button>' + t('gestion', 'Open') + '</button></a></div><div data-modifier="facture" data-id=' + this.id + ' data-table="facture" class="deleteItem icon-delete"></div>',
|
||||
];
|
||||
return myrow;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user