modify invoice
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user