This commit is contained in:
PhyoThandar
2020-10-13 11:49:35 +06:30
parent af568b8adf
commit fb2a3c8323
3 changed files with 112 additions and 106 deletions

View File

@@ -83,6 +83,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
int customFee = 10;
double total = 0;
Discount _discount;
bool isNew = false;
List<Box> selectedBoxes = [];
@@ -122,6 +123,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
_customFeeController.text = '0';
_descriptionController.text = '';
_balanceController.text = '0';
setState(() {
isNew = true;
});
}
_boxes = [
@@ -220,7 +224,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
children: <Widget>[
Expanded(
child: DisplayText(
text: user != null ? user.name : "Myo Min",
text: user != null ? user.name : "",
labelTextKey: "invoice.customer_name",
iconData: Feather.user,
)),
@@ -255,6 +259,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
fontWeight: FontWeight.bold,
fontSize: 16.0),
Container(
padding: const EdgeInsets.only(top: 15),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: MyDataTable(
@@ -287,9 +292,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
),
SizedBox(height: 25),
Divider(thickness: 1),
SizedBox(height: 15),
Container(
@@ -300,13 +303,12 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
fontSize: 16.0),
),
Container(
padding: const EdgeInsets.only(top: 15),
child: Column(children: getCargoTableByBox(context)),
),
SizedBox(height: 10),
Divider(thickness: 1),
SizedBox(height: 10),
// InputText(
@@ -339,6 +341,30 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
],
),
),
SizedBox(height: 10),
Divider(thickness: 1),
SizedBox(height: 10),
isNew
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocalText(context, 'invoice.payment_attachment',
fontSize: 16,
color: primaryColor,
fontWeight: FontWeight.bold),
Padding(
padding: EdgeInsets.only(left: 20, top: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[],
),
),
],
)
: Container()
]),
)),
widget.invoice == null