Skip to content

Commit

Permalink
add finance_management
Browse files Browse the repository at this point in the history
  • Loading branch information
Freezepop committed Dec 8, 2024
1 parent 16663d8 commit beafe68
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/finance_management/processsing_handler.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,17 @@ static int sbp(Connection cursor, String user_uuid, String friend_name, String v
pstmt_get_friend.setString(1, friend_name);
ResultSet rs_get_friend = pstmt_get_friend.executeQuery();
String friend_uuid = rs_get_friend.getString("uuid");
createCategory(cursor, friend_uuid, "bro_bonus", "-1");
createCategory(cursor, user_uuid, "bro_bonus", "-1");
String category_friend_uuid = checkCategory(cursor, "bro_bonus", friend_uuid);
String category_my_uuid = checkCategory(cursor, "bro_bonus", user_uuid);
if (category_my_uuid == null){
createCategory(cursor, user_uuid, "bro_bonus", "-1");
category_my_uuid = checkCategory(cursor, "bro_bonus", user_uuid);

}
if (category_friend_uuid == null) {
createCategory(cursor, friend_uuid, "bro_bonus", "-1");
category_friend_uuid = checkCategory(cursor, "bro_bonus", friend_uuid);
}
writeIncome(cursor, category_friend_uuid, value);
writeExpense(cursor, category_my_uuid, value);
return 1;
Expand Down

0 comments on commit beafe68

Please sign in to comment.