Skip to content

Commit

Permalink
Update from travis f0a9f81
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive committed Feb 8, 2019
1 parent 5daf0fa commit 9698f40
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions inc/duplicate-doc/dupricate-doc-functions.php
Expand Up @@ -15,7 +15,6 @@
新規複製 _ 保存する関数
/*-------------------------------------------*/
function bill_copy_post( $post_id, $post_type = 'post', $table_copy_type = 'all', $duplicate_type = 'full' ) {

$post = get_post( $post_id );

if ( empty( $post ) ) {
Expand Down Expand Up @@ -91,8 +90,23 @@ function bill_copy_post( $post_id, $post_type = 'post', $table_copy_type = 'all'

// テーブルをそのまま複製する場合
$bill_items = get_post_meta( $post->ID, 'bill_items', true );
add_post_meta( $new_post, 'bill_items', $bill_items );
if ( $bill_items ) {
add_post_meta( $new_post, 'bill_items', $bill_items );
}

// 給与明細のテーブル内容複製
if ( $post_type == 'salary' ) {

$kazei_additional = get_post_meta( $post->ID, 'kazei_additional', true );

if ( $kazei_additional ) {
add_post_meta( $new_post, 'kazei_additional', $kazei_additional );
}
$hikazei_additional = get_post_meta( $post->ID, 'hikazei_additional', true );
if ( $hikazei_additional ) {
add_post_meta( $new_post, 'hikazei_additional', $hikazei_additional );
}
}
} else {

// 一括にしてテーブルを保存する
Expand Down
2 changes: 1 addition & 1 deletion style.css
Expand Up @@ -4,7 +4,7 @@ Theme Name: BillVektor
Description:
Author: Vektor,Inc.
Author URI:
Version:1.1.8
Version:1.1.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

0 comments on commit 9698f40

Please sign in to comment.