$.ajax() calls for confirm-write-off and re-send-write-off were posting
without _csrf token, causing BadRequestHttpException 400 on every request.
Added yii.getCsrfToken() to data payload of both calls.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
type: 'POST',
dataType: 'json',
data: {
- id : '" . $model->id . "'
+ id : '" . $model->id . "',
+ _csrf: yii.getCsrfToken()
},
success: function(model) {
console.log(model);
type: 'POST',
dataType: 'json',
data: {
- id : '" . $model->id . "'
+ id : '" . $model->id . "',
+ _csrf: yii.getCsrfToken()
},
success: function(model) {
console.log(model);