New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update expense, purchase and github issues #1116
Conversation
…d and show in list and single voucher
includes/updates/update-1.6.7.php
Outdated
global $wpdb; | ||
|
||
$table = $wpdb->prefix . 'erp_acct_expenses'; | ||
$cols = $wpdb->get_col( $wpdb->prepare( "DESC $table" ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use prepare statement with proper placeholder.
includes/updates/update-1.6.7.php
Outdated
global $wpdb; | ||
|
||
$table = $wpdb->prefix . 'erp_acct_pay_purchase'; | ||
$cols = $wpdb->get_col( $wpdb->prepare( "DESC $table" ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use prepare statement properly.
'updated_at' => $product_cat_data['updated_at'], | ||
'updated_by' => $product_cat_data['updated_by'], | ||
] | ||
array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you run phpcbf for this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
@@ -153,7 +153,7 @@ public function get_pay_bill( $request ) { | |||
$id = (int) $request['id']; | |||
|
|||
if ( empty( $id ) ) { | |||
return new WP_Error( 'rest_pay_bill_invalid_id', __( 'Invalid resource id.' ), [ 'status' => 404 ] ); | |||
return new WP_Error( 404, __( 'Invalid resource id.' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the removed line was perfectly ok, what you did is wrong. kindly revert back to previous changes
return new WP_Error( 'rest_pay_bill_invalid_id', __( 'Invalid resource id.' ), [ 'status' => 404 ] );
@@ -215,7 +215,7 @@ public function update_pay_bill( $request ) { | |||
$id = (int) $request['id']; | |||
|
|||
if ( empty( $id ) ) { | |||
return new WP_Error( 'rest_pay_bill_invalid_id', __( 'Invalid resource id.' ), [ 'status' => 404 ] ); | |||
return new WP_Error( 404, __( 'Invalid resource id.' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the removed line was perfectly ok, what you did is wrong. kindly revert back to previous changes
return new WP_Error( 'rest_pay_bill_invalid_id', __( 'Invalid resource id.' ), [ 'status' => 404 ] );
@@ -1,9 +1,10 @@ | |||
<template> | |||
<div v-if="checkOptions" class="vue-select" :style="'width:' + width + 'px'"> | |||
<select v-model="select_val" @change="onChange"> | |||
<select v-model="select_val" @change="handleInput"> | |||
<option value="">All</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be translatable
<div class="wperp-panel-footer"> | ||
<input type="reset" value="Cancel" class="wperp-btn btn--default" @click="toggleFilter"> | ||
<input type="reset" value="Cancel" class="wperp-btn btn--default" | ||
@click="toggleFilter"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value="Cancel" needs to be translatable
<div class="wperp-panel-footer"> | ||
<input type="reset" value="Cancel" class="wperp-btn btn--default" @click="toggleFilter"> | ||
<input type="reset" value="Cancel" class="wperp-btn btn--default" | ||
@click="toggleFilter"> | ||
<input type="submit" value="Submit" class="wperp-btn btn--primary"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value="Submit" <-- Submit needs to be translatable
@@ -825,8 +849,9 @@ function erp_acct_generate_pdf( $request, $transaction, $file_name = '', $output | |||
$trn_id = $transaction->trn_no; | |||
} | |||
|
|||
$title = isset($transaction->estimate) ? 'Estimate' : $type ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estimate needs to be translateable
|
||
$results[ $index ]['debit'] = abs( (float)$result['debit'] ); | ||
$results[ $index ]['credit'] = abs( (float)$result['credit'] ); | ||
$results[ $index ]['balance'] = abs($balance) . ( $balance > 0 ? ' Dr' : ' Cr' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly consult with Sadek bhai and make sure that we can leave Dr and Cr nontranslateable string, if this needs to be change to translateable, kindly make all relevant Dr and Cr string that you added to translateable
@emran-wedevs you need to add all db related changes to includes/class-install.php also include update-1.6.7.php file to includes/class-updates.php |
…p-erp into develop_emran_prev_work
* Updated export import permission * Added filter at WP ERP title * Added filter at CRM title * Fixed name and city validation issues * Updated string validation function name * update sales transaction system for separating transaction charge and invoice amout * update employee display name whenn update * Product duplicate Issue (#1123) * solve Product duplication problem and response message * Fix some issues * fix some issues * update some issues * update some issues * update some issues * update text domain * add product duplicate prevent in update Co-authored-by: alemran <emrancu1@gmail.com> * Update expense, purchase and github issues (#1116) * update expense for Transaction charge * update purchase payment with Transaction charge and Update.6.4.php * Update for Category Parent * Update Github Issue #1094 * update expense , bill, purchase reference no , show in details payment and voucher * Update refrence no in purchase list * Update github Issue 1076 for tag payment not support decimal value * update git issue #942 . Expense, bill and bill payment refrence no add and show in list and single voucher * add reference no,due date to PDF export invoice * Update expense, sales, purchase filtering system with type and people * Update expense, sales, purchase filtering system with type and people * fix some issue in Expense filtering * Set Estimate title in PDF when Estimate * Update simple select UI, remove custom arrow, enable default select * update expense create page for redirecting when save expense * update PDF export system for Expense, bill, bill pay, purchase, purchase pay voucher * update customer transaction or ledger * update migration file * dev build for VUE change * fix phpcs issues * fix phpcs issues * update phpcs issue * update phpcs issue * update phpcs issue * update phpcs issues * update formating issues * remove duplicate method * fix github isues * update translate issue * update translate issue * dev build * change transaction charge system for purchase and expense * update filtering query for sales , purchase , expense * update migration for 1.6.8 Co-authored-by: alemran <emrancu1@gmail.com> * UPDATE INSTALL FILE Co-authored-by: tanmayjay <jktanmay@gmail.com> Co-authored-by: Al Emran <emran@wedevs.com> Co-authored-by: emran-wedevs <69339029+emran-wedevs@users.noreply.github.com> Co-authored-by: alemran <emrancu1@gmail.com>
Changes proposed in this Pull Request:
Related issue(s):