|
@@ -1,8 +1,10 @@
|
|
|
package com.pan_american.android.ui.financial_module.payment_refund
|
|
|
|
|
|
import android.os.Bundle
|
|
|
+import android.util.Log
|
|
|
import android.widget.TextView
|
|
|
import androidx.core.content.res.ResourcesCompat
|
|
|
+import com.google.gson.Gson
|
|
|
import com.pan_american.android.OASystem
|
|
|
import com.pan_american.android.R
|
|
|
import com.pan_american.android.base.BaseActivity
|
|
@@ -261,7 +263,7 @@ class AddPaymentRefundActivity : BaseActivity<ActivityAddPaymentRefundBinding>()
|
|
|
showMessage(resources.getString(R.string.payee_hint))
|
|
|
return@setOnClickListener
|
|
|
} else {
|
|
|
- updatePaymentRefundRequest.payee = binding.payee.toString()
|
|
|
+ updatePaymentRefundRequest.payee = binding.payee.text.toString()
|
|
|
}
|
|
|
|
|
|
if (binding.otherBankName.text.isNullOrBlank()) {
|
|
@@ -292,11 +294,18 @@ class AddPaymentRefundActivity : BaseActivity<ActivityAddPaymentRefundBinding>()
|
|
|
updatePaymentRefundRequest.orbitalPrivateTransfer = paymentMarkId
|
|
|
}
|
|
|
|
|
|
+ if (binding.consumeWay.text.isNullOrBlank()) {
|
|
|
+ showMessage(resources.getString(R.string.consume_way_hint))
|
|
|
+ return@setOnClickListener
|
|
|
+ } else {
|
|
|
+ updatePaymentRefundRequest.consumptionPatterns = binding.consumeWay.text.toString()
|
|
|
+ }
|
|
|
+
|
|
|
if (paymentTypeId == -1) {
|
|
|
showMessage(resources.getString(R.string.payment_type_select_hint))
|
|
|
return@setOnClickListener
|
|
|
} else {
|
|
|
- updatePaymentRefundRequest.ccpId = paymentTypeId
|
|
|
+ updatePaymentRefundRequest.payType = paymentTypeId
|
|
|
}
|
|
|
|
|
|
if (binding.notes.getText().isNotBlank()) {
|
|
@@ -309,6 +318,8 @@ class AddPaymentRefundActivity : BaseActivity<ActivityAddPaymentRefundBinding>()
|
|
|
updatePaymentRefundRequest.status = 1
|
|
|
}
|
|
|
|
|
|
+ updatePaymentRefundRequest.diId = groupId
|
|
|
+
|
|
|
updatePaymentRefund()
|
|
|
}
|
|
|
}
|
|
@@ -352,7 +363,7 @@ class AddPaymentRefundActivity : BaseActivity<ActivityAddPaymentRefundBinding>()
|
|
|
binding.consumeWay.setText(consumptionPatterns)
|
|
|
|
|
|
for (item in paymentTypeList) {
|
|
|
- if (item.id == ccpId) {
|
|
|
+ if (item.id == payType) {
|
|
|
binding.paymentType.text = item.name
|
|
|
}
|
|
|
}
|
|
@@ -372,6 +383,7 @@ class AddPaymentRefundActivity : BaseActivity<ActivityAddPaymentRefundBinding>()
|
|
|
}
|
|
|
|
|
|
private fun updatePaymentRefund() {
|
|
|
+ Log.e("request", Gson().toJson(updatePaymentRefundRequest))
|
|
|
apiService.updatePaymentRefundDetail(updatePaymentRefundRequest).enqueue(object : Callback<BaseResponse> {
|
|
|
override fun onResponse(call: Call<BaseResponse>, response: Response<BaseResponse>) {
|
|
|
val updateResponse = response.body()
|