Skip to content
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

Merged
merged 39 commits into from Nov 12, 2020

Conversation

emran-wedevs
Copy link
Contributor

Changes proposed in this Pull Request:

Related issue(s):

global $wpdb;

$table = $wpdb->prefix . 'erp_acct_expenses';
$cols = $wpdb->get_col( $wpdb->prepare( "DESC $table" ) );
Copy link
Contributor

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.

global $wpdb;

$table = $wpdb->prefix . 'erp_acct_pay_purchase';
$cols = $wpdb->get_col( $wpdb->prepare( "DESC $table" ) );
Copy link
Contributor

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(
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

@thebengalboy thebengalboy added the QA Approved This PR is approved by the QA team label Oct 27, 2020
@thebengalboy thebengalboy added Ready to Merge This PR is now ready to be merged Dev Review Done Other team member have reviewed this pull request labels Oct 27, 2020
@@ -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.' ) );
Copy link
Member

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.' ) );
Copy link
Member

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>
Copy link
Member

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">
Copy link
Member

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">
Copy link
Member

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 ;
Copy link
Member

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' );
Copy link
Member

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

@nurul-umbhiya
Copy link
Member

@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

@nurul-umbhiya nurul-umbhiya added Need Author's Reply and removed QA Approved This PR is approved by the QA team Ready to Merge This PR is now ready to be merged labels Oct 28, 2020
@emran-wedevs emran-wedevs changed the base branch from develop to develop_sync November 12, 2020 06:06
@emran-wedevs emran-wedevs added Ready to Merge This PR is now ready to be merged and removed Need Author's Reply labels Nov 12, 2020
@OpuRockey OpuRockey merged commit d3469f7 into develop_sync Nov 12, 2020
OpuRockey added a commit that referenced this pull request Nov 12, 2020
* 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>
@emran-wedevs emran-wedevs deleted the develop_emran_prev_work branch November 13, 2020 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Review Done Other team member have reviewed this pull request Ready to Merge This PR is now ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants