Spaces:
Sleeping
Sleeping
Update app.py
Browse filesupdate "納品日" to "ユーザー定義項目1"
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def process_csv(input_file):
|
|
| 22 |
column_name_mapping = {
|
| 23 |
'伝票日付': '請求日',
|
| 24 |
'伝票番号': '請求番号',
|
| 25 |
-
'行番号': '
|
| 26 |
'商品名': '品名',
|
| 27 |
'売上数量_請求用数量': '数量',
|
| 28 |
'売上単価': '単価',
|
|
@@ -35,9 +35,8 @@ def process_csv(input_file):
|
|
| 35 |
|
| 36 |
# Convert the '請求日' column from YYYYMMDD to YYYY/MM/DD format
|
| 37 |
df['請求日'] = df['請求日'].astype(str).apply(lambda x: x[:4] + '/' + x[4:6] + '/' + x[6:8])
|
| 38 |
-
|
| 39 |
df['明細ユーザ定義項目1'] = df['請求日']
|
| 40 |
-
df['
|
| 41 |
|
| 42 |
|
| 43 |
|
|
@@ -55,8 +54,7 @@ def process_csv(input_file):
|
|
| 55 |
new_group.iloc[0, new_group.columns.get_loc('単価')] = ''
|
| 56 |
new_group.iloc[0, new_group.columns.get_loc('単位')] = ''
|
| 57 |
new_group.iloc[0, new_group.columns.get_loc('明細ユーザ定義項目1')] = ''
|
| 58 |
-
|
| 59 |
-
clear_cols = ['得意先コード', '請求日', '請求番号', 'タグ', '得意先名', 'メモ']
|
| 60 |
for col in clear_cols:
|
| 61 |
if col in new_group.columns:
|
| 62 |
new_group.iloc[1:, new_group.columns.get_loc(col)] = ''
|
|
|
|
| 22 |
column_name_mapping = {
|
| 23 |
'伝票日付': '請求日',
|
| 24 |
'伝票番号': '請求番号',
|
| 25 |
+
'行番号': 'ユーザ定義項目1',
|
| 26 |
'商品名': '品名',
|
| 27 |
'売上数量_請求用数量': '数量',
|
| 28 |
'売上単価': '単価',
|
|
|
|
| 35 |
|
| 36 |
# Convert the '請求日' column from YYYYMMDD to YYYY/MM/DD format
|
| 37 |
df['請求日'] = df['請求日'].astype(str).apply(lambda x: x[:4] + '/' + x[4:6] + '/' + x[6:8])
|
|
|
|
| 38 |
df['明細ユーザ定義項目1'] = df['請求日']
|
| 39 |
+
df['ユーザ定義項目1'] = df['請求日']
|
| 40 |
|
| 41 |
|
| 42 |
|
|
|
|
| 54 |
new_group.iloc[0, new_group.columns.get_loc('単価')] = ''
|
| 55 |
new_group.iloc[0, new_group.columns.get_loc('単位')] = ''
|
| 56 |
new_group.iloc[0, new_group.columns.get_loc('明細ユーザ定義項目1')] = ''
|
| 57 |
+
clear_cols = ['得意先コード', '請求日', '請求番号', 'ユーザー定義項目1', 'タグ', '得意先名', 'メモ']
|
|
|
|
| 58 |
for col in clear_cols:
|
| 59 |
if col in new_group.columns:
|
| 60 |
new_group.iloc[1:, new_group.columns.get_loc(col)] = ''
|