|
|
@ -18,16 +18,24 @@ ElDialog { |
|
|
|
title: qsTr('Invoice') |
|
|
|
standardButtons: invoice_key != '' ? Dialog.Close : Dialog.Cancel |
|
|
|
|
|
|
|
padding: 0 |
|
|
|
|
|
|
|
modal: true |
|
|
|
parent: Overlay.overlay |
|
|
|
Overlay.modal: Rectangle { |
|
|
|
color: "#aa000000" |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: parent.width |
|
|
|
height: parent.height |
|
|
|
spacing: 0 |
|
|
|
|
|
|
|
GridLayout { |
|
|
|
id: layout |
|
|
|
width: parent.width |
|
|
|
height: parent.height |
|
|
|
Layout.leftMargin: constants.paddingLarge |
|
|
|
Layout.rightMargin: constants.paddingLarge |
|
|
|
columns: 2 |
|
|
|
|
|
|
|
Label { |
|
|
@ -122,7 +130,7 @@ ElDialog { |
|
|
|
visible: invoice.message |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
Layout.preferredWidth: parent.width |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
|
|
|
padding: 0 |
|
|
@ -147,7 +155,7 @@ ElDialog { |
|
|
|
id: amountContainer |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
Layout.preferredWidth: parent.width //* 0.75 |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
|
|
|
padding: 0 |
|
|
@ -261,13 +269,24 @@ ElDialog { |
|
|
|
visible: invoice.userinfo |
|
|
|
text: invoice.userinfo |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
RowLayout { |
|
|
|
Layout.columnSpan: 2 |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
spacing: constants.paddingMedium |
|
|
|
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 } |
|
|
|
|
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
text: qsTr('Pay') |
|
|
|
icon.source: '../../icons/confirmed.png' |
|
|
|
enabled: invoice.invoiceType != Invoice.Invalid && invoice.canPay |
|
|
|
onClicked: { |
|
|
|
if (invoice_key == '') // save invoice if not retrieved from key |
|
|
|
invoice.save_invoice() |
|
|
|
dialog.close() |
|
|
|
doPay() // only signal here |
|
|
|
} |
|
|
|
} |
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
text: qsTr('Delete') |
|
|
|
icon.source: '../../icons/delete.png' |
|
|
|
visible: invoice_key != '' |
|
|
@ -278,6 +297,7 @@ ElDialog { |
|
|
|
} |
|
|
|
|
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
text: qsTr('Save') |
|
|
|
icon.source: '../../icons/save.png' |
|
|
|
visible: invoice_key == '' |
|
|
@ -289,20 +309,6 @@ ElDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
FlatButton { |
|
|
|
text: qsTr('Pay') |
|
|
|
icon.source: '../../icons/confirmed.png' |
|
|
|
enabled: invoice.invoiceType != Invoice.Invalid && invoice.canPay |
|
|
|
onClicked: { |
|
|
|
if (invoice_key == '') // save invoice if not retrieved from key |
|
|
|
invoice.save_invoice() |
|
|
|
dialog.close() |
|
|
|
doPay() // only signal here |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 } |
|
|
|
} |
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|