mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Handle second user signature
This commit is contained in:
parent
7012b6c87e
commit
39f206245c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -370,7 +370,18 @@ NINJA.signatureImage = function(invoice) {
|
||||
return blankImage;
|
||||
}
|
||||
|
||||
return invoice.invitations[0].signature_base64 || blankImage;
|
||||
for (var i=0; i<invoice.invitations.length; i++) {
|
||||
var invitation = invoice.invitations[i];
|
||||
if (invitation.signature_base64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! invitation.signature_base64) {
|
||||
return blankImage;
|
||||
}
|
||||
|
||||
return invitation.signature_base64 || blankImage;
|
||||
}
|
||||
|
||||
NINJA.signatureDate = function(invoice) {
|
||||
@ -382,7 +393,18 @@ NINJA.signatureDate = function(invoice) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var date = invoice.invitations[0].signature_date;
|
||||
for (var i=0; i<invoice.invitations.length; i++) {
|
||||
var invitation = invoice.invitations[i];
|
||||
if (invitation.signature_base64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! invitation.signature_base64) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var date = invitation.signature_date;
|
||||
return NINJA.formatDateTime(date, invoice.account);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,18 @@
|
||||
return invoice;
|
||||
}
|
||||
|
||||
var sourceSVG = invoice.invitations[0].signature_base64;
|
||||
for (var i=0; i<invoice.invitations.length; i++) {
|
||||
var invitation = invoice.invitations[i];
|
||||
if (invitation.signature_base64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! invitation.signature_base64) {
|
||||
return invoice;
|
||||
}
|
||||
|
||||
var sourceSVG = invitation.signature_base64;
|
||||
if (! sourceSVG || sourceSVG.indexOf('data:image') == 0) {
|
||||
return invoice;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user