mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-16 18:45:35 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
31
app/financebase/model/account/chart.php
Normal file
31
app/financebase/model/account/chart.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* 会计科目模型类
|
||||
* @author 334395174@qq.com
|
||||
* @version 0.1
|
||||
*/
|
||||
class financebase_mdl_account_chart extends dbeav_model
|
||||
{
|
||||
|
||||
public function isExist($filter,$id = 0)
|
||||
{
|
||||
$sql = "SELECT id FROM ".$this->table_name(true)." WHERE ".$this->filter($filter);
|
||||
$id and $sql.=" and id <> ".$id;
|
||||
return $this->db->selectrow($sql) ? true : false;
|
||||
}
|
||||
|
||||
public function modifier_account_category($col) {
|
||||
switch($col) {
|
||||
case 'platform_amount':
|
||||
return '平台承担';
|
||||
case 'actually_amount':
|
||||
return '客户实付';
|
||||
case 'refundplatform_amount':
|
||||
return '平台补贴退';
|
||||
case 'refundactually_amount':
|
||||
return '客户应退';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class financebase_mdl_base extends dbeav_model{
|
||||
|
||||
|
||||
@@ -26,30 +25,16 @@ class financebase_mdl_base extends dbeav_model{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* table_name
|
||||
* @param mixed $real real
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function table_name($real=false){
|
||||
$tableName = 'bill';
|
||||
return $real ? kernel::database()->prefix.'financebase_'.$tableName : $tableName;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索Options
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function searchOptions(){
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* modifier_shop_id
|
||||
* @param mixed $val val
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function modifier_shop_id($val)
|
||||
{
|
||||
if(!isset($this->shop_name[$val])){
|
||||
@@ -64,22 +49,23 @@ class financebase_mdl_base extends dbeav_model{
|
||||
return $this->shop_name[$val];
|
||||
}
|
||||
|
||||
/**
|
||||
* modifier_bill_category
|
||||
* @param mixed $col col
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function modifier_bill_category($col) {
|
||||
return $col ? : '未识别类型';
|
||||
}
|
||||
|
||||
/**
|
||||
* _filter
|
||||
* @param mixed $filter filter
|
||||
* @param mixed $tableAlias tableAlias
|
||||
* @param mixed $baseWhere baseWhere
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function modifier_ar_verify_status($val) {
|
||||
$status_map = array(
|
||||
'1' => '已核对AR',
|
||||
'2' => '需核对AR',
|
||||
'3' => '无需核对AR'
|
||||
);
|
||||
return isset($status_map[$val]) ? $status_map[$val] : '未知状态';
|
||||
}
|
||||
|
||||
public function modifier_disabled($val) {
|
||||
return $val === 'true' ? '失败' : '成功';
|
||||
}
|
||||
|
||||
public function _filter($filter, $tableAlias = NULL, $baseWhere = NULL){
|
||||
if(isset($filter['time_from']) && $filter['time_from']){
|
||||
$where .= ' AND `trade_time` >='.strtotime($filter['time_from']);
|
||||
@@ -137,11 +123,6 @@ class financebase_mdl_base extends dbeav_model{
|
||||
return parent::_filter($filter, $tableAlias, $baseWhere).$where;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Total
|
||||
* @param mixed $filter filter
|
||||
* @return mixed 返回结果
|
||||
*/
|
||||
public function getTotal($filter) {
|
||||
$sql = 'select sum(case when money>0 then money end) total_positive,
|
||||
sum(case when money<0 then money end) total_negative
|
||||
|
||||
@@ -39,6 +39,10 @@ class financebase_mdl_bill_category_rules extends dbeav_model
|
||||
public function modifier_business_type($col) {
|
||||
return $col == 'cainiao' ? '菜鸟' : '';
|
||||
}
|
||||
|
||||
public function modifier_need_ar_verify($col) {
|
||||
return $col == 1 ? '是' : '否';
|
||||
}
|
||||
public function delete($filter,$subSdf = 'delete'){
|
||||
if(parent::delete($filter)){
|
||||
foreach(kernel::servicelist('bill_category_rules_set') as $name=>$object){
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* ============================
|
||||
* @Author: yaokangming
|
||||
* @Version: 1.0
|
||||
* @Version: 1.0
|
||||
* @DateTime: 2020/11/23 17:21:05
|
||||
* @describe: model层
|
||||
* ============================
|
||||
@@ -27,13 +27,9 @@ class financebase_mdl_expenses_rule extends dbeav_model {
|
||||
private $cainiaoBillCategory;
|
||||
private $splitType = array("sku"=>"sku");
|
||||
private $splitRule = array(""=>"","unsplit"=>"不拆仅呈现","price"=>"按价值权重","weight"=>"按重量权重","num"=>"按件数权重","volume"=>"按体积权重");
|
||||
|
||||
/**
|
||||
* table_name
|
||||
* @param mixed $real real
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
|
||||
// 导出配置
|
||||
var $has_export_cnf = true;
|
||||
var $export_name = '费用拆分规则';
|
||||
public function table_name($real=false)
|
||||
{
|
||||
$table_name = 'bill_category_rules';
|
||||
@@ -44,10 +40,6 @@ class financebase_mdl_expenses_rule extends dbeav_model {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取BillCategory
|
||||
* @return mixed 返回结果
|
||||
*/
|
||||
public function getBillCategory() {
|
||||
if(!$this->billCategory) {
|
||||
$rows = $this->getList('bill_category,split_type,split_rule');
|
||||
@@ -58,10 +50,6 @@ class financebase_mdl_expenses_rule extends dbeav_model {
|
||||
return $this->billCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取CainiaoBillCategory
|
||||
* @return mixed 返回结果
|
||||
*/
|
||||
public function getCainiaoBillCategory() {
|
||||
if(!$this->cainiaoBillCategory) {
|
||||
$this->cainiaoBillCategory = $this->getList('bill_category,split_type,split_rule', array('business_type'=>'cainiao'));
|
||||
@@ -69,10 +57,6 @@ class financebase_mdl_expenses_rule extends dbeav_model {
|
||||
return $this->cainiaoBillCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取SplitInfo
|
||||
* @return mixed 返回结果
|
||||
*/
|
||||
public function getSplitInfo() {
|
||||
return array(
|
||||
'split_type' => $this->splitType,
|
||||
@@ -97,21 +81,11 @@ class financebase_mdl_expenses_rule extends dbeav_model {
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* modifier_split_type
|
||||
* @param mixed $col col
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function modifier_split_type($col) {
|
||||
return $col ? $this->splitType[$col] : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* modifier_split_rule
|
||||
* @param mixed $col col
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function modifier_split_rule($col) {
|
||||
return $col ? $this->splitRule[$col] : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,4 +157,10 @@ class financebase_mdl_expenses_split extends dbeav_model {
|
||||
}
|
||||
return $primary_ids;
|
||||
}
|
||||
|
||||
public function gen_id() {
|
||||
$prefix = 'SP'.date("ymd");
|
||||
$sign = kernel::single('eccommon_guid')->incId('expenses_split', $prefix, 8);
|
||||
return $sign;
|
||||
}
|
||||
}
|
||||
15
app/financebase/model/gap.php
Normal file
15
app/financebase/model/gap.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* 差异类型模型类
|
||||
* @author 334395174@qq.com
|
||||
* @version 0.1
|
||||
*/
|
||||
class financebase_mdl_gap extends dbeav_model
|
||||
{
|
||||
public function isExist($filter,$id = 0)
|
||||
{
|
||||
$sql = "SELECT id FROM ".$this->table_name(true)." WHERE ".$this->filter($filter);
|
||||
$id and $sql.=" and id <> ".$id;
|
||||
return $this->db->selectrow($sql) ? true : false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user