modify invoice

This commit is contained in:
PhyoThandar
2020-10-09 20:49:25 +06:30
parent baa0f7896a
commit d0e9caab4d
3 changed files with 40 additions and 129 deletions

View File

@@ -338,7 +338,7 @@
"invoice.handling_fee":"Handling Fee",
"invoice.custom_fee":"Custom Fee",
"invoice.custom_fee_desc":"Custom Fee Description",
"invoice.discount":"Discounts",
"invoice.discount":"Discount Code",
"invoice.payment_method":"Payment Method",
"invoice.delivery_fee":"Delivery Fee : ",
"invoice.payment_attachment":"Payment Attachment",

View File

@@ -338,7 +338,7 @@
"invoice.handling_fee":"ထိန်းသိမ်းခ",
"invoice.custom_fee":"ကုန်သွယ်ခွန်",
"invoice.custom_fee_desc":"ကုန်သွယ်ခွန်အကြောင်းအရာ",
"invoice.discount":"လျှော့စျေး : ",
"invoice.discount":"လျှော့စျေးကုဒ်",
"invoice.payment_method":"ငွေပေးချေစနစ်",
"invoice.delivery_fee":"ပို့ဆောင်ခ",
"invoice.payment_attachment":"ပေးချေပြီးဖိုင်များ",
@@ -347,7 +347,8 @@
"invoice.btn_create":"ငွေတောင်းခံလွှာ ပြုလုပ်ရန်",
"invoice.btn_save":"ငွေတောင်းခံလွှာ သိမ်းရန်",
"invoice.btn_payment_receipt":"ငွေလက်ခံဖြတ်ပိုင်း ထည့်ရန်",
"invoice.description": "အကြောင်းအရာ",
"invoice.desc": "အမျိုးအစား",
"invoice.description": "ငွေတောင်းခံလွှာအကြောင်းအရာ",
"Invoices End ================================================================":"",
"Discount Start ================================================================":"",

View File

@@ -247,6 +247,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
labelTextKey: 'invoice.status'),
SizedBox(height: 15),
Divider(thickness: 1),
SizedBox(height: 15),
LocalText(context, 'invoice.box_info',
color: primaryColor,
@@ -290,130 +292,53 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
SizedBox(height: 15),
Container(
padding: const EdgeInsets.only(bottom: 10),
child: LocalText(context, 'invoice.description',
color: primaryColor,
fontWeight: FontWeight.bold,
fontSize: 16.0),
),
Container(
child: Column(children: getCargoTableByBox(context)),
),
SizedBox(height: 10),
Divider(thickness: 1),
SizedBox(height: 10),
// InputText(
// controller: _handlingFeeController,
// iconData: FontAwesomeIcons.moneyBill,
// labelTextKey: 'invoice.handling_fee'),
LocalText(context, 'invoice.payment_method',
fontSize: 16,
color: primaryColor,
fontWeight: FontWeight.bold),
Container(
padding: EdgeInsets.only(top: 5, left: 18),
child: Row(
children: <Widget>[
Expanded(
child: LocalText(context, 'invoice.payment_method',
fontSize: 16,
color: primaryColor,
fontWeight: FontWeight.bold)),
Container(
width: 150.0,
child: DropdownButtonFormField(
items: paymentMethods
.map((e) => DropdownMenuItem(
child: Text(e.name), value: e.name))
.toList(),
onChanged: (selected) => {},
flex: 2,
child: Container(
width: 150.0,
child: DropdownButtonFormField(
hint: Text(getLocalString(
context, 'invoice.payment_method')),
items: paymentMethods
.map((e) => DropdownMenuItem(
child: Text(e.name), value: e.name))
.toList(),
onChanged: (selected) => {},
),
),
),
],
),
),
// Container(
// padding: EdgeInsets.only(top: 5),
// child: Row(
// children: <Widget>[
// Expanded(
// child: Padding(
// padding: const EdgeInsets.only(left: 18.0),
// child: LocalText(context, 'invoice.delivery_fee',
// fontSize: 16,
// color: primaryColor,
// fontWeight: FontWeight.bold),
// )),
// Switch(
// value: isSwitched,
// onChanged: (value) {
// setState(() {
// isSwitched = value;
// if (value) {
// deliveryfee = 5;
// } else {
// deliveryfee = 0;
// }
// print(isSwitched);
// });
// },
// activeTrackColor: primaryColor.withOpacity(0.8),
// activeColor: primaryColor,
// ),
// Text(
// '(' +
// getLocalString(context, 'invoice.delivery_fee') +
// ' $deliveryfee)',
// style: TextStyle(
// color: primaryColor,
// fontWeight: FontWeight.bold,
// fontSize: 12),
// ),
// ],
// ),
// ),
// SizedBox(
// height: 10,
// ),
// ExpansionTile(
// title: LocalText(context, 'invoice.payment_attachment',
// color: primaryColor,
// fontWeight: FontWeight.bold,
// fontSize: 16.0),
// children: <Widget>[
// widget.invoice != null
// ? Padding(
// padding: EdgeInsets.only(left: 20),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Container(
// padding: EdgeInsets.only(top: 10),
// child: Text(
// '${dateFormatter.format(_invoice.receipts[0].date)} ',
// style: TextStyle(
// color: Colors.black, fontSize: 16),
// ),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets.only(left: 10),
// child: MultiImageFile(
// enabled: false,
// controller: multiImgController,
// title: "Receipt",
// )),
// ),
// Container(
// padding: EdgeInsets.only(top: 10, left: 10),
// child: Text(
// '\$${_invoice.receipts[0].amount} ',
// style: TextStyle(
// color: Colors.black, fontSize: 16),
// ),
// ),
// ],
// ),
// )
// : Container(),
// SizedBox(
// height: 25,
// ),
// ],
// ),
]),
)),
widget.invoice == null
@@ -474,7 +399,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
children: [
Expanded(
flex: 2,
child: Text(getLocalString(context, 'invoice.description'),
child: Text(getLocalString(context, 'invoice.desc'),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
@@ -503,17 +428,15 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
dataRow.insert(
dataRow.length,
Container(
padding: const EdgeInsets.only(
left: 5.0, right: 5.0, top: 10.0, bottom: 10.0),
padding: const EdgeInsets.only(left: 5.0, right: 5.0),
child: Row(
children: [
Expanded(
flex: 2,
child: Text(getLocalString(context, 'invoice.discount'))),
Expanded(
flex: 2,
child: Container(
width: 80.0,
child: DropdownButtonFormField(
hint: Text(getLocalString(context, 'invoice.discount'),
style: TextStyle(fontSize: 14)),
items: discountModel.discounts
.map((e) => DropdownMenuItem(
child: Text(e.code, style: TextStyle(fontSize: 13)),
@@ -545,23 +468,12 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
dataRow.length,
Container(
padding: const EdgeInsets.only(
left: 5.0, right: 5.0, top: 10.0, bottom: 10.0),
left: 5.0, right: 5.0, top: 10.0, bottom: 0.0),
child: Row(
children: [
Expanded(
flex: 2,
child: Text(getLocalString(context, 'invoice.custom_fee'))),
// Expanded(
// child: Text(
// '',
// )),
// Container(
// width: 100,
// child: InputText(
// controller: _customFeeController,
// iconData: null,
// labelTextKey: 'invoice.custom_fee'),
// ),
Expanded(
child: Text('\$ ${customFee}',
textAlign: TextAlign.end,
@@ -578,7 +490,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
dataRow.length,
Container(
padding: const EdgeInsets.only(
left: 5.0, right: 5.0, top: 10.0, bottom: 10.0),
left: 5.0, right: 5.0, top: 0.0, bottom: 10.0),
child: Row(
children: [
Expanded(
@@ -630,7 +542,6 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
left: 5.0, right: 5.0, top: 10.0, bottom: 10.0),
child: Row(
children: [
Expanded(flex: 1, child: Text('')),
Expanded(
flex: 2,
child: LocalText(
@@ -656,7 +567,6 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
left: 5.0, right: 5.0, top: 10.0, bottom: 10.0),
child: Row(
children: [
Expanded(flex: 1, child: Text('')),
Expanded(
flex: 2,
child: LocalText(