├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── inn ├── __init__.py ├── config │ ├── __init__.py │ ├── desktop.py │ ├── docs.py │ └── inn_hotels.py ├── fixtures │ └── custom_field.json ├── helper │ ├── __init__.py │ ├── daterange.py │ ├── general.py │ ├── role.json │ └── role.py ├── hooks.py ├── inn_hotels │ ├── __init__.py │ ├── doctype │ │ ├── __init__.py │ │ ├── ar_city_ledger │ │ │ ├── __init__.py │ │ │ ├── ar_city_ledger.js │ │ │ ├── ar_city_ledger.json │ │ │ ├── ar_city_ledger.py │ │ │ ├── test_ar_city_ledger.js │ │ │ └── test_ar_city_ledger.py │ │ ├── ar_city_ledger_invoice │ │ │ ├── __init__.py │ │ │ ├── ar_city_ledger_invoice.js │ │ │ ├── ar_city_ledger_invoice.json │ │ │ ├── ar_city_ledger_invoice.py │ │ │ ├── test_ar_city_ledger_invoice.js │ │ │ └── test_ar_city_ledger_invoice.py │ │ ├── ar_city_ledger_invoice_folio │ │ │ ├── __init__.py │ │ │ ├── ar_city_ledger_invoice_folio.js │ │ │ ├── ar_city_ledger_invoice_folio.json │ │ │ ├── ar_city_ledger_invoice_folio.py │ │ │ ├── test_ar_city_ledger_invoice_folio.js │ │ │ └── test_ar_city_ledger_invoice_folio.py │ │ ├── ar_city_ledger_invoice_payments │ │ │ ├── __init__.py │ │ │ ├── ar_city_ledger_invoice_payments.js │ │ │ ├── ar_city_ledger_invoice_payments.json │ │ │ ├── ar_city_ledger_invoice_payments.py │ │ │ ├── test_ar_city_ledger_invoice_payments.js │ │ │ └── test_ar_city_ledger_invoice_payments.py │ │ ├── bed_type │ │ │ ├── __init__.py │ │ │ ├── bed_type.js │ │ │ ├── bed_type.json │ │ │ ├── bed_type.py │ │ │ ├── test_bed_type.js │ │ │ └── test_bed_type.py │ │ ├── inn_amenities │ │ │ ├── __init__.py │ │ │ ├── inn_amenities.js │ │ │ ├── inn_amenities.json │ │ │ ├── inn_amenities.py │ │ │ ├── test_inn_amenities.js │ │ │ └── test_inn_amenities.py │ │ ├── inn_amenities_type │ │ │ ├── __init__.py │ │ │ ├── inn_amenities_type.js │ │ │ ├── inn_amenities_type.json │ │ │ ├── inn_amenities_type.py │ │ │ ├── test_inn_amenities_type.js │ │ │ └── test_inn_amenities_type.py │ │ ├── inn_audit_log │ │ │ ├── __init__.py │ │ │ ├── inn_audit_log.js │ │ │ ├── inn_audit_log.json │ │ │ ├── inn_audit_log.py │ │ │ ├── test_inn_audit_log.js │ │ │ └── test_inn_audit_log.py │ │ ├── inn_bed_type │ │ │ ├── __init__.py │ │ │ ├── inn_bed_type.js │ │ │ ├── inn_bed_type.json │ │ │ ├── inn_bed_type.py │ │ │ ├── test_inn_bed_type.js │ │ │ └── test_inn_bed_type.py │ │ ├── inn_cc_detail │ │ │ ├── __init__.py │ │ │ ├── inn_cc_detail.json │ │ │ └── inn_cc_detail.py │ │ ├── inn_channel │ │ │ ├── __init__.py │ │ │ ├── inn_channel.js │ │ │ ├── inn_channel.json │ │ │ ├── inn_channel.py │ │ │ ├── test_inn_channel.js │ │ │ └── test_inn_channel.py │ │ ├── inn_channel_tax_exclude │ │ │ ├── __init__.py │ │ │ ├── inn_channel_tax_exclude.json │ │ │ └── inn_channel_tax_exclude.py │ │ ├── inn_cr_payment_detail │ │ │ ├── __init__.py │ │ │ ├── inn_cr_payment_detail.json │ │ │ └── inn_cr_payment_detail.py │ │ ├── inn_cr_payment_transaction │ │ │ ├── __init__.py │ │ │ ├── inn_cr_payment_transaction.json │ │ │ └── inn_cr_payment_transaction.py │ │ ├── inn_cr_refund_detail │ │ │ ├── __init__.py │ │ │ ├── inn_cr_refund_detail.json │ │ │ └── inn_cr_refund_detail.py │ │ ├── inn_cr_refund_transaction │ │ │ ├── __init__.py │ │ │ ├── inn_cr_refund_transaction.json │ │ │ └── inn_cr_refund_transaction.py │ │ ├── inn_customer │ │ │ ├── __init__.py │ │ │ ├── inn_customer.js │ │ │ ├── inn_customer.json │ │ │ ├── inn_customer.py │ │ │ └── test_inn_customer.py │ │ ├── inn_dayend_close │ │ │ ├── __init__.py │ │ │ ├── inn_dayend_close.js │ │ │ ├── inn_dayend_close.json │ │ │ ├── inn_dayend_close.py │ │ │ ├── inn_dayend_close_helper.py │ │ │ ├── test_inn_dayend_close.js │ │ │ └── test_inn_dayend_close.py │ │ ├── inn_employee_details │ │ │ ├── __init__.py │ │ │ ├── inn_employee_details.js │ │ │ ├── inn_employee_details.json │ │ │ ├── inn_employee_details.py │ │ │ ├── test_inn_employee_details.js │ │ │ └── test_inn_employee_details.py │ │ ├── inn_expected_arrived_today │ │ │ ├── __init__.py │ │ │ ├── inn_expected_arrived_today.json │ │ │ └── inn_expected_arrived_today.py │ │ ├── inn_expected_closed_today │ │ │ ├── __init__.py │ │ │ ├── inn_expected_closed_today.json │ │ │ └── inn_expected_closed_today.py │ │ ├── inn_expected_departed_today │ │ │ ├── __init__.py │ │ │ ├── inn_expected_departed_today.json │ │ │ └── inn_expected_departed_today.py │ │ ├── inn_floor_plan │ │ │ ├── __init__.py │ │ │ ├── inn_floor_plan.js │ │ │ ├── inn_floor_plan.json │ │ │ ├── inn_floor_plan.py │ │ │ ├── test_inn_floor_plan.js │ │ │ └── test_inn_floor_plan.py │ │ ├── inn_folio │ │ │ ├── __init__.py │ │ │ ├── inn_folio.js │ │ │ ├── inn_folio.json │ │ │ ├── inn_folio.py │ │ │ ├── test_inn_folio.js │ │ │ └── test_inn_folio.py │ │ ├── inn_folio_transaction │ │ │ ├── __init__.py │ │ │ ├── inn_folio_transaction.js │ │ │ ├── inn_folio_transaction.json │ │ │ ├── inn_folio_transaction.py │ │ │ ├── test_inn_folio_transaction.js │ │ │ └── test_inn_folio_transaction.py │ │ ├── inn_folio_transaction_bundle │ │ │ ├── __init__.py │ │ │ ├── inn_folio_transaction_bundle.js │ │ │ ├── inn_folio_transaction_bundle.json │ │ │ ├── inn_folio_transaction_bundle.py │ │ │ ├── test_inn_folio_transaction_bundle.js │ │ │ └── test_inn_folio_transaction_bundle.py │ │ ├── inn_folio_transaction_bundle_detail │ │ │ ├── __init__.py │ │ │ ├── inn_folio_transaction_bundle_detail.json │ │ │ └── inn_folio_transaction_bundle_detail.py │ │ ├── inn_folio_transaction_type │ │ │ ├── __init__.py │ │ │ ├── inn_folio_transaction_type.js │ │ │ ├── inn_folio_transaction_type.json │ │ │ ├── inn_folio_transaction_type.py │ │ │ ├── test_inn_folio_transaction_type.js │ │ │ └── test_inn_folio_transaction_type.py │ │ ├── inn_group │ │ │ ├── __init__.py │ │ │ ├── inn_group.js │ │ │ ├── inn_group.json │ │ │ ├── inn_group.py │ │ │ ├── test_inn_group.js │ │ │ └── test_inn_group.py │ │ ├── inn_guest_booking │ │ │ ├── __init__.py │ │ │ ├── filter.py │ │ │ ├── inn_guest_booking.js │ │ │ ├── inn_guest_booking.json │ │ │ ├── inn_guest_booking.py │ │ │ └── test_inn_guest_booking.py │ │ ├── inn_guest_booking_room │ │ │ ├── __init__.py │ │ │ ├── inn_guest_booking_room.json │ │ │ └── inn_guest_booking_room.py │ │ ├── inn_hotels_setting │ │ │ ├── __init__.py │ │ │ ├── inn_hotels_setting.js │ │ │ ├── inn_hotels_setting.json │ │ │ ├── inn_hotels_setting.py │ │ │ ├── setting_data.py │ │ │ ├── test_inn_hotels_setting.js │ │ │ └── test_inn_hotels_setting.py │ │ ├── inn_key_card │ │ │ ├── __init__.py │ │ │ ├── inn_key_card.js │ │ │ ├── inn_key_card.json │ │ │ ├── inn_key_card.py │ │ │ ├── test_inn_key_card.js │ │ │ └── test_inn_key_card.py │ │ ├── inn_lost_and_found │ │ │ ├── __init__.py │ │ │ ├── inn_lost_and_found.js │ │ │ ├── inn_lost_and_found.json │ │ │ ├── inn_lost_and_found.py │ │ │ ├── test_inn_lost_and_found.js │ │ │ └── test_inn_lost_and_found.py │ │ ├── inn_membership_card │ │ │ ├── __init__.py │ │ │ ├── inn_membership_card.js │ │ │ ├── inn_membership_card.json │ │ │ ├── inn_membership_card.py │ │ │ ├── inn_membership_card_list.js │ │ │ ├── test_inn_membership_card.js │ │ │ └── test_inn_membership_card.py │ │ ├── inn_move_room │ │ │ ├── __init__.py │ │ │ ├── inn_move_room.js │ │ │ ├── inn_move_room.json │ │ │ ├── inn_move_room.py │ │ │ ├── test_inn_move_room.js │ │ │ └── test_inn_move_room.py │ │ ├── inn_package │ │ │ ├── __init__.py │ │ │ ├── inn_package.js │ │ │ ├── inn_package.json │ │ │ ├── inn_package.py │ │ │ ├── test_inn_package.js │ │ │ └── test_inn_package.py │ │ ├── inn_package_detail │ │ │ ├── __init__.py │ │ │ ├── inn_package_detail.js │ │ │ ├── inn_package_detail.json │ │ │ ├── inn_package_detail.py │ │ │ ├── test_inn_package_detail.js │ │ │ └── test_inn_package_detail.py │ │ ├── inn_package_detail_type │ │ │ ├── __init__.py │ │ │ ├── inn_package_detail_type.js │ │ │ ├── inn_package_detail_type.json │ │ │ ├── inn_package_detail_type.py │ │ │ ├── test_inn_package_detail_type.js │ │ │ └── test_inn_package_detail_type.py │ │ ├── inn_payment_with_settlement │ │ │ ├── __init__.py │ │ │ ├── inn_payment_with_settlement.js │ │ │ ├── inn_payment_with_settlement.json │ │ │ ├── inn_payment_with_settlement.py │ │ │ ├── inn_payment_with_settlement_list.js │ │ │ ├── test_inn_payment_with_settlement.js │ │ │ └── test_inn_payment_with_settlement.py │ │ ├── inn_point_of_sale_table │ │ │ ├── __init__.py │ │ │ ├── inn_point_of_sale_table.js │ │ │ ├── inn_point_of_sale_table.json │ │ │ ├── inn_point_of_sale_table.py │ │ │ ├── table_data.json │ │ │ └── test_inn_point_of_sale_table.py │ │ ├── inn_pos_usage │ │ │ ├── __init__.py │ │ │ ├── inn_extended_bill.py │ │ │ ├── inn_pos_usage.js │ │ │ ├── inn_pos_usage.json │ │ │ ├── inn_pos_usage.py │ │ │ └── test_inn_pos_usage.py │ │ ├── inn_pos_usage_item │ │ │ ├── __init__.py │ │ │ ├── inn_pos_usage_item.json │ │ │ └── inn_pos_usage_item.py │ │ ├── inn_reservation │ │ │ ├── __init__.py │ │ │ ├── inn_reservation.js │ │ │ ├── inn_reservation.json │ │ │ ├── inn_reservation.py │ │ │ ├── inn_reservation_card.py │ │ │ ├── inn_reservation_list.js │ │ │ ├── test_inn_reservation.js │ │ │ └── test_inn_reservation.py │ │ ├── inn_room │ │ │ ├── __init__.py │ │ │ ├── inn_room.js │ │ │ ├── inn_room.json │ │ │ ├── inn_room.py │ │ │ ├── inn_room_list.js │ │ │ ├── test_inn_room.js │ │ │ └── test_inn_room.py │ │ ├── inn_room_availability_page │ │ │ ├── __init__.py │ │ │ ├── inn_room_availability_page.js │ │ │ ├── inn_room_availability_page.json │ │ │ ├── inn_room_availability_page.py │ │ │ ├── test_inn_room_availability_page.js │ │ │ └── test_inn_room_availability_page.py │ │ ├── inn_room_booking │ │ │ ├── __init__.py │ │ │ ├── inn_room_booking.js │ │ │ ├── inn_room_booking.json │ │ │ ├── inn_room_booking.py │ │ │ ├── inn_room_card_owner.py │ │ │ ├── inn_room_card_owner_webcard.py │ │ │ ├── test_inn_room_booking.js │ │ │ └── test_inn_room_booking.py │ │ ├── inn_room_charge_posted │ │ │ ├── __init__.py │ │ │ ├── inn_room_charge_posted.json │ │ │ └── inn_room_charge_posted.py │ │ ├── inn_room_charge_posting │ │ │ ├── __init__.py │ │ │ ├── inn_room_charge_posting.js │ │ │ ├── inn_room_charge_posting.json │ │ │ ├── inn_room_charge_posting.py │ │ │ ├── test_inn_room_charge_posting.js │ │ │ └── test_inn_room_charge_posting.py │ │ ├── inn_room_charge_to_be_posted │ │ │ ├── __init__.py │ │ │ ├── inn_room_charge_to_be_posted.json │ │ │ └── inn_room_charge_to_be_posted.py │ │ ├── inn_room_rate │ │ │ ├── __init__.py │ │ │ ├── inn_room_rate.js │ │ │ ├── inn_room_rate.json │ │ │ ├── inn_room_rate.py │ │ │ ├── test_inn_room_rate.js │ │ │ └── test_inn_room_rate.py │ │ ├── inn_room_type │ │ │ ├── __init__.py │ │ │ ├── inn_room_type.js │ │ │ ├── inn_room_type.json │ │ │ ├── inn_room_type.py │ │ │ ├── test_inn_room_type.js │ │ │ └── test_inn_room_type.py │ │ ├── inn_room_type_availability_page │ │ │ ├── __init__.py │ │ │ ├── inn_room_type_availability_page.js │ │ │ ├── inn_room_type_availability_page.json │ │ │ ├── inn_room_type_availability_page.py │ │ │ ├── test_inn_room_type_availability_page.js │ │ │ └── test_inn_room_type_availability_page.py │ │ ├── inn_settlement_settings │ │ │ ├── __init__.py │ │ │ ├── inn_settlement_settings.js │ │ │ ├── inn_settlement_settings.json │ │ │ ├── inn_settlement_settings.py │ │ │ ├── test_inn_settlement_settings.js │ │ │ └── test_inn_settlement_settings.py │ │ ├── inn_shift │ │ │ ├── __init__.py │ │ │ ├── inn_shift.js │ │ │ ├── inn_shift.json │ │ │ ├── inn_shift.py │ │ │ ├── test_inn_shift.js │ │ │ └── test_inn_shift.py │ │ ├── inn_tax │ │ │ ├── __init__.py │ │ │ ├── inn_tax.js │ │ │ ├── inn_tax.json │ │ │ ├── inn_tax.py │ │ │ ├── test_inn_tax.js │ │ │ └── test_inn_tax.py │ │ ├── inn_tax_breakdown │ │ │ ├── __init__.py │ │ │ ├── inn_tax_breakdown.json │ │ │ └── inn_tax_breakdown.py │ │ ├── inn_void_folio_transaction │ │ │ ├── __init__.py │ │ │ ├── inn_void_folio_transaction.js │ │ │ ├── inn_void_folio_transaction.json │ │ │ ├── inn_void_folio_transaction.py │ │ │ ├── test_inn_void_folio_transaction.js │ │ │ └── test_inn_void_folio_transaction.py │ │ └── updated │ │ │ ├── __init__.py │ │ │ ├── test_updated.py │ │ │ ├── updated.js │ │ │ ├── updated.json │ │ │ └── updated.py │ ├── number_card │ │ ├── arrival │ │ │ └── arrival.json │ │ ├── check_out │ │ │ └── check_out.json │ │ ├── consolidated_order │ │ │ └── consolidated_order.json │ │ ├── inn_hotel_aar_room_sold │ │ │ └── inn_hotel_aar_room_sold.json │ │ ├── inn_hotel_available_room │ │ │ └── inn_hotel_available_room.json │ │ ├── inn_hotel_expected_departure │ │ │ └── inn_hotel_expected_departure.json │ │ ├── inn_hotel_out_of_order_room │ │ │ └── inn_hotel_out_of_order_room.json │ │ ├── inn_hotel_total_room_rate_sold │ │ │ └── inn_hotel_total_room_rate_sold.json │ │ ├── inn_hotel_total_room_sold │ │ │ └── inn_hotel_total_room_sold.json │ │ ├── inn_house │ │ │ └── inn_house.json │ │ ├── inn_room_clean │ │ │ └── inn_room_clean.json │ │ ├── inn_room_dirty │ │ │ └── inn_room_dirty.json │ │ ├── inn_room_not_available │ │ │ └── inn_room_not_available.json │ │ ├── inn_room_ready │ │ │ └── inn_room_ready.json │ │ ├── ongoing_order │ │ │ └── ongoing_order.json │ │ ├── returned_order │ │ │ └── returned_order.json │ │ ├── room_breakfast │ │ │ └── room_breakfast.json │ │ ├── room_only │ │ │ └── room_only.json │ │ └── total_order │ │ │ └── total_order.json │ ├── page │ │ ├── __init__.py │ │ ├── inn_pos_table │ │ │ ├── __init__.py │ │ │ ├── inn_pos_table.js │ │ │ └── inn_pos_table.json │ │ └── pos_extended │ │ │ ├── __init__.py │ │ │ ├── pos_extended.js │ │ │ ├── pos_extended.json │ │ │ ├── pos_extended.py │ │ │ ├── pos_extended_itemcart.js │ │ │ ├── pos_extended_pastorderlist.js │ │ │ ├── pos_extended_pastordersummary.js │ │ │ └── pos_extended_payment.js │ ├── print_format │ │ ├── __init__.py │ │ ├── cash_remittance │ │ │ ├── __init__.py │ │ │ └── cash_remittance.json │ │ ├── cashier_report │ │ │ ├── __init__.py │ │ │ └── cashier_report.json │ │ ├── check_in_receipt │ │ │ ├── __init__.py │ │ │ └── check_in_receipt.json │ │ ├── dropshipping_format_extende │ │ │ ├── __init__.py │ │ │ └── dropshipping_format_extende.json │ │ ├── folio_a │ │ │ ├── __init__.py │ │ │ └── folio_a.json │ │ ├── folio_a_commission │ │ │ ├── __init__.py │ │ │ └── folio_a_commission.json │ │ ├── folio_a_with_header │ │ │ ├── __init__.py │ │ │ └── folio_a_with_header.json │ │ ├── folio_b │ │ │ ├── __init__.py │ │ │ └── folio_b.json │ │ ├── folio_c │ │ │ ├── __init__.py │ │ │ └── folio_c.json │ │ ├── last_purchase_request_comparison │ │ │ ├── __init__.py │ │ │ └── last_purchase_request_comparison.json │ │ ├── pos_extended_bill │ │ │ ├── __init__.py │ │ │ └── pos_extended_bill.json │ │ ├── pos_extended_captain_order │ │ │ ├── __init__.py │ │ │ └── pos_extended_captain_order.json │ │ ├── pos_extended_invoice │ │ │ ├── __init__.py │ │ │ └── pos_extended_invoice.json │ │ ├── pos_extended_table_order │ │ │ ├── __init__.py │ │ │ └── pos_extended_table_order.json │ │ ├── proforma_invoice │ │ │ ├── __init__.py │ │ │ └── proforma_invoice.json │ │ ├── proforma_invoice_reservation │ │ │ ├── __init__.py │ │ │ └── proforma_invoice_reservation.json │ │ └── reservation_confirmation │ │ │ ├── __init__.py │ │ │ └── reservation_confirmation.json │ ├── report │ │ ├── __init__.py │ │ ├── audit_report │ │ │ ├── __init__.py │ │ │ ├── audit_report.js │ │ │ ├── audit_report.json │ │ │ └── audit_report.py │ │ ├── daily_flash_report │ │ │ ├── __init__.py │ │ │ ├── daily_flash_report.html │ │ │ ├── daily_flash_report.js │ │ │ ├── daily_flash_report.json │ │ │ └── daily_flash_report.py │ │ ├── guest_in_house │ │ │ ├── __init__.py │ │ │ └── guest_in_house.json │ │ ├── report_pnl │ │ │ ├── __init__.py │ │ │ ├── report_pnl.html │ │ │ ├── report_pnl.js │ │ │ ├── report_pnl.json │ │ │ └── report_pnl.py │ │ ├── room_discrepancy │ │ │ ├── __init__.py │ │ │ ├── room_discrepancy.html │ │ │ ├── room_discrepancy.js │ │ │ ├── room_discrepancy.json │ │ │ └── room_discrepancy.py │ │ └── room_occupancy │ │ │ ├── __init__.py │ │ │ ├── room_occupancy.js │ │ │ ├── room_occupancy.json │ │ │ └── room_occupancy.py │ ├── web_form │ │ ├── __init__.py │ │ └── room_booking │ │ │ ├── __init__.py │ │ │ ├── room_booking.js │ │ │ ├── room_booking.json │ │ │ └── room_booking.py │ └── workspace │ │ ├── operations │ │ └── operations.json │ │ ├── pos_restaurant │ │ └── pos_restaurant.json │ │ └── reservation │ │ └── reservation.json ├── modules.txt ├── overrides │ ├── __init__.py │ ├── customer.py │ └── erpnext │ │ ├── __init__.py │ │ └── accounts │ │ ├── __init__.py │ │ ├── pos_closing_entry │ │ ├── __init__.py │ │ └── pos_closing_entry.py │ │ ├── pos_invoice │ │ ├── __init__.py │ │ └── pos_invoice.py │ │ └── purchase_order │ │ ├── __init__.py │ │ └── purchase_order.py ├── patches.txt ├── public │ ├── .gitignore │ ├── css │ │ ├── inn.bundle.scss │ │ └── style.bundle.scss │ ├── dist │ │ ├── css-rtl │ │ │ ├── main.bundle.HZ76Z3LM.css │ │ │ └── main.bundle.HZ76Z3LM.css.map │ │ └── css │ │ │ ├── main.bundle.2GB6FCNV.css │ │ │ └── main.bundle.2GB6FCNV.css.map │ └── js │ │ ├── inn-pos.bundle.js │ │ ├── pos-closing-entry │ │ └── pos-closing-entry.js │ │ └── purchase-order │ │ └── purchase-order.js └── templates │ ├── __init__.py │ ├── emails │ ├── app.py │ └── booking_email.html │ └── pages │ └── __init__.py ├── license.txt ├── requirements.txt └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | inn/docs/current 7 | .idea 8 | .idea/.gitignore 9 | venv 10 | .vscode/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Purwanto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include requirements.txt 3 | include *.json 4 | include *.md 5 | include *.py 6 | include *.txt 7 | recursive-include inn *.css 8 | recursive-include inn *.csv 9 | recursive-include inn *.html 10 | recursive-include inn *.ico 11 | recursive-include inn *.js 12 | recursive-include inn *.json 13 | recursive-include inn *.md 14 | recursive-include inn *.png 15 | recursive-include inn *.py 16 | recursive-include inn *.svg 17 | recursive-include inn *.txt 18 | recursive-exclude inn *.pyc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # front-desk 2 | 3 | Front Desk (Hotel Front Office) implemented on top of ERP Next 4 | 5 | ### Notes 6 | -------------------------------------------------------------------------------- /inn/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | __version__ = '1.1.26' 5 | -------------------------------------------------------------------------------- /inn/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/config/__init__.py -------------------------------------------------------------------------------- /inn/config/desktop.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from frappe import _ 4 | 5 | def get_data(): 6 | return [ 7 | { 8 | "module_name": "Inn Hotels", 9 | "color": "blue", 10 | "icon": "octicon octicon-book", 11 | "type": "module", 12 | "label": _("Inn Hotels") 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /inn/config/docs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Configuration for docs 3 | """ 4 | 5 | # source_link = "https://github.com/[org_name]/inn" 6 | # docs_base_url = "https://[org_name].github.io/inn" 7 | # headline = "App that does everything" 8 | # sub_heading = "Yes, you got that right the first time, everything" 9 | 10 | def get_context(context): 11 | context.brand_html = "Inn Hotels" 12 | -------------------------------------------------------------------------------- /inn/helper/__init__.py: -------------------------------------------------------------------------------- 1 | from inn.helper.daterange import daterange -------------------------------------------------------------------------------- /inn/helper/daterange.py: -------------------------------------------------------------------------------- 1 | from datetime import timedelta, date, datetime 2 | 3 | def daterange(start_date: datetime, end_date: datetime) -> list[date]: 4 | for n in range(int((end_date - start_date).days)): 5 | yield start_date + timedelta(n) -------------------------------------------------------------------------------- /inn/helper/general.py: -------------------------------------------------------------------------------- 1 | from werkzeug.wrappers import Response 2 | import json 3 | import frappe 4 | 5 | @frappe.whitelist() 6 | def get_role(): 7 | return frappe.get_roles(frappe.session.user) 8 | 9 | 10 | @frappe.whitelist() 11 | def get_default_company(): 12 | company = frappe.db.get_single_value("Global Defaults", "default_company") 13 | data = { 14 | "data" : { 15 | "default_company": company 16 | } 17 | } 18 | response = Response() 19 | response.data = json.dumps(data) 20 | response.headers["Content-Type"] = "application/json" 21 | return response 22 | -------------------------------------------------------------------------------- /inn/helper/role.py: -------------------------------------------------------------------------------- 1 | 2 | import frappe 3 | import json 4 | from pathlib import Path 5 | 6 | @frappe.whitelist() 7 | def insert_role(): 8 | path = Path(__file__).with_name("role.json") 9 | with path.open("r") as file: 10 | data = json.load(file) 11 | file.close() 12 | 13 | create_role(data["role"]) 14 | create_role_profile(data["role_profile"]) 15 | frappe.msgprint("Generating Role and Role Profile Success") 16 | return 17 | 18 | def create_role(roles): 19 | 20 | for group in roles: 21 | group_name = group["group"] 22 | print(f"FROM GROUP: {group_name}") 23 | for role in group["roles"]: 24 | role_name = role["name"] 25 | 26 | if not frappe.db.exists("Role", role_name): 27 | print(f"----CREATING ROLE: {role_name}") 28 | 29 | doc_role = frappe.new_doc("Role") 30 | doc_role.search_bar = True 31 | doc_role.desk_access = True 32 | doc_role.list_sidebar = True 33 | doc_role.dashboard = True 34 | doc_role.role_name = role_name 35 | 36 | doc_role.insert() 37 | else: 38 | print(f"----ROLE {role_name} already exists!") 39 | 40 | def create_role_profile(profiles): 41 | 42 | for profile in profiles: 43 | profile_name = profile["name"] 44 | 45 | if not frappe.db.exists("Role Profile", profile_name): 46 | print(f"CREATING ROLE PROFILE: {profile_name}") 47 | 48 | profile_doc = frappe.new_doc("Role Profile") 49 | profile_doc.role_profile = profile_name 50 | 51 | for role in profile["roles_assigned"]: 52 | role_name = role["name"] 53 | print(f"----APPEND ROLE: {role_name}") 54 | role_doc = frappe.new_doc("Has Role") 55 | role_doc.role = role_name 56 | role_doc.parentfield = "roles" 57 | role_doc.parent = profile_doc.name 58 | role_doc.parenttype = "Role Profile" 59 | profile_doc.roles.append(role_doc) 60 | 61 | profile_doc.save() -------------------------------------------------------------------------------- /inn/inn_hotels/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/ar_city_ledger/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger/ar_city_ledger.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('AR City Ledger', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger/ar_city_ledger.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class ARCityLedger(Document): 10 | pass 11 | 12 | @frappe.whitelist() 13 | def get_folio_from_ar_city_ledger(selector = None, channel = None, group = None, customer_id = None): 14 | filters=[['is_paid', '=', 0]] 15 | return_list = [] 16 | folio_list = [] 17 | if channel: 18 | filters.append(['inn_channel_id', '=', channel]) 19 | if group: 20 | filters.append(['inn_group_id', '=', group]) 21 | # if customer_id: 22 | # filters.append(['customer_id', '=', customer_id]) 23 | 24 | for item in frappe.get_all('AR City Ledger', filters = filters, fields = ['*']): 25 | if not frappe.db.exists('AR City Ledger Invoice Folio', {'ar_city_ledger_id': item.name}): 26 | return_list.append(item) 27 | folio_list.append(item.folio_id) 28 | 29 | if selector == 'Folio': 30 | return folio_list 31 | elif selector == 'AR City Ledger': 32 | return return_list 33 | else: 34 | return return_list, folio_list 35 | 36 | @frappe.whitelist() 37 | def get_ar_city_ledger_by_folio(folio_id): 38 | name = frappe.db.get_value('AR City Ledger', {'folio_id': folio_id }, 'name') 39 | return frappe.get_doc('AR City Ledger', name) -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger/test_ar_city_ledger.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: AR City Ledger", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new AR City Ledger 13 | () => frappe.tests.make('AR City Ledger', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger/test_ar_city_ledger.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestARCityLedger(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/ar_city_ledger_invoice/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice/test_ar_city_ledger_invoice.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: AR City Ledger Invoice", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new AR City Ledger Invoice 13 | () => frappe.tests.make('AR City Ledger Invoice', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice/test_ar_city_ledger_invoice.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestARCityLedgerInvoice(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/ar_city_ledger_invoice_folio.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('AR City Ledger Invoice Folio', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/ar_city_ledger_invoice_folio.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-04-28 11:20:32.762037", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "folio_id", 9 | "customer_id", 10 | "amount", 11 | "open", 12 | "close", 13 | "ar_city_ledger_id" 14 | ], 15 | "fields": [ 16 | { 17 | "fieldname": "folio_id", 18 | "fieldtype": "Link", 19 | "in_list_view": 1, 20 | "label": "Folio", 21 | "options": "Inn Folio" 22 | }, 23 | { 24 | "fetch_from": "ar_city_ledger_id.customer_id", 25 | "fieldname": "customer_id", 26 | "fieldtype": "Link", 27 | "in_list_view": 1, 28 | "label": "Customer", 29 | "options": "Customer", 30 | "read_only": 1 31 | }, 32 | { 33 | "fieldname": "amount", 34 | "fieldtype": "Currency", 35 | "in_list_view": 1, 36 | "label": "Amount", 37 | "read_only": 1 38 | }, 39 | { 40 | "fieldname": "open", 41 | "fieldtype": "Date", 42 | "in_list_view": 1, 43 | "label": "Open", 44 | "read_only": 1 45 | }, 46 | { 47 | "fieldname": "close", 48 | "fieldtype": "Date", 49 | "in_list_view": 1, 50 | "label": "Close", 51 | "read_only": 1 52 | }, 53 | { 54 | "fieldname": "ar_city_ledger_id", 55 | "fieldtype": "Link", 56 | "label": "AR City Ledger", 57 | "options": "AR City Ledger", 58 | "read_only": 1 59 | } 60 | ], 61 | "istable": 1, 62 | "links": [], 63 | "modified": "2024-07-16 10:41:26.062210", 64 | "modified_by": "Administrator", 65 | "module": "Inn Hotels", 66 | "name": "AR City Ledger Invoice Folio", 67 | "owner": "Administrator", 68 | "permissions": [], 69 | "quick_entry": 1, 70 | "sort_field": "modified", 71 | "sort_order": "DESC", 72 | "states": [], 73 | "track_changes": 1 74 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/ar_city_ledger_invoice_folio.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class ARCityLedgerInvoiceFolio(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/test_ar_city_ledger_invoice_folio.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: AR City Ledger Invoice Folio", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new AR City Ledger Invoice Folio 13 | () => frappe.tests.make('AR City Ledger Invoice Folio', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_folio/test_ar_city_ledger_invoice_folio.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestARCityLedgerInvoiceFolio(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_payments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/ar_city_ledger_invoice_payments/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_payments/ar_city_ledger_invoice_payments.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('AR City Ledger Invoice Payments', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_payments/ar_city_ledger_invoice_payments.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class ARCityLedgerInvoicePayments(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_payments/test_ar_city_ledger_invoice_payments.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: AR City Ledger Invoice Payments", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new AR City Ledger Invoice Payments 13 | () => frappe.tests.make('AR City Ledger Invoice Payments', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/ar_city_ledger_invoice_payments/test_ar_city_ledger_invoice_payments.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestARCityLedgerInvoicePayments(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/bed_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/bed_type/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/bed_type/bed_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Bed Type', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/bed_type/bed_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class BedType(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/bed_type/test_bed_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Bed Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Bed Type 13 | () => frappe.tests.make('Bed Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/bed_type/test_bed_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestBedType(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_amenities/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities/inn_amenities.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Amenities', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities/inn_amenities.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "format:{###}_{item}", 5 | "creation": "2020-02-26 17:24:36.214036", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "item", 11 | "item_name", 12 | "qty" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "item", 17 | "fieldtype": "Link", 18 | "in_list_view": 1, 19 | "label": "Item Code", 20 | "options": "Item", 21 | "reqd": 1 22 | }, 23 | { 24 | "fieldname": "item_name", 25 | "fieldtype": "Data", 26 | "label": "Item Name" 27 | }, 28 | { 29 | "fieldname": "qty", 30 | "fieldtype": "Data", 31 | "in_list_view": 1, 32 | "label": "Quantity" 33 | } 34 | ], 35 | "istable": 1, 36 | "links": [], 37 | "modified": "2023-12-20 16:06:23.630819", 38 | "modified_by": "Administrator", 39 | "module": "Inn Hotels", 40 | "name": "Inn Amenities", 41 | "naming_rule": "Expression", 42 | "owner": "Administrator", 43 | "permissions": [], 44 | "quick_entry": 1, 45 | "sort_field": "modified", 46 | "sort_order": "DESC", 47 | "states": [], 48 | "track_changes": 1 49 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities/inn_amenities.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnAmenities(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities/test_inn_amenities.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Amenities", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Amenities 13 | () => frappe.tests.make('Inn Amenities', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities/test_inn_amenities.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnAmenities(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_amenities_type/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities_type/inn_amenities_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Amenities Type', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities_type/inn_amenities_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_import": 1, 4 | "allow_rename": 1, 5 | "autoname": "Prompt", 6 | "creation": "2020-02-26 17:29:45.925709", 7 | "doctype": "DocType", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "room_type", 12 | "description", 13 | "amenities" 14 | ], 15 | "fields": [ 16 | { 17 | "fieldname": "room_type", 18 | "fieldtype": "Link", 19 | "in_list_view": 1, 20 | "label": "Room Type", 21 | "options": "Inn Room Type" 22 | }, 23 | { 24 | "fieldname": "description", 25 | "fieldtype": "Small Text", 26 | "in_list_view": 1, 27 | "label": "Description" 28 | }, 29 | { 30 | "fieldname": "amenities", 31 | "fieldtype": "Table", 32 | "label": "Amenities List", 33 | "options": "Inn Amenities" 34 | } 35 | ], 36 | "links": [], 37 | "modified": "2024-03-14 11:40:56.910057", 38 | "modified_by": "Administrator", 39 | "module": "Inn Hotels", 40 | "name": "Inn Amenities Type", 41 | "naming_rule": "Set by user", 42 | "owner": "Administrator", 43 | "permissions": [ 44 | { 45 | "create": 1, 46 | "delete": 1, 47 | "email": 1, 48 | "export": 1, 49 | "print": 1, 50 | "read": 1, 51 | "report": 1, 52 | "role": "System Manager", 53 | "share": 1, 54 | "write": 1 55 | }, 56 | { 57 | "email": 1, 58 | "export": 1, 59 | "print": 1, 60 | "read": 1, 61 | "report": 1, 62 | "role": "All", 63 | "share": 1 64 | }, 65 | { 66 | "create": 1, 67 | "delete": 1, 68 | "email": 1, 69 | "export": 1, 70 | "print": 1, 71 | "read": 1, 72 | "report": 1, 73 | "role": "Hotel Manager", 74 | "share": 1, 75 | "write": 1 76 | } 77 | ], 78 | "quick_entry": 1, 79 | "search_fields": "room_type", 80 | "sort_field": "modified", 81 | "sort_order": "DESC", 82 | "states": [], 83 | "track_changes": 1 84 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities_type/inn_amenities_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnAmenitiesType(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities_type/test_inn_amenities_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Amenities Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Amenities Type 13 | () => frappe.tests.make('Inn Amenities Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_amenities_type/test_inn_amenities_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnAmenitiesType(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_audit_log/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_audit_log/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_audit_log/inn_audit_log.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Audit Log', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_audit_log/inn_audit_log.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnAuditLog(Document): 10 | pass 11 | 12 | @frappe.whitelist() 13 | def get_last_audit_date(): 14 | d = frappe.get_all('Inn Audit Log', order_by='creation desc', limit_page_length=1) 15 | if d: 16 | return frappe.get_doc('Inn Audit Log', d[0].name).audit_date 17 | else: 18 | return None -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_audit_log/test_inn_audit_log.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Audit Log", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Audit Log 13 | () => frappe.tests.make('Inn Audit Log', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_audit_log/test_inn_audit_log.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnAuditLog(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_bed_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_bed_type/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_bed_type/inn_bed_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Bed Type', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_bed_type/inn_bed_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_import": 1, 4 | "allow_rename": 1, 5 | "autoname": "Prompt", 6 | "creation": "2020-02-25 16:52:42.440207", 7 | "doctype": "DocType", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "description" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "description", 16 | "fieldtype": "Data", 17 | "label": "Description" 18 | } 19 | ], 20 | "links": [], 21 | "modified": "2024-03-14 11:43:08.211678", 22 | "modified_by": "Administrator", 23 | "module": "Inn Hotels", 24 | "name": "Inn Bed Type", 25 | "naming_rule": "Set by user", 26 | "owner": "Administrator", 27 | "permissions": [ 28 | { 29 | "create": 1, 30 | "delete": 1, 31 | "email": 1, 32 | "export": 1, 33 | "print": 1, 34 | "read": 1, 35 | "report": 1, 36 | "role": "System Manager", 37 | "share": 1, 38 | "write": 1 39 | }, 40 | { 41 | "email": 1, 42 | "export": 1, 43 | "print": 1, 44 | "read": 1, 45 | "report": 1, 46 | "role": "Hotel Reservation User", 47 | "share": 1 48 | }, 49 | { 50 | "create": 1, 51 | "delete": 1, 52 | "email": 1, 53 | "export": 1, 54 | "print": 1, 55 | "read": 1, 56 | "report": 1, 57 | "role": "Hotel Manager", 58 | "share": 1, 59 | "write": 1 60 | }, 61 | { 62 | "email": 1, 63 | "export": 1, 64 | "print": 1, 65 | "read": 1, 66 | "report": 1, 67 | "role": "Housekeeping", 68 | "share": 1 69 | }, 70 | { 71 | "email": 1, 72 | "export": 1, 73 | "print": 1, 74 | "read": 1, 75 | "report": 1, 76 | "role": "Housekeeping Assistant", 77 | "share": 1, 78 | "write": 1 79 | }, 80 | { 81 | "create": 1, 82 | "delete": 1, 83 | "email": 1, 84 | "export": 1, 85 | "print": 1, 86 | "read": 1, 87 | "report": 1, 88 | "role": "Housekeeping Supervisor", 89 | "share": 1, 90 | "write": 1 91 | } 92 | ], 93 | "quick_entry": 1, 94 | "sort_field": "modified", 95 | "sort_order": "DESC", 96 | "states": [], 97 | "track_changes": 1 98 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_bed_type/inn_bed_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnBedType(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_bed_type/test_inn_bed_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Bed Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Bed Type 13 | () => frappe.tests.make('Inn Bed Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_bed_type/test_inn_bed_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnBedType(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cc_detail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_cc_detail/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cc_detail/inn_cc_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnCCDetail(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_channel/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel/inn_channel.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Channel', { 5 | refresh: function (frm) { 6 | toggleField(frm) 7 | }, 8 | profit_sharing: function (frm) { 9 | toggleField(frm) 10 | } 11 | }); 12 | 13 | 14 | function toggleField(frm) { 15 | if (frm.doc.profit_sharing == 1) { 16 | frm.set_df_property("profit_sharing_amount", "hidden", 0) 17 | frm.set_df_property("sharing_type", "hidden", 0) 18 | frm.set_df_property("supplier", "hidden", 0) 19 | 20 | frm.set_df_property("profit_sharing_amount", "reqd", 1) 21 | frm.set_df_property("sharing_type", "reqd", 1) 22 | frm.set_df_property("supplier", "reqd", 1) 23 | } else if (frm.doc.profit_sharing == 0) { 24 | frm.set_df_property("profit_sharing_amount", "hidden", 1) 25 | frm.set_df_property("sharing_type", "hidden", 1) 26 | frm.set_df_property("supplier", "hidden", 1) 27 | 28 | frm.set_df_property("profit_sharing_amount", "reqd", 0) 29 | frm.set_df_property("sharing_type", "reqd", 0) 30 | frm.set_df_property("supplier", "reqd", 0) 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel/test_inn_channel.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Channel", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Channel 13 | () => frappe.tests.make('Inn Channel', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel/test_inn_channel.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnChannel(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel_tax_exclude/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_channel_tax_exclude/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel_tax_exclude/inn_channel_tax_exclude.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2024-08-13 13:30:03.559418", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "channel" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "channel", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Channel", 17 | "options": "Inn Channel", 18 | "reqd": 1 19 | } 20 | ], 21 | "index_web_pages_for_search": 1, 22 | "istable": 1, 23 | "links": [], 24 | "modified": "2024-08-13 13:31:30.038468", 25 | "modified_by": "Administrator", 26 | "module": "Inn Hotels", 27 | "name": "Inn Channel Tax Exclude", 28 | "owner": "Administrator", 29 | "permissions": [], 30 | "sort_field": "modified", 31 | "sort_order": "DESC", 32 | "states": [] 33 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_channel_tax_exclude/inn_channel_tax_exclude.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class InnChannelTaxExclude(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_payment_detail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_cr_payment_detail/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_payment_detail/inn_cr_payment_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnCRPaymentDetail(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_payment_transaction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_cr_payment_transaction/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_payment_transaction/inn_cr_payment_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnCRPaymentTransaction(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_refund_detail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_cr_refund_detail/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_refund_detail/inn_cr_refund_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnCRRefundDetail(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_refund_transaction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_cr_refund_transaction/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_cr_refund_transaction/inn_cr_refund_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnCRRefundTransaction(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_customer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_customer/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_customer/inn_customer.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on("Inn Customer", { 5 | refresh(frm) { 6 | fieldToggle(frm) 7 | }, 8 | after_save(frm) { 9 | let path = "/app/inn-reservation/new" 10 | window.location.href = window.location.protocol + "//" + window.location.host + path 11 | } 12 | }); 13 | 14 | function fieldToggle(frm) { 15 | console.log(frm.doc.__islocal) 16 | if (frm.doc.__islocal === 1) { 17 | frm.set_df_property('supplier_name', 'hidden', 1); 18 | frm.set_df_property('customer', 'hidden', 1); 19 | } else { 20 | frm.set_df_property('supplier_name', 'read_only', 1); 21 | frm.set_df_property('customer_name', 'read_only', 1); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_customer/inn_customer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class InnCustomer(Document): 9 | pass 10 | 11 | def before_insert(self, *args, **kwargs): 12 | 13 | doc_supp_group = frappe.db.get_single_value(doctype="Inn Hotels Setting", fieldname="inn_customer_group_as_supplier") 14 | if doc_supp_group == None: 15 | doc_supp_group == "" 16 | 17 | doc_sup = frappe.new_doc("Supplier") 18 | doc_sup.supplier_name = self.customer_name 19 | doc_sup.supplier_type = self.customer_type 20 | doc_sup.supplier_group = doc_supp_group 21 | doc_sup.save() 22 | 23 | self.supplier_name = doc_sup.name 24 | 25 | def after_delete(self, *args, **kwargs): 26 | frappe.db.delete("Customer", {"customer_name": self.customer_name}) 27 | frappe.db.delete("Supplier", {"supplier_name": self.customer_name}) 28 | 29 | 30 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_customer/test_inn_customer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestInnCustomer(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_dayend_close/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_dayend_close/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_dayend_close/inn_dayend_close_helper.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | 3 | 4 | def _fill_party_account(doc_id: str, party_in: str) -> tuple[str, str]: 5 | """Return party type is Customer or Supplier 6 | by querying to Account database and check its account type if its 7 | Receiveable (return Customer) or Payable (return Supplier) 8 | 9 | Parameters 10 | ---- 11 | doc_id : str, account id 12 | Account identifier 13 | 14 | party : str, party name 15 | Party name will be echoed if account type is Receiveable or Payable 16 | 17 | """ 18 | party_type = "" 19 | party = "" 20 | doc_jea_type_account = frappe.get_doc("Account", doc_id) 21 | match doc_jea_type_account.account_type: 22 | case "Receivable": 23 | party_type = 'Customer' 24 | party = party_in 25 | case "Payable": 26 | party_type = 'Supplier' 27 | party = party_in 28 | # print('--from _fill_party_account') 29 | # print('account: '+ doc_id) 30 | # print('account type: ' + doc_jea_type_account.account_type) 31 | # print("party type: " + party_type) 32 | # print("party: " + party) 33 | # print('--endfrom') 34 | 35 | return party_type, party -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_dayend_close/test_inn_dayend_close.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Dayend Close", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Dayend Close 13 | () => frappe.tests.make('Inn Dayend Close', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_dayend_close/test_inn_dayend_close.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnDayendClose(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_employee_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_employee_details/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_employee_details/inn_employee_details.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Employee Details', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_employee_details/inn_employee_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2021-08-18 12:45:48.399422", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "employee_id", 9 | "employee_signature" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "employee_id", 14 | "fieldtype": "Link", 15 | "label": "Employee", 16 | "options": "Employee" 17 | }, 18 | { 19 | "fieldname": "employee_signature", 20 | "fieldtype": "Attach Image", 21 | "label": "Signature" 22 | } 23 | ], 24 | "links": [], 25 | "modified": "2024-03-14 11:43:38.909081", 26 | "modified_by": "Administrator", 27 | "module": "Inn Hotels", 28 | "name": "Inn Employee Details", 29 | "owner": "Administrator", 30 | "permissions": [ 31 | { 32 | "create": 1, 33 | "delete": 1, 34 | "email": 1, 35 | "export": 1, 36 | "print": 1, 37 | "read": 1, 38 | "report": 1, 39 | "role": "System Manager", 40 | "share": 1, 41 | "write": 1 42 | }, 43 | { 44 | "create": 1, 45 | "delete": 1, 46 | "email": 1, 47 | "export": 1, 48 | "if_owner": 1, 49 | "print": 1, 50 | "read": 1, 51 | "report": 1, 52 | "role": "All", 53 | "share": 1, 54 | "write": 1 55 | } 56 | ], 57 | "quick_entry": 1, 58 | "sort_field": "modified", 59 | "sort_order": "DESC", 60 | "states": [], 61 | "track_changes": 1 62 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_employee_details/inn_employee_details.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnEmployeeDetails(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_employee_details/test_inn_employee_details.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Employee Details", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Employee Details 13 | () => frappe.tests.make('Inn Employee Details', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_employee_details/test_inn_employee_details.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnEmployeeDetails(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_expected_arrived_today/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_expected_arrived_today/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_expected_arrived_today/inn_expected_arrived_today.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnExpectedArrivedToday(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_expected_closed_today/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_expected_closed_today/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_expected_closed_today/inn_expected_closed_today.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnExpectedClosedToday(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_expected_departed_today/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_expected_departed_today/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_expected_departed_today/inn_expected_departed_today.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnExpectedDepartedToday(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_floor_plan/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_floor_plan/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_floor_plan/inn_floor_plan.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_events_in_timeline": 0, 4 | "allow_guest_to_view": 0, 5 | "allow_import": 0, 6 | "allow_rename": 0, 7 | "beta": 0, 8 | "creation": "2020-02-27 11:36:22.534459", 9 | "custom": 0, 10 | "docstatus": 0, 11 | "doctype": "DocType", 12 | "document_type": "", 13 | "editable_grid": 1, 14 | "engine": "InnoDB", 15 | "fields": [ 16 | { 17 | "allow_bulk_edit": 0, 18 | "allow_in_quick_entry": 0, 19 | "allow_on_submit": 0, 20 | "bold": 0, 21 | "collapsible": 0, 22 | "columns": 0, 23 | "fetch_if_empty": 0, 24 | "fieldname": "html", 25 | "fieldtype": "HTML", 26 | "hidden": 0, 27 | "ignore_user_permissions": 0, 28 | "ignore_xss_filter": 0, 29 | "in_filter": 0, 30 | "in_global_search": 0, 31 | "in_list_view": 0, 32 | "in_standard_filter": 0, 33 | "length": 0, 34 | "no_copy": 0, 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 0, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 0 47 | } 48 | ], 49 | "has_web_view": 0, 50 | "hide_heading": 0, 51 | "hide_toolbar": 0, 52 | "idx": 0, 53 | "image_view": 0, 54 | "in_create": 0, 55 | "is_submittable": 0, 56 | "issingle": 1, 57 | "istable": 0, 58 | "max_attachments": 0, 59 | "modified": "2020-02-27 11:36:27.223215", 60 | "modified_by": "Administrator", 61 | "module": "Inn Hotels", 62 | "name": "Inn Floor Plan", 63 | "name_case": "", 64 | "owner": "Administrator", 65 | "permissions": [ 66 | { 67 | "amend": 0, 68 | "cancel": 0, 69 | "create": 1, 70 | "delete": 1, 71 | "email": 1, 72 | "export": 0, 73 | "if_owner": 0, 74 | "import": 0, 75 | "permlevel": 0, 76 | "print": 1, 77 | "read": 1, 78 | "report": 0, 79 | "role": "System Manager", 80 | "set_user_permissions": 0, 81 | "share": 1, 82 | "submit": 0, 83 | "write": 1 84 | } 85 | ], 86 | "quick_entry": 1, 87 | "read_only": 0, 88 | "read_only_onload": 0, 89 | "show_name_in_global_search": 0, 90 | "sort_field": "modified", 91 | "sort_order": "DESC", 92 | "track_changes": 0, 93 | "track_seen": 0, 94 | "track_views": 0 95 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_floor_plan/inn_floor_plan.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnFloorPlan(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_floor_plan/test_inn_floor_plan.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Floor Plan", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Floor Plan 13 | () => frappe.tests.make('Inn Floor Plan', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_floor_plan/test_inn_floor_plan.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnFloorPlan(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_folio/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio/test_inn_folio.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Folio", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Folio 13 | () => frappe.tests.make('Inn Folio', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio/test_inn_folio.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnFolio(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_folio_transaction/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction/test_inn_folio_transaction.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Folio Transaction", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Folio Transaction 13 | () => frappe.tests.make('Inn Folio Transaction', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction/test_inn_folio_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnFolioTransaction(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_folio_transaction_bundle/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle/inn_folio_transaction_bundle.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Folio Transaction Bundle', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle/inn_folio_transaction_bundle.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnFolioTransactionBundle(Document): 10 | pass 11 | 12 | @frappe.whitelist() 13 | def get_trx_list(trx_id, len_only=False): 14 | trx = frappe.get_doc('Inn Folio Transaction', trx_id) 15 | if trx.ftb_id: 16 | if len_only: 17 | return len(frappe.get_all('Inn Folio Transaction', filters={'ftb_id': trx.ftb_id})) 18 | else: 19 | return frappe.get_all('Inn Folio Transaction', filters={'ftb_id': trx.ftb_id}, fields=['name']) 20 | else: 21 | if len_only: 22 | return 1 23 | else: 24 | return [trx_id] -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle/test_inn_folio_transaction_bundle.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Folio Transaction Bundle", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Folio Transaction Bundle 13 | () => frappe.tests.make('Inn Folio Transaction Bundle', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle/test_inn_folio_transaction_bundle.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnFolioTransactionBundle(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle_detail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_folio_transaction_bundle_detail/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_bundle_detail/inn_folio_transaction_bundle_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnFolioTransactionBundleDetail(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_folio_transaction_type/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_type/inn_folio_transaction_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Folio Transaction Type', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_type/inn_folio_transaction_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnFolioTransactionType(Document): 10 | pass 11 | 12 | @frappe.whitelist() 13 | def get_filtered(type): 14 | return_list = [] 15 | type_list = frappe.get_all('Inn Folio Transaction Type', filters=[['type', '=', type]], fields=['name']) 16 | for item in type_list: 17 | return_list.append(item.name) 18 | return return_list 19 | 20 | @frappe.whitelist() 21 | def get_accounts_from_id(id): 22 | doc = frappe.get_doc('Inn Folio Transaction Type', id) 23 | return doc.debit_account, doc.credit_account 24 | 25 | @frappe.whitelist() 26 | def get_transaction_type(type): 27 | return_list = [] 28 | type_list = frappe.get_all('Inn Folio Transaction Type', 29 | filters=[['type', '=', type], ['is_included', '=', 1]], 30 | fields=['name']) 31 | for item in type_list: 32 | option_item = {'label': item.name, 'value': item.name} 33 | return_list.append(option_item) 34 | return return_list 35 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_type/test_inn_folio_transaction_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Folio Transaction Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Folio Transaction Type 13 | () => frappe.tests.make('Inn Folio Transaction Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_folio_transaction_type/test_inn_folio_transaction_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnFolioTransactionType(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_group/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_group/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_group/inn_group.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Group', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_group/inn_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_import": 1, 4 | "allow_rename": 1, 5 | "autoname": "Prompt", 6 | "creation": "2020-02-25 16:59:45.321271", 7 | "doctype": "DocType", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "customer_id", 12 | "disabled" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "customer_id", 17 | "fieldtype": "Link", 18 | "label": "Customer", 19 | "options": "Customer" 20 | }, 21 | { 22 | "default": "0", 23 | "fieldname": "disabled", 24 | "fieldtype": "Check", 25 | "label": "Disabled" 26 | } 27 | ], 28 | "links": [], 29 | "modified": "2024-07-30 09:54:49.615396", 30 | "modified_by": "Administrator", 31 | "module": "Inn Hotels", 32 | "name": "Inn Group", 33 | "naming_rule": "Set by user", 34 | "owner": "Administrator", 35 | "permissions": [ 36 | { 37 | "create": 1, 38 | "delete": 1, 39 | "email": 1, 40 | "export": 1, 41 | "print": 1, 42 | "read": 1, 43 | "report": 1, 44 | "role": "System Manager", 45 | "share": 1, 46 | "write": 1 47 | }, 48 | { 49 | "create": 1, 50 | "email": 1, 51 | "export": 1, 52 | "print": 1, 53 | "read": 1, 54 | "report": 1, 55 | "role": "Hotel Reservation User", 56 | "share": 1, 57 | "write": 1 58 | }, 59 | { 60 | "create": 1, 61 | "email": 1, 62 | "export": 1, 63 | "print": 1, 64 | "read": 1, 65 | "report": 1, 66 | "role": "Restaurant User", 67 | "share": 1, 68 | "write": 1 69 | }, 70 | { 71 | "create": 1, 72 | "delete": 1, 73 | "email": 1, 74 | "export": 1, 75 | "print": 1, 76 | "read": 1, 77 | "report": 1, 78 | "role": "Hotel Manager", 79 | "share": 1, 80 | "write": 1 81 | } 82 | ], 83 | "quick_entry": 1, 84 | "sort_field": "modified", 85 | "sort_order": "DESC", 86 | "states": [], 87 | "track_changes": 1 88 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_group/inn_group.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnGroup(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_group/test_inn_group.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Group", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Group 13 | () => frappe.tests.make('Inn Group', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_group/test_inn_group.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnGroup(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_guest_booking/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_guest_booking/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_guest_booking/filter.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | 3 | @frappe.whitelist() 4 | def get_room_type_filter(): 5 | pass 6 | 7 | @frappe.whitelist() 8 | def get_bed_type_filter(): 9 | pass 10 | 11 | @frappe.whitelist() 12 | def get_room_rate_filter(): 13 | pass -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_guest_booking/test_inn_guest_booking.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestInnGuestBooking(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_guest_booking_room/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_guest_booking_room/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_guest_booking_room/inn_guest_booking_room.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2024-01-11 10:44:06.702146", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "room_number", 10 | "start_date", 11 | "end_date", 12 | "inn_room_booking" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "inn_room_booking", 17 | "fieldtype": "Link", 18 | "in_list_view": 1, 19 | "label": "Inn Room Booking", 20 | "options": "Inn Room Booking", 21 | "reqd": 1 22 | }, 23 | { 24 | "fetch_from": "inn_room_booking.start", 25 | "fieldname": "start_date", 26 | "fieldtype": "Date", 27 | "in_list_view": 1, 28 | "label": "Start Date", 29 | "read_only": 1 30 | }, 31 | { 32 | "fetch_from": "inn_room_booking.end", 33 | "fieldname": "end_date", 34 | "fieldtype": "Date", 35 | "in_list_view": 1, 36 | "label": "End Date", 37 | "read_only": 1 38 | }, 39 | { 40 | "fetch_from": "inn_room_booking.room_id", 41 | "fieldname": "room_number", 42 | "fieldtype": "Data", 43 | "in_list_view": 1, 44 | "label": "Room Number" 45 | } 46 | ], 47 | "index_web_pages_for_search": 1, 48 | "istable": 1, 49 | "links": [], 50 | "modified": "2024-02-23 10:31:44.205537", 51 | "modified_by": "Administrator", 52 | "module": "Inn Hotels", 53 | "name": "Inn Guest Booking Room", 54 | "owner": "Administrator", 55 | "permissions": [], 56 | "sort_field": "modified", 57 | "sort_order": "DESC", 58 | "states": [] 59 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_guest_booking_room/inn_guest_booking_room.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class InnGuestBookingRoom(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_hotels_setting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_hotels_setting/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_hotels_setting/inn_hotels_setting.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Hotels Setting', { 5 | refresh: function (frm) { 6 | if (frappe.user.has_role('Hotel Manager') || 7 | frappe.user.has_role('Hotel Reservation User') || 8 | frappe.user.has_role('Administrator')) { 9 | frm.add_custom_button(__('Show Supervisor Passcode'), function () { 10 | frappe.call({ 11 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.show_supervisor_passcode', 12 | }); 13 | }); 14 | } 15 | }, 16 | folio_transaction_type_generator: function (frm) { 17 | frappe.call({ 18 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.generate_folio_transaction_type', 19 | }); 20 | }, 21 | bed_type_generator: function (frm) { 22 | frappe.call({ 23 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.generate_bed_type', 24 | }); 25 | }, 26 | room_type_generator: function (frm) { 27 | frappe.call({ 28 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.generate_room_type', 29 | }); 30 | }, 31 | inn_hotels_account_generator: function (frm) { 32 | frappe.confirm(__("This may take a while. Please don't refresh or change the page before the Success or Error Message popped up. Click Yes to continue"), function () { 33 | frappe.call({ 34 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.generate_hotel_account', 35 | }); 36 | }); 37 | }, 38 | test: function () { 39 | frappe.call({ 40 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.generate_supervisor_passcode' 41 | }); 42 | }, 43 | role_generator: function (frm) { 44 | frappe.call({ 45 | method: 'inn.inn_hotels.doctype.inn_hotels_setting.inn_hotels_setting.insert_role' 46 | }); 47 | } 48 | }); 49 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_hotels_setting/test_inn_hotels_setting.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Hotels Setting", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Hotels Setting 13 | () => frappe.tests.make('Inn Hotels Setting', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_hotels_setting/test_inn_hotels_setting.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnHotelsSetting(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_key_card/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_key_card/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_key_card/inn_key_card.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Key Card', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_key_card/test_inn_key_card.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Key Card", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Key Card 13 | () => frappe.tests.make('Inn Key Card', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_key_card/test_inn_key_card.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnKeyCard(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_lost_and_found/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_lost_and_found/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_lost_and_found/inn_lost_and_found.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Lost and Found', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_lost_and_found/inn_lost_and_found.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnLostandFound(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_lost_and_found/test_inn_lost_and_found.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Lost and Found", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Lost and Found 13 | () => frappe.tests.make('Inn Lost and Found', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_lost_and_found/test_inn_lost_and_found.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnLostandFound(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_membership_card/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_membership_card/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_membership_card/inn_membership_card.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Membership Card', { 5 | onload: function (frm) { 6 | generate_card(frm); 7 | }, 8 | refresh: function(frm) { 9 | generate_card(frm); 10 | } 11 | }); 12 | 13 | function generate_card(frm) { 14 | console.log("Called"); 15 | if (frm.doc.__islocal == 1) { 16 | frappe.call({ 17 | method:'inn.inn_hotels.doctype.inn_membership_card.inn_membership_card.get_new_card_data', 18 | callback: (r) => { 19 | frm.set_value('card_number', r.message[0]); 20 | frm.set_value('expiry_date', r.message[1]); 21 | frm.set_value('location_created', r.message[2]); 22 | } 23 | }); 24 | } 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_membership_card/test_inn_membership_card.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Membership Card", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Membership Card 13 | () => frappe.tests.make('Inn Membership Card', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_membership_card/test_inn_membership_card.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnMembershipCard(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_move_room/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_move_room/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_move_room/inn_move_room.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Move Room', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_move_room/test_inn_move_room.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Move Room", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Move Room 13 | () => frappe.tests.make('Inn Move Room', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_move_room/test_inn_move_room.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnMoveRoom(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_package/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package/inn_package.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Package', { 5 | refresh: function(frm) { 6 | 7 | }, 8 | total_pax: function (frm) { 9 | calculate_amount_before_tax(frm); 10 | }, 11 | inn_tax_id: function (frm) { 12 | calculate_amount_before_tax(frm); 13 | }, 14 | total_amount_after_tax: function (frm) { 15 | calculate_amount_before_tax(frm); 16 | } 17 | }); 18 | 19 | function calculate_amount_before_tax(frm) { 20 | if (frm.doc.total_amount_after_tax && frm.doc.inn_tax_id && frm.doc.total_pax) { 21 | frappe.call({ 22 | method: 'inn.inn_hotels.doctype.inn_package.inn_package.calculate_amounts_before_tax', 23 | args: { 24 | amount_after_tax: frm.doc.total_amount_after_tax, 25 | tax_id: frm.doc.inn_tax_id, 26 | total_pax: frm.doc.total_pax 27 | }, 28 | callback: (r) => { 29 | if (r.message) { 30 | console.log(r.message); 31 | frm.set_value('total_amount', r.message[0]); 32 | frm.set_value('amount_per_pax', r.message[1]); 33 | } 34 | } 35 | }) 36 | } 37 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package/test_inn_package.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Package", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Package 13 | () => frappe.tests.make('Inn Package', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package/test_inn_package.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnPackage(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_package_detail/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail/inn_package_detail.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Package Detail', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail/inn_package_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnPackageDetail(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail/test_inn_package_detail.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Package Detail", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Package Detail 13 | () => frappe.tests.make('Inn Package Detail', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail/test_inn_package_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnPackageDetail(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_package_detail_type/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail_type/inn_package_detail_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Package Detail Type', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail_type/inn_package_detail_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "field:package_detail_name", 4 | "creation": "2020-05-04 14:57:14.734029", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "package_detail_name" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "package_detail_name", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Package Detail Name", 17 | "reqd": 1, 18 | "unique": 1 19 | } 20 | ], 21 | "links": [], 22 | "modified": "2024-03-14 11:55:48.751599", 23 | "modified_by": "Administrator", 24 | "module": "Inn Hotels", 25 | "name": "Inn Package Detail Type", 26 | "naming_rule": "By fieldname", 27 | "owner": "Administrator", 28 | "permissions": [ 29 | { 30 | "create": 1, 31 | "delete": 1, 32 | "email": 1, 33 | "export": 1, 34 | "print": 1, 35 | "read": 1, 36 | "report": 1, 37 | "role": "System Manager", 38 | "share": 1, 39 | "write": 1 40 | }, 41 | { 42 | "create": 1, 43 | "email": 1, 44 | "export": 1, 45 | "print": 1, 46 | "read": 1, 47 | "report": 1, 48 | "role": "Hotel Reservation User", 49 | "share": 1, 50 | "write": 1 51 | }, 52 | { 53 | "create": 1, 54 | "delete": 1, 55 | "email": 1, 56 | "export": 1, 57 | "print": 1, 58 | "read": 1, 59 | "report": 1, 60 | "role": "Hotel Manager", 61 | "share": 1, 62 | "write": 1 63 | }, 64 | { 65 | "create": 1, 66 | "delete": 1, 67 | "email": 1, 68 | "export": 1, 69 | "print": 1, 70 | "read": 1, 71 | "report": 1, 72 | "role": "Accounts Manager", 73 | "share": 1, 74 | "write": 1 75 | }, 76 | { 77 | "email": 1, 78 | "export": 1, 79 | "print": 1, 80 | "read": 1, 81 | "report": 1, 82 | "role": "Accounts User", 83 | "share": 1, 84 | "write": 1 85 | } 86 | ], 87 | "quick_entry": 1, 88 | "sort_field": "modified", 89 | "sort_order": "DESC", 90 | "states": [], 91 | "track_changes": 1 92 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail_type/inn_package_detail_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnPackageDetailType(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail_type/test_inn_package_detail_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Package Detail Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Package Detail Type 13 | () => frappe.tests.make('Inn Package Detail Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_package_detail_type/test_inn_package_detail_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnPackageDetailType(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_payment_with_settlement/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_payment_with_settlement/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_payment_with_settlement/inn_payment_with_settlement.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Payment with Settlement', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_payment_with_settlement/inn_payment_with_settlement.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe import _, msgprint, throw 8 | from frappe.model.document import Document 9 | 10 | class InnPaymentwithSettlement(Document): 11 | pass 12 | 13 | @frappe.whitelist() 14 | def get_all_mode_of_payment_settlement(): 15 | payment_list = frappe.get_all('Inn Settlement Settings', fields=['*']) 16 | if payment_list is not None: 17 | return payment_list 18 | else: 19 | frappe.throw(_("There are no Payment defined in Inn Settlement Settings, please define it in Inn Hotels Setting")) 20 | 21 | def get_all_reservation_with_settlement(): 22 | payment_list = get_all_mode_of_payment_settlement() 23 | 24 | # reservation_with_settlement = frappe.get_all('Inn ') -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_payment_with_settlement/inn_payment_with_settlement_list.js: -------------------------------------------------------------------------------- 1 | frappe.listview_settings['Inn Payment with Settlement'] = { 2 | onload: function (listview) { 3 | // listview.page.add_menu_item(__('Check In'), function() { 4 | // 5 | // }); 6 | frappe.call({ 7 | method: 'inn.inn_hotels.doctype.inn_payment_with_settlement.inn_payment_with_settlement.get_all_mode_of_payment_settlement', 8 | callback: (r) => { 9 | 10 | } 11 | }); 12 | } 13 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_payment_with_settlement/test_inn_payment_with_settlement.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Payment with Settlement", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Payment with Settlement 13 | () => frappe.tests.make('Inn Payment with Settlement', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_payment_with_settlement/test_inn_payment_with_settlement.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnPaymentwithSettlement(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_point_of_sale_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_point_of_sale_table/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_point_of_sale_table/inn_point_of_sale_table.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Inn Point Of Sale Table", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_point_of_sale_table/inn_point_of_sale_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:table_name", 5 | "creation": "2024-02-05 14:06:01.644083", 6 | "doctype": "DocType", 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "table_name", 10 | "status", 11 | "pax" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "table_name", 16 | "fieldtype": "Data", 17 | "label": "Table Name", 18 | "unique": 1 19 | }, 20 | { 21 | "fieldname": "status", 22 | "fieldtype": "Select", 23 | "in_list_view": 1, 24 | "label": "Status", 25 | "options": "Empty\nReserved\nOccupied\nUnavailable" 26 | }, 27 | { 28 | "fieldname": "pax", 29 | "fieldtype": "Int", 30 | "label": "Pax", 31 | "non_negative": 1 32 | } 33 | ], 34 | "index_web_pages_for_search": 1, 35 | "links": [], 36 | "modified": "2024-05-22 11:06:18.546300", 37 | "modified_by": "Administrator", 38 | "module": "Inn Hotels", 39 | "name": "Inn Point Of Sale Table", 40 | "naming_rule": "By fieldname", 41 | "owner": "Administrator", 42 | "permissions": [ 43 | { 44 | "create": 1, 45 | "delete": 1, 46 | "email": 1, 47 | "export": 1, 48 | "print": 1, 49 | "read": 1, 50 | "report": 1, 51 | "role": "System Manager", 52 | "share": 1, 53 | "write": 1 54 | }, 55 | { 56 | "email": 1, 57 | "export": 1, 58 | "print": 1, 59 | "read": 1, 60 | "report": 1, 61 | "role": "Restaurant User", 62 | "share": 1, 63 | "write": 1 64 | }, 65 | { 66 | "create": 1, 67 | "delete": 1, 68 | "email": 1, 69 | "export": 1, 70 | "print": 1, 71 | "read": 1, 72 | "report": 1, 73 | "role": "Restaurant Supervisor", 74 | "share": 1, 75 | "write": 1 76 | } 77 | ], 78 | "sort_field": "modified", 79 | "sort_order": "DESC", 80 | "states": [] 81 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_point_of_sale_table/inn_point_of_sale_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | import json 6 | from pathlib import Path 7 | import frappe 8 | from frappe.model.document import Document 9 | 10 | 11 | class InnPointOfSaleTable(Document): 12 | pass 13 | 14 | 15 | def generate_table(): 16 | # not used, why develop specific function when user already can create by themself? 17 | file_loc = Path(__file__).with_name("table_data.json") 18 | with file_loc.open("r") as file: 19 | data = json.load(file) 20 | file.close() 21 | 22 | for table_name in data.table_name: 23 | if frappe.db.exists("Inn Point of Sale Table", table_name): 24 | frappe.msgprint( 25 | f"Table with {table_name} already exist", indicator="yellow") 26 | continue 27 | 28 | doc = frappe.new_doc("Inn Point of Sale Table") 29 | doc.table_name = table_name 30 | doc.status = "Empty" 31 | doc.insert() 32 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_point_of_sale_table/table_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "table_name": [ 3 | "1", 4 | "2", 5 | "3", 6 | "4", 7 | "5", 8 | "6", 9 | "7", 10 | "8", 11 | "9", 12 | "10", 13 | "11", 14 | "12", 15 | "13", 16 | "14", 17 | "15", 18 | "16", 19 | "17", 20 | "18", 21 | "19", 22 | "20", 23 | "Sofa 1", 24 | "Sofa 2", 25 | "Sofa 3", 26 | "Sofa 4", 27 | "Sofa 5", 28 | "Sofa 6", 29 | "Terace 1", 30 | "Terace 2", 31 | "Terace 3", 32 | "Terace 4", 33 | "Gazebo 1", 34 | "Gazebo 2" 35 | ] 36 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_point_of_sale_table/test_inn_point_of_sale_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestInnPointOfSaleTable(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_pos_usage/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage/inn_extended_bill.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | from frappe import utils 3 | 4 | 5 | def extended_bil_extra_data(invoice): 6 | address = frappe.db.get_single_value("Inn Hotels Setting", "address") 7 | if address == "": 8 | address = frappe.get_all("Dynamic Link", filters={"link_doctype": "Company", "link_name": invoice.company,"parenttype":"Address"}, fields=["parent"]) 9 | address = frappe.get_value("Address", filters=address[0].parent, fieldname="address_line1", as_dict=True) 10 | address = address.address_line1 11 | 12 | order_id, transferred_to, table = None, None, None 13 | if frappe.db.exists("Inn POS Usage", {"pos_invoice": invoice.name}): 14 | order_id, transferred_to, table = frappe.get_value("Inn POS Usage", filters={"pos_invoice": invoice.name}, fieldname=["name", "transfer_to_folio", "table"]) 15 | if order_id == None: 16 | order_id = "" 17 | if table == None: 18 | table = "-" 19 | 20 | total_tax = 0 21 | for tax in invoice.taxes: 22 | total_tax += tax.tax_amount 23 | tax_name = frappe.db.get_single_value("Inn Hotels Setting", "tax_name_pos_receipt", True) 24 | if tax_name == "": 25 | tax_name = "Tax & Service" 26 | 27 | remarks = frappe.db.get_single_value("Inn Hotels Setting", "pos_receipt_remarks", True) 28 | 29 | transfered = False 30 | if transferred_to: 31 | transfered = True 32 | 33 | transferred_to = { 34 | "folio_id": transferred_to 35 | } 36 | 37 | return { 38 | "address": address, 39 | "order_id": order_id, 40 | "tax": { 41 | "name": tax_name, 42 | "total": total_tax 43 | }, 44 | "remarks": remarks, 45 | "transferred": transfered, 46 | "transfer_folio": transferred_to, 47 | "table": table 48 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | // frappe.ui.form.on("Inn POS Usage", { 5 | // refresh(frm) { 6 | 7 | // }, 8 | // }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | import frappe 5 | from frappe.model.document import Document 6 | from frappe.model.naming import getseries 7 | from datetime import date 8 | 9 | class InnPOSUsage(Document): 10 | pass 11 | 12 | def autoname(self): 13 | today = date.today() 14 | prefix = f"FB-{today.day}/{today.month}/{today.year}-" 15 | self.name = prefix + getseries(prefix, 4) 16 | 17 | 18 | @frappe.whitelist() 19 | def print_list_order(pos_invoice): 20 | order_dict = frappe.get_last_doc('Inn POS Usage', filters={'pos_invoice': pos_invoice}) 21 | res = { 22 | "name": order_dict.name, 23 | "table": order_dict.table, 24 | "items": order_dict.new_item 25 | } 26 | return res 27 | 28 | @frappe.whitelist() 29 | def get_table_order(pos_invoice): 30 | order_dict = frappe.get_value('POS Invoice', filters={'pos_invoice': pos_invoice}, fields=['new_item']) 31 | order_list = [] 32 | for item in order_dict: 33 | order_list.append(item.item) 34 | 35 | return order_list -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage/test_inn_pos_usage.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestInnPOSUsage(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage_item/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_pos_usage_item/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage_item/inn_pos_usage_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2024-02-13 12:37:13.404550", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "item_name", 10 | "quantity" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "item_name", 15 | "fieldtype": "Data", 16 | "in_list_view": 1, 17 | "label": "Item Name", 18 | "reqd": 1 19 | }, 20 | { 21 | "fieldname": "quantity", 22 | "fieldtype": "Int", 23 | "in_list_view": 1, 24 | "label": "Quantity", 25 | "reqd": 1 26 | } 27 | ], 28 | "index_web_pages_for_search": 1, 29 | "istable": 1, 30 | "links": [], 31 | "modified": "2024-02-13 12:38:42.267641", 32 | "modified_by": "Administrator", 33 | "module": "Inn Hotels", 34 | "name": "Inn POS Usage Item", 35 | "owner": "Administrator", 36 | "permissions": [], 37 | "sort_field": "modified", 38 | "sort_order": "DESC", 39 | "states": [] 40 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_pos_usage_item/inn_pos_usage_item.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class InnPOSUsageItem(Document): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_reservation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_reservation/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_reservation/inn_reservation_card.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | from datetime import date 3 | 4 | 5 | @frappe.whitelist() 6 | def get_card_number_expected_departure(): 7 | today = date.today().isoformat() 8 | data = frappe.db.count("Inn Reservation", {"status": ["=", "In House"], "expected_departure": today}) 9 | 10 | result = { 11 | "value": data, 12 | "fieldtype": "Int", 13 | "route_options": {"expected_departure": today, "status": ["!=", "Finish"]}, 14 | "route": ["inn-reservation"] 15 | } 16 | 17 | return result 18 | 19 | 20 | @frappe.whitelist() 21 | def get_card_number_expected_arrival(): 22 | today = date.today().isoformat() 23 | data = frappe.db.count("Inn Reservation", {"status": ["=", "Reserved"], "expected_arrival": today}) 24 | 25 | result = { 26 | "value": data, 27 | "fieldtype": "Int", 28 | "route_options": {"expected_arrival": today, "status": ["=", "Reserved"]}, 29 | "route": ["inn-reservation"] 30 | } 31 | 32 | return result 33 | 34 | @frappe.whitelist() 35 | def get_card_number_check_out(): 36 | today = date.today().isoformat() 37 | data = frappe.db.count("Inn Reservation", {"status": ["=", "Finish"], "expected_departure": today}) 38 | 39 | result = { 40 | "value": data, 41 | "fieldtype": "Int", 42 | "route_options": {"expected_departure": today, "status": ["=", "Finish"]}, 43 | "route": ["inn-reservation"] 44 | } 45 | 46 | return result -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_reservation/test_inn_reservation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Reservation", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Reservation 13 | () => frappe.tests.make('Inn Reservation', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_reservation/test_inn_reservation.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnReservation(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room/test_inn_room.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room 13 | () => frappe.tests.make('Inn Room', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room/test_inn_room.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoom(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_availability_page/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_availability_page/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_availability_page/inn_room_availability_page.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnRoomAvailabilityPage(Document): 10 | pass 11 | 12 | @frappe.whitelist() 13 | def get_room_availability(room_id, date): 14 | availability = frappe.db.sql( 15 | 'SELECT room_availability ' 16 | 'FROM `tabInn Room Booking` ' 17 | 'WHERE status != "Canceled" ' 18 | 'AND room_id = %s ' 19 | 'AND %s >= start ' 20 | 'AND %s < end', 21 | (room_id, date, date)) 22 | if len(availability) > 0: 23 | return availability 24 | else: 25 | return '' 26 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_availability_page/test_inn_room_availability_page.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room Availability Page", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room Availability Page 13 | () => frappe.tests.make('Inn Room Availability Page', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_availability_page/test_inn_room_availability_page.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoomAvailabilityPage(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_booking/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_booking/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_booking/inn_room_booking.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Room Booking', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_booking/inn_room_card_owner.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | from dateutil.parser import parse 9 | import inn.inn_hotels.doctype.inn_room_booking.inn_room_card_owner_webcard as webcard 10 | 11 | @frappe.whitelist() 12 | def count_all_room(start_date, end_date): 13 | return webcard.count_all_room(start_date, end_date) 14 | 15 | @frappe.whitelist() 16 | def count_sold_room(start_date, end_date): 17 | return webcard.count_sold_room(start_date, end_date)["value"] 18 | 19 | @frappe.whitelist() 20 | def count_available_room(start_date, end_date): 21 | return webcard.count_available_room(start_date, end_date)["value"] 22 | 23 | @frappe.whitelist() 24 | def count_ooo_room(start_date, end_date): 25 | return webcard.count_ooo_room(start_date, end_date)["value"] 26 | 27 | @frappe.whitelist() 28 | def calculate_average_rate(start_date, end_date): 29 | return webcard.calculate_average_rate(start_date, end_date)["value"] 30 | 31 | @frappe.whitelist() 32 | def calculate_total_rate(start_date, end_date): 33 | return webcard.calculate_total_rate(start_date, end_date)["value"] -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_booking/test_inn_room_booking.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room Booking", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room Booking 13 | () => frappe.tests.make('Inn Room Booking', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_booking/test_inn_room_booking.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoomBooking(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_posted/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_charge_posted/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_posted/inn_room_charge_posted.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnRoomChargePosted(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_posting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_charge_posting/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_posting/test_inn_room_charge_posting.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room Charge Posting", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room Charge Posting 13 | () => frappe.tests.make('Inn Room Charge Posting', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_posting/test_inn_room_charge_posting.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoomChargePosting(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_to_be_posted/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_charge_to_be_posted/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_charge_to_be_posted/inn_room_charge_to_be_posted.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnRoomChargeToBePosted(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_rate/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_rate/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_rate/inn_room_rate.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Room Rate', { 5 | final_total_rate_amount: function (frm) { 6 | if (frm.doc.final_breakfast_rate_amount >= 0) { 7 | if (frm.doc.final_breakfast_rate_amount >= frm.doc.final_total_rate_amount) { 8 | frm.set_value('final_total_rate_amount', 0); 9 | frappe.msgprint("Breakfast Rate must be less than Total Rate."); 10 | frappe.validated = false; 11 | } 12 | } 13 | }, 14 | final_breakfast_rate_amount: function(frm) { 15 | if (frm.doc.final_breakfast_rate_amount >= frm.doc.final_total_rate_amount) { 16 | frappe.msgprint("Breakfast Rate must be less than Total Rate."); 17 | frm.set_value('final_breakfast_rate_amount', 0); 18 | frappe.validated = false; 19 | } 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_rate/test_inn_room_rate.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room Rate", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room Rate 13 | () => frappe.tests.make('Inn Room Rate', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_rate/test_inn_room_rate.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoomRate(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_type/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type/inn_room_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Room Type', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type/inn_room_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_import": 1, 4 | "allow_rename": 1, 5 | "autoname": "Prompt", 6 | "creation": "2020-03-02 12:07:05.358146", 7 | "doctype": "DocType", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "description" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "description", 16 | "fieldtype": "Small Text", 17 | "label": "Description" 18 | } 19 | ], 20 | "links": [], 21 | "modified": "2024-03-14 12:01:14.126641", 22 | "modified_by": "Administrator", 23 | "module": "Inn Hotels", 24 | "name": "Inn Room Type", 25 | "naming_rule": "Set by user", 26 | "owner": "Administrator", 27 | "permissions": [ 28 | { 29 | "create": 1, 30 | "delete": 1, 31 | "email": 1, 32 | "export": 1, 33 | "print": 1, 34 | "read": 1, 35 | "report": 1, 36 | "role": "System Manager", 37 | "share": 1, 38 | "write": 1 39 | }, 40 | { 41 | "email": 1, 42 | "export": 1, 43 | "print": 1, 44 | "read": 1, 45 | "report": 1, 46 | "role": "Hotel Reservation User", 47 | "share": 1 48 | }, 49 | { 50 | "create": 1, 51 | "delete": 1, 52 | "email": 1, 53 | "export": 1, 54 | "print": 1, 55 | "read": 1, 56 | "report": 1, 57 | "role": "Hotel Manager", 58 | "share": 1, 59 | "write": 1 60 | }, 61 | { 62 | "email": 1, 63 | "export": 1, 64 | "print": 1, 65 | "read": 1, 66 | "report": 1, 67 | "role": "Housekeeping", 68 | "share": 1 69 | }, 70 | { 71 | "email": 1, 72 | "export": 1, 73 | "print": 1, 74 | "read": 1, 75 | "report": 1, 76 | "role": "Housekeeping Assistant", 77 | "share": 1, 78 | "write": 1 79 | } 80 | ], 81 | "quick_entry": 1, 82 | "sort_field": "modified", 83 | "sort_order": "DESC", 84 | "states": [], 85 | "track_changes": 1 86 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type/inn_room_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnRoomType(Document): 10 | pass 11 | 12 | @frappe.whitelist() 13 | def get_all_room_type(): 14 | list = frappe.get_all('Inn Room Type', fields=['name']) 15 | return list 16 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type/test_inn_room_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room Type 13 | () => frappe.tests.make('Inn Room Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type/test_inn_room_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoomType(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type_availability_page/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_room_type_availability_page/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type_availability_page/inn_room_type_availability_page.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2021-12-13 14:56:29.290179", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "start", 9 | "cb0", 10 | "end", 11 | "sb0", 12 | "search_button", 13 | "sb1", 14 | "html" 15 | ], 16 | "fields": [ 17 | { 18 | "fieldname": "start", 19 | "fieldtype": "Date", 20 | "label": "Start" 21 | }, 22 | { 23 | "fieldname": "cb0", 24 | "fieldtype": "Column Break" 25 | }, 26 | { 27 | "fieldname": "end", 28 | "fieldtype": "Date", 29 | "label": "End" 30 | }, 31 | { 32 | "fieldname": "sb0", 33 | "fieldtype": "Section Break" 34 | }, 35 | { 36 | "fieldname": "search_button", 37 | "fieldtype": "Button", 38 | "label": "Search" 39 | }, 40 | { 41 | "fieldname": "sb1", 42 | "fieldtype": "Section Break" 43 | }, 44 | { 45 | "fieldname": "html", 46 | "fieldtype": "HTML", 47 | "label": "HTML" 48 | } 49 | ], 50 | "issingle": 1, 51 | "links": [], 52 | "modified": "2024-03-14 12:01:54.531304", 53 | "modified_by": "Administrator", 54 | "module": "Inn Hotels", 55 | "name": "Inn Room Type Availability Page", 56 | "owner": "Administrator", 57 | "permissions": [ 58 | { 59 | "create": 1, 60 | "delete": 1, 61 | "email": 1, 62 | "print": 1, 63 | "read": 1, 64 | "role": "System Manager", 65 | "share": 1, 66 | "write": 1 67 | }, 68 | { 69 | "create": 1, 70 | "delete": 1, 71 | "email": 1, 72 | "print": 1, 73 | "read": 1, 74 | "role": "Hotel Reservation User", 75 | "share": 1, 76 | "write": 1 77 | }, 78 | { 79 | "create": 1, 80 | "delete": 1, 81 | "email": 1, 82 | "print": 1, 83 | "read": 1, 84 | "role": "Housekeeping", 85 | "share": 1, 86 | "write": 1 87 | } 88 | ], 89 | "quick_entry": 1, 90 | "sort_field": "modified", 91 | "sort_order": "DESC", 92 | "states": [] 93 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type_availability_page/inn_room_type_availability_page.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnRoomTypeAvailabilityPage(Document): 10 | pass 11 | @frappe.whitelist() 12 | def get_room_type_availability(room_type, date): 13 | print("INI DATE") 14 | print(date) 15 | 16 | default_availability = frappe.db.sql( 17 | 'SELECT count(`name`) ' 18 | 'FROM `tabInn Room` ' 19 | 'WHERE room_type=%s ' 20 | 'group by room_type order by room_type', 21 | (room_type)) 22 | 23 | availability = frappe.db.sql( 24 | 'SELECT count(`tabInn Room Booking`.name) ' 25 | 'FROM `tabInn Room` ' 26 | 'left join `tabInn Room Booking` ' 27 | 'on `tabInn Room Booking`.room_id = `tabInn Room`.name ' 28 | 'WHERE room_type = %s ' 29 | 'AND %s >= start ' 30 | 'AND %s < end ' 31 | 'AND `tabInn Room Booking`.status in (%s, %s) ', 32 | (room_type, date, date, 'Booked', 'Stayed')) 33 | 34 | 35 | if len(default_availability) > 0: 36 | # print("default availability") 37 | # print(int(default_availability)) 38 | # print("availability") 39 | # print(int(availability)) 40 | # final_availability = int(default_availability) - int(availability) 41 | # return final_availability 42 | return default_availability, availability 43 | else: 44 | print("kosonk") 45 | return [0,0] 46 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type_availability_page/test_inn_room_type_availability_page.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Room Type Availability Page", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Room Type Availability Page 13 | () => frappe.tests.make('Inn Room Type Availability Page', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_room_type_availability_page/test_inn_room_type_availability_page.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnRoomTypeAvailabilityPage(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_settlement_settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_settlement_settings/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_settlement_settings/inn_settlement_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Settlement Settings', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_settlement_settings/inn_settlement_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-10-13 16:05:08.243853", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "mode_of_payment", 9 | "account_receiver" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "mode_of_payment", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Mode of Payment", 17 | "options": "Mode of Payment" 18 | }, 19 | { 20 | "fieldname": "account_receiver", 21 | "fieldtype": "Link", 22 | "in_list_view": 1, 23 | "label": "Bank Account Receiver", 24 | "options": "Account" 25 | } 26 | ], 27 | "istable": 1, 28 | "links": [], 29 | "modified": "2023-12-20 15:10:13.991227", 30 | "modified_by": "Administrator", 31 | "module": "Inn Hotels", 32 | "name": "Inn Settlement Settings", 33 | "owner": "Administrator", 34 | "permissions": [], 35 | "quick_entry": 1, 36 | "sort_field": "modified", 37 | "sort_order": "DESC", 38 | "states": [], 39 | "track_changes": 1 40 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_settlement_settings/inn_settlement_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnSettlementSettings(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_settlement_settings/test_inn_settlement_settings.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Settlement Settings", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Settlement Settings 13 | () => frappe.tests.make('Inn Settlement Settings', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_settlement_settings/test_inn_settlement_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnSettlementSettings(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_shift/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_shift/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_shift/test_inn_shift.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Shift", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Shift 13 | () => frappe.tests.make('Inn Shift', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_shift/test_inn_shift.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnShift(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_tax/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_tax/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_tax/inn_tax.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Inn Tax', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | 10 | frappe.ui.form.on('Inn Tax Breakdown', { 11 | breakdown_type: function (frm, cdt, cdn) { 12 | var child = locals[cdt][cdn]; 13 | var br_desc = child.breakdown_description; 14 | var br_type = child.breakdown_type; 15 | if (child.breakdown_rate != undefined) { 16 | br_desc = child.breakdown_rate + "% " + br_type; 17 | } 18 | else if (child.breakdown_actual_amount != undefined) { 19 | br_desc = format_currency(child.breakdown_actual_amount, 'IDR') + " " + br_type; 20 | } 21 | else { 22 | br_desc = br_type; 23 | } 24 | frappe.model.set_value("Inn Tax Breakdown", child.name, "breakdown_description", br_desc); 25 | }, 26 | breakdown_rate: function (frm, cdt, cdn) { 27 | var child = locals[cdt][cdn]; 28 | var br_desc = child.breakdown_description; 29 | var br_type = child.breakdown_type; 30 | if (child.breakdown_rate != undefined) { 31 | br_desc = child.breakdown_rate + "% " + br_type; 32 | } 33 | else { 34 | br_desc = br_type; 35 | } 36 | frappe.model.set_value("Inn Tax Breakdown", child.name, "breakdown_description", br_desc); 37 | }, 38 | breakdown_actual_amount: function (frm, cdt, cdn) { 39 | var child = locals[cdt][cdn]; 40 | var br_desc = child.breakdown_description; 41 | var br_type = child.breakdown_type; 42 | if (child.breakdown_actual_amount != undefined) { 43 | br_desc = format_currency(child.breakdown_actual_amount, 'IDR') + " " + br_type; 44 | } 45 | else { 46 | br_desc = br_type; 47 | } 48 | frappe.model.set_value("Inn Tax Breakdown", child.name, "breakdown_description", br_desc); 49 | } 50 | }); -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_tax/test_inn_tax.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Tax", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Tax 13 | () => frappe.tests.make('Inn Tax', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_tax/test_inn_tax.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnTax(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_tax_breakdown/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_tax_breakdown/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_tax_breakdown/inn_tax_breakdown.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class InnTaxBreakdown(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_void_folio_transaction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/inn_void_folio_transaction/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_void_folio_transaction/test_inn_void_folio_transaction.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Inn Void Folio Transaction", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Inn Void Folio Transaction 13 | () => frappe.tests.make('Inn Void Folio Transaction', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/inn_void_folio_transaction/test_inn_void_folio_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Core Initiative and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestInnVoidFolioTransaction(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/updated/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/doctype/updated/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/updated/test_updated.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023, Core Initiative and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | from frappe.tests.utils import FrappeTestCase 6 | 7 | 8 | class TestUpdated(FrappeTestCase): 9 | pass 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/updated/updated.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Updated', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/updated/updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "prompt", 5 | "creation": "2023-12-20 14:31:17.115393", 6 | "default_view": "List", 7 | "doctype": "DocType", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "testing_section", 12 | "descriptoin" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "testing_section", 17 | "fieldtype": "Section Break", 18 | "label": "Testing" 19 | }, 20 | { 21 | "fieldname": "descriptoin", 22 | "fieldtype": "Small Text", 23 | "label": "Descriptoin" 24 | } 25 | ], 26 | "index_web_pages_for_search": 1, 27 | "links": [], 28 | "modified": "2023-12-20 14:39:57.283242", 29 | "modified_by": "Administrator", 30 | "module": "Inn Hotels", 31 | "name": "Updated", 32 | "name_case": "Title Case", 33 | "naming_rule": "Set by user", 34 | "owner": "Administrator", 35 | "permissions": [ 36 | { 37 | "create": 1, 38 | "delete": 1, 39 | "email": 1, 40 | "export": 1, 41 | "print": 1, 42 | "read": 1, 43 | "report": 1, 44 | "role": "System Manager", 45 | "share": 1, 46 | "write": 1 47 | }, 48 | { 49 | "email": 1, 50 | "export": 1, 51 | "print": 1, 52 | "read": 1, 53 | "report": 1, 54 | "role": "Hotel Reservation User", 55 | "share": 1 56 | } 57 | ], 58 | "quick_entry": 1, 59 | "sort_field": "modified", 60 | "sort_order": "DESC", 61 | "states": [], 62 | "track_changes": 1 63 | } -------------------------------------------------------------------------------- /inn/inn_hotels/doctype/updated/updated.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class Updated(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/arrival/arrival.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#ECAD4B", 3 | "creation": "2024-02-22 13:27:29.372728", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "document_type": "Inn Reservation", 7 | "filters_json": "null", 8 | "function": "Count", 9 | "idx": 0, 10 | "is_public": 1, 11 | "is_standard": 1, 12 | "label": "Arrival", 13 | "method": "inn.inn_hotels.doctype.inn_reservation.inn_reservation_card.get_card_number_expected_arrival", 14 | "modified": "2024-04-16 10:33:44.609348", 15 | "modified_by": "Administrator", 16 | "module": "Inn Hotels", 17 | "name": "Arrival", 18 | "owner": "Administrator", 19 | "report_function": "Sum", 20 | "show_percentage_stats": 1, 21 | "stats_time_interval": "Daily", 22 | "type": "Custom" 23 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/check_out/check_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#EC864B", 4 | "creation": "2023-12-15 13:58:40.548332", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Inn Reservation", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Inn Reservation\",\"status\",\"=\",\"Finish\",false]]", 10 | "function": "Count", 11 | "idx": 1, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Check Out", 15 | "method": "inn.inn_hotels.doctype.inn_reservation.inn_reservation_card.get_card_number_check_out", 16 | "modified": "2024-03-01 13:48:03.407477", 17 | "modified_by": "Administrator", 18 | "module": "Inn Hotels", 19 | "name": "Check Out", 20 | "owner": "Administrator", 21 | "parent_document_type": "", 22 | "report_function": "Sum", 23 | "show_percentage_stats": 1, 24 | "stats_time_interval": "Daily", 25 | "type": "Custom" 26 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/consolidated_order/consolidated_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#449CF0", 4 | "creation": "2024-02-16 13:55:16.388184", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "POS Invoice", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"POS Invoice\",\"status\",\"=\",\"Consolidated\",false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Consolidated Order", 15 | "modified": "2024-02-16 13:57:43.926708", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Consolidated Order", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_hotel_aar_room_sold/inn_hotel_aar_room_sold.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#B4CD29", 3 | "creation": "2024-02-22 14:19:41.547594", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "filters_config": "[{\n fieldname: \"start_date\",\n label: \"Start Date\", \n fieldtype: \"Date\",\n reqd: 1\n}, {\n fieldname: \"end_date\",\n label: \"End Date\",\n fieldtype: \"Date\",\n reqd: 1\n}]", 7 | "filters_json": "{}", 8 | "function": "Count", 9 | "idx": 0, 10 | "is_public": 1, 11 | "is_standard": 1, 12 | "label": "Inn Hotel AAR Room Sold", 13 | "method": "inn.inn_hotels.doctype.inn_room_booking.inn_room_card_owner_webcard.calculate_average_rate", 14 | "modified": "2024-04-05 16:15:42.238957", 15 | "modified_by": "Administrator", 16 | "document_type": "Inn Reservation", 17 | "module": "Inn Hotels", 18 | "name": "Inn Hotel AAR Room Sold", 19 | "owner": "Administrator", 20 | "report_function": "Sum", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Custom" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_hotel_available_room/inn_hotel_available_room.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#4F9DD9", 3 | "creation": "2024-02-22 14:18:15.704194", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "filters_config": "[{\n fieldname: \"start_date\",\n label: \"Start Date\", \n fieldtype: \"Date\",\n reqd: 1\n}, {\n fieldname: \"end_date\",\n label: \"End Date\",\n fieldtype: \"Date\",\n reqd: 1\n}]", 7 | "filters_json": "{}", 8 | "function": "Count", 9 | "idx": 0, 10 | "is_public": 1, 11 | "is_standard": 1, 12 | "label": "Inn Hotel Available Room", 13 | "method": "inn.inn_hotels.doctype.inn_room_booking.inn_room_card_owner_webcard.count_available_room", 14 | "document_type": "Inn Room Booking", 15 | "modified": "2024-04-05 16:14:49.066186", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Inn Hotel Available Room", 19 | "owner": "Administrator", 20 | "report_function": "Sum", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Custom" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_hotel_expected_departure/inn_hotel_expected_departure.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#CB2929", 3 | "creation": "2024-02-22 13:52:41.666131", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "filters_json": "null", 7 | "function": "Count", 8 | "idx": 0, 9 | "is_public": 1, 10 | "is_standard": 1, 11 | "label": "Inn Hotel Expected Departure", 12 | "method": "inn.inn_hotels.doctype.inn_reservation.inn_reservation_card.get_card_number_expected_departure", 13 | "modified": "2024-04-05 16:10:28.355372", 14 | "modified_by": "Administrator", 15 | "document_type": "Inn Reservation", 16 | "module": "Inn Hotels", 17 | "name": "Inn Hotel Expected Departure", 18 | "owner": "Administrator", 19 | "report_function": "Sum", 20 | "show_percentage_stats": 1, 21 | "stats_time_interval": "Daily", 22 | "type": "Custom" 23 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_hotel_out_of_order_room/inn_hotel_out_of_order_room.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#CB2929", 3 | "creation": "2024-02-22 14:19:05.566491", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "filters_config": "[{\n fieldname: \"start_date\",\n label: \"Start Date\", \n fieldtype: \"Date\",\n reqd: 1\n}, {\n fieldname: \"end_date\",\n label: \"End Date\",\n fieldtype: \"Date\",\n reqd: 1\n}]", 7 | "filters_json": "{}", 8 | "function": "Count", 9 | "idx": 0, 10 | "is_public": 1, 11 | "is_standard": 1, 12 | "label": "Inn Hotel Out of Order Room", 13 | "method": "inn.inn_hotels.doctype.inn_room_booking.inn_room_card_owner_webcard.count_ooo_room", 14 | "modified": "2024-04-05 16:14:55.034580", 15 | "modified_by": "Administrator", 16 | "module": "Inn Hotels", 17 | "name": "Inn Hotel Out of Order Room", 18 | "owner": "Administrator", 19 | "document_type": "Inn Room Booking", 20 | "report_function": "Sum", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Custom" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_hotel_total_room_rate_sold/inn_hotel_total_room_rate_sold.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#B4CD29", 3 | "creation": "2024-02-22 14:20:48.773195", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "filters_config": "[{\n fieldname: \"start_date\",\n label: \"Start Date\", \n fieldtype: \"Date\",\n reqd: 1\n}, {\n fieldname: \"end_date\",\n label: \"End Date\",\n fieldtype: \"Date\",\n reqd: 1\n}]", 7 | "filters_json": "{}", 8 | "function": "Count", 9 | "idx": 0, 10 | "is_public": 1, 11 | "is_standard": 1, 12 | "label": "Inn Hotel Total Room Rate Sold", 13 | "method": "inn.inn_hotels.doctype.inn_room_booking.inn_room_card_owner_webcard.calculate_total_rate", 14 | "modified": "2024-04-05 16:15:08.320965", 15 | "modified_by": "Administrator", 16 | "module": "Inn Hotels", 17 | "name": "Inn Hotel Total Room Rate Sold", 18 | "owner": "Administrator", 19 | "document_type": "Inn Reservation", 20 | "report_function": "Sum", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Custom" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_hotel_total_room_sold/inn_hotel_total_room_sold.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#29CD42", 3 | "creation": "2024-02-22 14:09:07.947730", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "filters_config": "[{\n fieldname: \"start_date\",\n label: \"Start Date\", \n fieldtype: \"Date\",\n reqd: 1\n}, {\n fieldname: \"end_date\",\n label: \"End Date\",\n fieldtype: \"Date\",\n reqd: 1\n}]", 7 | "filters_json": "{}", 8 | "function": "Count", 9 | "idx": 0, 10 | "is_public": 1, 11 | "is_standard": 1, 12 | "label": "Inn Hotel Total Room Sold", 13 | "method": "inn.inn_hotels.doctype.inn_room_booking.inn_room_card_owner_webcard.count_sold_room", 14 | "modified": "2024-04-05 16:14:43.235077", 15 | "modified_by": "Administrator", 16 | "module": "Inn Hotels", 17 | "name": "Inn Hotel Total Room Sold", 18 | "owner": "Administrator", 19 | "report_function": "Sum", 20 | "document_type": "Inn Room Booking", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Custom" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_house/inn_house.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#29CD42", 4 | "creation": "2023-12-15 13:57:46.018601", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Inn Reservation", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Inn Reservation\",\"status\",\"=\",\"In House\",false]]", 10 | "function": "Count", 11 | "idx": 2, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Inn House", 15 | "modified": "2023-12-15 14:46:39.724948", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Inn House", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_room_clean/inn_room_clean.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#29CD42", 4 | "creation": "2024-02-15 10:49:01.017490", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Inn Room", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Inn Room\",\"room_status\",\"in\",[\"Vacant Clean\",\"Occupied Clean\",null],false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 0, 13 | "is_standard": 1, 14 | "label": "Inn Room Clean", 15 | "modified": "2024-02-22 19:10:22.680125", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Inn Room Clean", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 0, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_room_dirty/inn_room_dirty.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#ECAD4B", 4 | "creation": "2024-02-22 11:19:08.977767", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Inn Room", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Inn Room\",\"room_status\",\"in\",[\"Vacant Dirty\",\"Occupied Dirty\",null],false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 0, 13 | "is_standard": 1, 14 | "label": "Inn Room Dirty", 15 | "modified": "2024-02-22 19:10:35.593176", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Inn Room Dirty", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 0, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_room_not_available/inn_room_not_available.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#CB2929", 4 | "creation": "2024-02-22 11:20:39.257569", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Inn Room Booking", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Inn Room Booking\",\"room_availability\",\"in\",[\"Out of Order\",\"Under Construction\",null],false],[\"Inn Room Booking\",\"status\",\"!=\",\"Finished\",false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 0, 13 | "is_standard": 1, 14 | "label": "Inn Room Not Available", 15 | "modified": "2024-02-22 19:10:37.708974", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Inn Room Not Available", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 0, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/inn_room_ready/inn_room_ready.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#29CD42", 4 | "creation": "2024-02-22 11:17:21.807333", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "Inn Room", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"Inn Room\",\"room_status\",\"=\",\"Vacant Ready\",false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 0, 13 | "is_standard": 1, 14 | "label": "Inn Room Ready", 15 | "modified": "2024-02-22 19:10:09.233112", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Inn Room Ready", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 0, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/ongoing_order/ongoing_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#ECAD4B", 4 | "creation": "2024-02-16 13:46:42.002657", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "POS Invoice", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"POS Invoice\",\"status\",\"=\",\"Draft\",false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Ongoing Order", 15 | "modified": "2024-02-16 13:46:42.002657", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Ongoing Order", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/returned_order/returned_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#CB2929", 4 | "creation": "2024-02-16 13:55:36.814171", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "POS Invoice", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"POS Invoice\",\"status\",\"=\",\"Return\",false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Returned Order", 15 | "modified": "2024-02-16 13:57:33.433945", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Returned Order", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/room_breakfast/room_breakfast.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "creation": "2024-07-12 10:32:24.155098", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "document_type": "Inn Reservation", 7 | "dynamic_filters_json": "[]", 8 | "filters_json": "[[\"Inn Reservation\",\"status\",\"=\",\"In House\",false],[\"Inn Reservation\",\"nett_actual_breakfast_rate\",\">\",null,false]]", 9 | "function": "Count", 10 | "idx": 0, 11 | "is_public": 1, 12 | "is_standard": 1, 13 | "label": "Room Breakfast", 14 | "modified": "2024-07-12 10:36:33.829189", 15 | "modified_by": "Administrator", 16 | "module": "Inn Hotels", 17 | "name": "Room Breakfast", 18 | "owner": "Administrator", 19 | "parent_document_type": "", 20 | "report_function": "Sum", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Document Type" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/room_only/room_only.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "creation": "2024-07-12 10:28:49.131439", 4 | "docstatus": 0, 5 | "doctype": "Number Card", 6 | "document_type": "Inn Reservation", 7 | "dynamic_filters_json": "[]", 8 | "filters_json": "[[\"Inn Reservation\",\"status\",\"=\",\"In House\",false],[\"Inn Reservation\",\"nett_actual_breakfast_rate\",\"=\",null,false]]", 9 | "function": "Count", 10 | "idx": 0, 11 | "is_public": 1, 12 | "is_standard": 1, 13 | "label": "Room Only", 14 | "modified": "2024-07-12 10:28:49.131439", 15 | "modified_by": "Administrator", 16 | "module": "Inn Hotels", 17 | "name": "Room Only", 18 | "owner": "Administrator", 19 | "parent_document_type": "", 20 | "report_function": "Sum", 21 | "show_percentage_stats": 1, 22 | "stats_time_interval": "Daily", 23 | "type": "Document Type" 24 | } -------------------------------------------------------------------------------- /inn/inn_hotels/number_card/total_order/total_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate_function_based_on": "", 3 | "color": "#29CD42", 4 | "creation": "2024-02-16 13:46:08.644027", 5 | "docstatus": 0, 6 | "doctype": "Number Card", 7 | "document_type": "POS Invoice", 8 | "dynamic_filters_json": "[]", 9 | "filters_json": "[[\"POS Invoice\",\"status\",\"=\",\"Paid\",false]]", 10 | "function": "Count", 11 | "idx": 0, 12 | "is_public": 1, 13 | "is_standard": 1, 14 | "label": "Finished Order", 15 | "modified": "2024-02-16 13:46:54.269887", 16 | "modified_by": "Administrator", 17 | "module": "Inn Hotels", 18 | "name": "Total Order", 19 | "owner": "Administrator", 20 | "parent_document_type": "", 21 | "report_function": "Sum", 22 | "show_percentage_stats": 1, 23 | "stats_time_interval": "Daily", 24 | "type": "Document Type" 25 | } -------------------------------------------------------------------------------- /inn/inn_hotels/page/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/page/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/page/inn_pos_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/page/inn_pos_table/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/page/inn_pos_table/inn_pos_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "content": null, 3 | "creation": "2024-05-21 15:40:15.822907", 4 | "docstatus": 0, 5 | "doctype": "Page", 6 | "idx": 0, 7 | "modified": "2024-05-21 15:40:15.822907", 8 | "modified_by": "Administrator", 9 | "module": "Inn Hotels", 10 | "name": "inn-pos-table", 11 | "owner": "Administrator", 12 | "page_name": "inn-pos-table", 13 | "roles": [], 14 | "script": null, 15 | "standard": "Yes", 16 | "style": null, 17 | "system_page": 0, 18 | "title": "Inn POS Table Monitor" 19 | } -------------------------------------------------------------------------------- /inn/inn_hotels/page/pos_extended/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/page/pos_extended/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/page/pos_extended/pos_extended.json: -------------------------------------------------------------------------------- 1 | { 2 | "content": null, 3 | "creation": "2024-01-31 12:21:34.357359", 4 | "docstatus": 0, 5 | "doctype": "Page", 6 | "idx": 6, 7 | "modified": "2024-03-14 11:18:19.865086", 8 | "modified_by": "Administrator", 9 | "module": "Inn Hotels", 10 | "name": "pos-extended", 11 | "owner": "Administrator", 12 | "page_name": "pos-extended", 13 | "restrict_to_domain": "", 14 | "roles": [ 15 | { 16 | "role": "Accounts User" 17 | }, 18 | { 19 | "role": "Accounts Manager" 20 | }, 21 | { 22 | "role": "Sales User" 23 | }, 24 | { 25 | "role": "Sales Manager" 26 | }, 27 | { 28 | "role": "Restaurant User" 29 | }, 30 | { 31 | "role": "Restaurant Supervisor" 32 | } 33 | ], 34 | "script": null, 35 | "standard": "Yes", 36 | "style": null, 37 | "system_page": 0, 38 | "title": "Point of Sales Extended" 39 | } -------------------------------------------------------------------------------- /inn/inn_hotels/page/pos_extended/pos_extended_pastorderlist.js: -------------------------------------------------------------------------------- 1 | frappe.require(["point-of-sale.bundle.js", "inn-pos.bundle.js"], function () { 2 | 3 | inn.PointOfSale.PosExtendedPastOrderList = class PosExtendedPastOrderList extends erpnext.PointOfSale.PastOrderList { 4 | constructor({ wrapper, events }) { 5 | super({ wrapper, events }); 6 | } 7 | 8 | make_filter_section() { 9 | const me = this; 10 | this.search_field = frappe.ui.form.make_control({ 11 | df: { 12 | label: __('Search'), 13 | fieldtype: 'Data', 14 | placeholder: __('Search by invoice id or customer name') 15 | }, 16 | parent: this.$component.find('.search-field'), 17 | render_input: true, 18 | }); 19 | this.status_field = frappe.ui.form.make_control({ 20 | df: { 21 | label: __('Invoice Status'), 22 | fieldtype: 'Select', 23 | options: `Draft\nPaid\nConsolidated\nReturn`, 24 | placeholder: __('Filter by invoice status'), 25 | onchange: function () { 26 | if (me.$component.is(':visible')) me.refresh_list(); 27 | } 28 | }, 29 | parent: this.$component.find('.status-field'), 30 | render_input: true, 31 | }); 32 | this.search_field.toggle_label(false); 33 | this.status_field.toggle_label(false); 34 | this.status_field.set_value('Draft'); 35 | } 36 | } 37 | }); -------------------------------------------------------------------------------- /inn/inn_hotels/page/pos_extended/pos_extended_payment.js: -------------------------------------------------------------------------------- 1 | frappe.require(["point-of-sale.bundle.js", "inn-pos.bundle.js"], function () { 2 | 3 | inn.PointOfSale.PosExtendedPayment = class PosExtendedPayment extends erpnext.PointOfSale.Payment { 4 | constructor({ wrapper, events, settings }) { 5 | super({ wrapper, events, settings }); 6 | } 7 | 8 | bind_events() { 9 | super.bind_events() 10 | 11 | this.$component.off("click"); 12 | this.$component.on('click', '.submit-order-btn', () => { 13 | const doc = this.events.get_frm().doc; 14 | const items = doc.items; 15 | 16 | // remove the validation of price amount and pay amount 17 | if (!items.length) { 18 | const message = __("You cannot submit empty order."); 19 | frappe.show_alert({ message, indicator: "orange" }); 20 | frappe.utils.play_sound("error"); 21 | return; 22 | } 23 | 24 | this.events.submit_invoice(); 25 | }); 26 | 27 | } 28 | 29 | render_payment_section() { 30 | const doc = this.events.get_frm().doc; 31 | const payments = doc.payments; 32 | for (const p of payments) { 33 | frappe.model 34 | .set_value(p.doctype, p.name, 'amount', 0) 35 | .then(() => this.update_totals_section()) 36 | } 37 | 38 | 39 | this.render_payment_mode_dom(); 40 | this.make_invoice_fields_control(); 41 | this.update_totals_section(); 42 | } 43 | } 44 | }); -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/cash_remittance/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/cash_remittance/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/cashier_report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/cashier_report/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/check_in_receipt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/check_in_receipt/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/dropshipping_format_extende/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/dropshipping_format_extende/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/folio_a/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/folio_a/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/folio_a_commission/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/folio_a_commission/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/folio_a_with_header/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/folio_a_with_header/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/folio_b/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/folio_b/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/folio_c/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/folio_c/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/last_purchase_request_comparison/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/last_purchase_request_comparison/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/pos_extended_bill/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/pos_extended_bill/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/pos_extended_captain_order/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/pos_extended_captain_order/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/pos_extended_captain_order/pos_extended_captain_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "absolute_value": 0, 3 | "align_labels_right": 0, 4 | "creation": "2024-02-13 10:57:02.837376", 5 | "css": ".print-format table, .print-format tr, \n.print-format td, .print-format div, .print-format p {\n\tfont-family: Monospace;\n\tline-height: 200%;\n\tvertical-align: middle;\n}\n@media screen {\n\t.print-format {\n\t\twidth: 4in;\n\t\tpadding: 0.25in;\n\t\tmin-height: 4in;\n\t}\n}\n\n.title {\n text-align: center;\n}\n\n\ninput[type=\"checkbox\"] {\n transform:scale(1.5, 1.5);\n}", 6 | "custom_format": 1, 7 | "default_print_language": "en", 8 | "disabled": 0, 9 | "doc_type": "POS Invoice", 10 | "docstatus": 0, 11 | "doctype": "Print Format", 12 | "font": "Default", 13 | "font_size": 0, 14 | "html": "{% set list = print_list_order(doc.name) %}\n

\n\tORDER: {{list.name}}
\n\tTABLE: {{list.table}}
\n

\n
\n\n
\n

PESANAN

\n
\n\n\t\n\t\t{% for item in list[\"items\"] %}\n\t\t\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\n\t\t{% endfor %}\n\t\n
{{ item.quantity }}{{ item.item_name }}
\n", 15 | "idx": 0, 16 | "line_breaks": 0, 17 | "margin_bottom": 0.0, 18 | "margin_left": 0.0, 19 | "margin_right": 0.0, 20 | "margin_top": 0.0, 21 | "modified": "2024-07-03 10:38:01.155971", 22 | "modified_by": "Administrator", 23 | "module": "Inn Hotels", 24 | "name": "POS Extended Captain Order", 25 | "owner": "Administrator", 26 | "page_number": "Hide", 27 | "print_format_builder": 0, 28 | "print_format_builder_beta": 0, 29 | "print_format_type": "Jinja", 30 | "raw_printing": 0, 31 | "show_section_headings": 0, 32 | "standard": "Yes" 33 | } -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/pos_extended_invoice/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/pos_extended_invoice/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/pos_extended_table_order/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/pos_extended_table_order/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/pos_extended_table_order/pos_extended_table_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "absolute_value": 0, 3 | "align_labels_right": 0, 4 | "creation": "2024-02-13 14:12:57.400528", 5 | "css": ".print-format table, .print-format tr, \n.print-format td, .print-format div, .print-format p {\n\tfont-family: Monospace;\n\tline-height: 200%;\n\tvertical-align: middle;\n}\n@media screen {\n\t.print-format {\n\t\twidth: 4in;\n\t\tpadding: 0.25in;\n\t\tmin-height: 2in;\n\t}\n}", 6 | "custom_format": 1, 7 | "default_print_language": "en", 8 | "disabled": 0, 9 | "doc_type": "POS Invoice", 10 | "docstatus": 0, 11 | "doctype": "Print Format", 12 | "font": "Default", 13 | "font_size": 0, 14 | "html": "{% set list = print_list_order(doc.name) %}\n

\n\tOrder ID: {{doc.name}}
\n\tTable No: {{list.table}}
\n

\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{% for item in list[\"items\"] %}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{% endfor %}\n\t\n
QtyItemServed?
{{ item.quantity }}{{ item.item_name }}[     ]
\n", 15 | "idx": 0, 16 | "line_breaks": 0, 17 | "margin_bottom": 0.0, 18 | "margin_left": 0.0, 19 | "margin_right": 0.0, 20 | "margin_top": 0.0, 21 | "modified": "2024-07-03 10:38:41.607982", 22 | "modified_by": "Administrator", 23 | "module": "Inn Hotels", 24 | "name": "POS Extended Table Order", 25 | "owner": "Administrator", 26 | "page_number": "Hide", 27 | "print_format_builder": 0, 28 | "print_format_builder_beta": 0, 29 | "print_format_type": "Jinja", 30 | "raw_printing": 0, 31 | "show_section_headings": 0, 32 | "standard": "Yes" 33 | } -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/proforma_invoice/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/proforma_invoice/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/proforma_invoice_reservation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/proforma_invoice_reservation/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/print_format/reservation_confirmation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/print_format/reservation_confirmation/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/audit_report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/audit_report/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/audit_report/audit_report.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.query_reports["Audit Report"] = { 5 | "filters": [ 6 | { 7 | fieldname: 'date', 8 | label: __('Date'), 9 | fieldtype: 'Date', 10 | default: frappe.datetime.get_today() 11 | }, 12 | { 13 | fieldname: "fill_mode_payment", 14 | label: __("Fill Mode of Payment"), 15 | fieldtype: "Check", 16 | default: 1 17 | } 18 | ], 19 | "tree": true, 20 | "name_field": "account", 21 | "parent_field": "parent_account", 22 | "initial_depth": 1, 23 | "formatter": function (value, row, column, data, default_formatter) { 24 | value = default_formatter(value, row, column, data) 25 | 26 | if (column.fieldname == "rsv") { 27 | value = `${value}` 28 | } 29 | return value 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /inn/inn_hotels/report/audit_report/audit_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "columns": [], 4 | "creation": "2024-02-23 16:20:11.572330", 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "filters": [], 9 | "idx": 0, 10 | "is_standard": "Yes", 11 | "letterhead": null, 12 | "modified": "2024-07-02 11:42:04.364467", 13 | "modified_by": "Administrator", 14 | "module": "Inn Hotels", 15 | "name": "Audit Report", 16 | "owner": "Administrator", 17 | "prepared_report": 0, 18 | "ref_doctype": "Inn Reservation", 19 | "reference_report": "", 20 | "report_name": "Audit Report", 21 | "report_type": "Script Report", 22 | "roles": [ 23 | { 24 | "role": "System Manager" 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /inn/inn_hotels/report/daily_flash_report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/daily_flash_report/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/daily_flash_report/daily_flash_report.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | /* eslint-disable */ 4 | 5 | frappe.query_reports["Daily Flash Report"] = { 6 | "filters": [ 7 | { 8 | fieldname: 'date', 9 | label: __('Date'), 10 | fieldtype: 'Date', 11 | default: frappe.datetime.get_today() 12 | } 13 | ], 14 | "tree": true, 15 | "name_field": "account", 16 | "parent_field": "parent_account", 17 | "initial_depth": 1, 18 | } 19 | -------------------------------------------------------------------------------- /inn/inn_hotels/report/daily_flash_report/daily_flash_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "creation": "2020-06-23 00:21:39.990407", 4 | "disable_prepared_report": 0, 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "idx": 0, 9 | "is_standard": "Yes", 10 | "modified": "2020-08-03 13:39:25.090517", 11 | "modified_by": "Administrator", 12 | "module": "Inn Hotels", 13 | "name": "Daily Flash Report", 14 | "owner": "Administrator", 15 | "prepared_report": 0, 16 | "ref_doctype": "Inn Room", 17 | "report_name": "Daily Flash Report", 18 | "report_type": "Script Report", 19 | "roles": [ 20 | { 21 | "role": "System Manager" 22 | }, 23 | { 24 | "role": "Hotel Reservation User" 25 | }, 26 | { 27 | "role": "Employee" 28 | }, 29 | { 30 | "role": "Accounts Manager" 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /inn/inn_hotels/report/guest_in_house/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/guest_in_house/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/guest_in_house/guest_in_house.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "creation": "2020-12-22 14:46:38.223267", 4 | "disable_prepared_report": 0, 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "idx": 0, 9 | "is_standard": "Yes", 10 | "modified": "2021-01-11 11:10:17.040617", 11 | "modified_by": "Administrator", 12 | "module": "Inn Hotels", 13 | "name": "GUEST IN HOUSE", 14 | "owner": "Administrator", 15 | "prepared_report": 0, 16 | "query": "Select\n `tabInn Reservation`.name as \"Reservation:Link/Inn Reservation:120\",\n `tabInn Reservation`.status as \"Status:Select/Status:100\",\n `tabInn Reservation`.customer_id as \"Customer:Link/Customer:200\",\n `tabInn Reservation`.actual_room_id as \"Room:Link/Inn Room:100\",\n `tabInn Reservation`.room_type as \"Room Type:Data:100\",\n `tabInn Reservation`.arrival as \"Arrival:Datetime:150\",\n `tabInn Reservation`.departure as \"Departure:Datetime:120\",\n `tabCustomer`.mobile_no as \"Phone:Data:150\"\nFrom\n `tabInn Reservation` Join `tabCustomer` on `tabInn Reservation`.customer_id = `tabCustomer`.name ", 17 | "ref_doctype": "Inn Reservation", 18 | "report_name": "GUEST IN HOUSE", 19 | "report_type": "Query Report", 20 | "roles": [ 21 | { 22 | "role": "System Manager" 23 | }, 24 | { 25 | "role": "Hotel Manager" 26 | }, 27 | { 28 | "role": "Hotel Reservation User" 29 | }, 30 | { 31 | "role": "Employee" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /inn/inn_hotels/report/report_pnl/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/report_pnl/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/report_pnl/report_pnl.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | /* eslint-disable */ 4 | 5 | frappe.query_reports["Report PNL"] = { 6 | "filters": [ 7 | { 8 | fieldname: 'date', 9 | label: __('Date'), 10 | fieldtype: 'Date' 11 | }, 12 | { 13 | fieldname: 'fiscal_year', 14 | label: __('Fiscal Year'), 15 | fieldtype: 'Link', 16 | options: 'Fiscal Year' 17 | }, 18 | ], 19 | "formatter": function(value, row, column, data, default_formatter) { 20 | if (column.fieldname=="account") { 21 | value = data.account; 22 | column.is_tree = true; 23 | } 24 | 25 | value = default_formatter(value, row, column, data); 26 | 27 | if (!data.parent_account) { 28 | value = $(`${value}`); 29 | 30 | var $value = $(value).css("font-weight", "bold"); 31 | if (data.warn_if_negative && data[column.fieldname] < 0) { 32 | $value.addClass("text-danger"); 33 | } 34 | 35 | value = $value.wrap("

").parent().html(); 36 | } 37 | 38 | return value; 39 | }, 40 | "tree": true, 41 | "name_field": "account", 42 | "parent_field": "parent_account", 43 | "initial_depth": 2, 44 | } 45 | -------------------------------------------------------------------------------- /inn/inn_hotels/report/report_pnl/report_pnl.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "creation": "2020-05-02 00:27:50.759152", 4 | "disable_prepared_report": 0, 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "idx": 0, 9 | "is_standard": "Yes", 10 | "modified": "2020-07-27 13:19:44.271962", 11 | "modified_by": "Administrator", 12 | "module": "Inn Hotels", 13 | "name": "Report PNL", 14 | "owner": "Administrator", 15 | "prepared_report": 0, 16 | "ref_doctype": "GL Entry", 17 | "report_name": "Report PNL", 18 | "report_type": "Script Report", 19 | "roles": [ 20 | { 21 | "role": "Accounts User" 22 | }, 23 | { 24 | "role": "Accounts Manager" 25 | }, 26 | { 27 | "role": "Auditor" 28 | }, 29 | { 30 | "role": "Employee" 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_discrepancy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/room_discrepancy/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_discrepancy/room_discrepancy.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | /* eslint-disable */ 4 | 5 | frappe.query_reports["Room Discrepancy"] = { 6 | "filters": [ 7 | 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_discrepancy/room_discrepancy.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "creation": "2020-06-18 06:09:43.287001", 4 | "disable_prepared_report": 0, 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "idx": 0, 9 | "is_standard": "Yes", 10 | "modified": "2020-07-02 14:55:42.599701", 11 | "modified_by": "Administrator", 12 | "module": "Inn Hotels", 13 | "name": "Room Discrepancy", 14 | "owner": "Administrator", 15 | "prepared_report": 0, 16 | "ref_doctype": "Inn Room", 17 | "report_name": "Room Discrepancy", 18 | "report_type": "Script Report", 19 | "roles": [ 20 | { 21 | "role": "System Manager" 22 | }, 23 | { 24 | "role": "Hotel Reservation User" 25 | }, 26 | { 27 | "role": "Housekeeping" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_discrepancy/room_discrepancy.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013, Core Initiative and contributors 2 | # For license information, please see license.txt 3 | 4 | from __future__ import unicode_literals 5 | import frappe 6 | from datetime import datetime 7 | 8 | def execute(filters=None): 9 | columns = [ 10 | { 11 | 'fieldname': 'date', 12 | 'label': 'Date', 13 | 'fieldtype': 'Date', 14 | }, 15 | { 16 | 'fieldname': 'room', 17 | 'label': 'Room', 18 | 'fieldtype': 'Link', 19 | 'options': 'Inn Room', 20 | }, 21 | { 22 | 'fieldname': 'type', 23 | 'label': 'Type', 24 | 'fieldtype': 'Link', 25 | 'options': 'Inn Room Type', 26 | }, 27 | { 28 | 'fieldname': 'system_fo', 29 | 'label': 'System FO', 30 | 'fieldtype': 'Data', 31 | }, 32 | { 33 | 'fieldname': 'actual_hk', 34 | 'label': 'Actual HK', 35 | 'fieldtype': 'Data', 36 | }, 37 | ] 38 | 39 | data = get_data() 40 | 41 | print(data) 42 | 43 | return columns, data 44 | 45 | def get_rooms(): 46 | return frappe.db.sql(""" 47 | select number as room, room_type as type, room_status as system_fo 48 | from `tabInn Room` order by number""", as_dict=True) 49 | 50 | def get_data(): 51 | rooms = get_rooms() 52 | 53 | now = datetime.date(datetime.now()) 54 | for room in rooms: 55 | room['date'] = now 56 | 57 | words = room['system_fo'].split() 58 | letters = [word[0] for word in words] 59 | room['system_fo'] = "".join(letters) 60 | 61 | return rooms -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_occupancy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/report/room_occupancy/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_occupancy/room_occupancy.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024, Core Initiative and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.query_reports["Room Occupancy"] = { 5 | "filters": [ 6 | { 7 | fieldname: "start_date", 8 | label: __("Start Date"), 9 | fieldtype: "Date", 10 | reqd: 1, 11 | on_change(query_report) { 12 | validate_filter(query_report) 13 | } 14 | }, 15 | { 16 | fieldname: "end_date", 17 | label: __("End Date"), 18 | fieldtype: "Date", 19 | reqd: 1, 20 | on_change(query_report) { 21 | validate_filter(query_report) 22 | } 23 | }, 24 | 25 | ] 26 | }; 27 | 28 | 29 | function validate_filter(query_report) { 30 | let { start_date, end_date } = query_report.previous_filters 31 | if (start_date >= end_date) { 32 | query_report.set_filter_value("end_date", "") 33 | frappe.throw(__("End date cannot before start date")) 34 | } 35 | } -------------------------------------------------------------------------------- /inn/inn_hotels/report/room_occupancy/room_occupancy.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "columns": [], 4 | "creation": "2024-07-17 16:11:35.605496", 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "filters": [], 9 | "idx": 0, 10 | "is_standard": "Yes", 11 | "letterhead": null, 12 | "modified": "2024-07-17 17:29:10.090631", 13 | "modified_by": "Administrator", 14 | "module": "Inn Hotels", 15 | "name": "Room Occupancy", 16 | "owner": "Administrator", 17 | "prepared_report": 0, 18 | "ref_doctype": "Inn Room Booking", 19 | "report_name": "Room Occupancy", 20 | "report_type": "Script Report", 21 | "roles": [ 22 | { 23 | "role": "Hotel Reservation User" 24 | }, 25 | { 26 | "role": "Hotel Manager" 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /inn/inn_hotels/web_form/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/web_form/__init__.py -------------------------------------------------------------------------------- /inn/inn_hotels/web_form/room_booking/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/inn_hotels/web_form/room_booking/__init__.py -------------------------------------------------------------------------------- /inn/modules.txt: -------------------------------------------------------------------------------- 1 | Inn Hotels -------------------------------------------------------------------------------- /inn/overrides/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/overrides/__init__.py -------------------------------------------------------------------------------- /inn/overrides/customer.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | from erpnext.selling.doctype.customer.customer import Customer 3 | 4 | 5 | class CustomCustomer(Customer): 6 | def after_insert(self): 7 | if hasattr(super(), "after_insert"): 8 | super().after_insert() 9 | 10 | if not frappe.db.exists("Inn Customer", self.name): 11 | inn_cus = frappe.new_doc("Inn Customer") 12 | inn_cus.customer_name = self.name 13 | inn_cus.insert() 14 | -------------------------------------------------------------------------------- /inn/overrides/erpnext/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/overrides/erpnext/__init__.py -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/overrides/erpnext/accounts/__init__.py -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/pos_closing_entry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/overrides/erpnext/accounts/pos_closing_entry/__init__.py -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/pos_closing_entry/pos_closing_entry.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | import json 3 | 4 | 5 | @frappe.whitelist() 6 | def get_draft_pos_invoice(pos_profile, user): 7 | data = frappe.db.sql( 8 | ''' 9 | select 10 | name, customer, owner 11 | from 12 | `tabPOS Invoice` 13 | where 14 | owner = %s and docstatus = 0 and pos_profile = %s and ifnull(consolidated_invoice, '') = '' 15 | ''', 16 | (user, pos_profile), 17 | as_dict=1 18 | ) 19 | 20 | return data 21 | # owner is user, docstatus is draft 22 | 23 | 24 | @frappe.whitelist() 25 | def overhandle_draft_pos_invoice(pos_invoice, user): 26 | pos_invoice = json.loads(pos_invoice) 27 | print(pos_invoice) 28 | datas = list(filter(lambda d: d["owner"] == user, pos_invoice)) 29 | 30 | for data in datas: 31 | frappe.db.set_value("POS Invoice", data["name"], "owner", "") 32 | 33 | return len(datas) 34 | 35 | 36 | @frappe.whitelist() 37 | def get_overhandled_pos_invoice(pos_profile): 38 | data = frappe.db.sql( 39 | ''' 40 | select name 41 | from `tabPOS Invoice` 42 | where owner = "" and pos_profile = %s and docstatus = 1 and ifnull(consolidated_invoice, '') = '' 43 | ''', 44 | (pos_profile), 45 | as_dict=1 46 | ) 47 | 48 | data = [frappe.get_doc("POS Invoice", d.name).as_dict() for d in data] 49 | 50 | return data 51 | 52 | 53 | @frappe.whitelist() 54 | def take_overhandle_pos_invoice(pos_invoice, user): 55 | pos_invoice = json.loads(pos_invoice) 56 | result = [] 57 | 58 | for data in pos_invoice: 59 | frappe.db.set_value("POS Invoice", data["name"], "owner", user) 60 | result.append(frappe.get_doc("POS Invoice", data["name"]).as_dict()) 61 | 62 | return result 63 | -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/pos_invoice/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/overrides/erpnext/accounts/pos_invoice/__init__.py -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/pos_invoice/pos_invoice.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | 3 | 4 | def before_submit(doc, method=None): 5 | doc.payments = [payment for payment in doc.payments if payment.amount != 0] 6 | -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/purchase_order/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/overrides/erpnext/accounts/purchase_order/__init__.py -------------------------------------------------------------------------------- /inn/overrides/erpnext/accounts/purchase_order/purchase_order.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | 3 | 4 | @frappe.whitelist() 5 | def get_last_purchase_request(item_code): 6 | result = { 7 | "last_purchased_quantity": 0, 8 | "last_purchase_order": "", 9 | "transaction_date": "" 10 | } 11 | if not frappe.db.exists("Item", item_code, cache=True): 12 | return result 13 | 14 | query = f''' 15 | select tpoi.parent as parent, tpoi.qty as qty, tpo.transaction_date as transaction_date 16 | from `tabPurchase Order Item` tpoi 17 | left join `tabPurchase Order` tpo 18 | on tpo.name = tpoi.parent 19 | where tpoi.item_code = '{item_code}' 20 | and tpo.status not in ('Draft', 'Cancelled') 21 | order by tpo.transaction_date desc 22 | limit 1 23 | ''' 24 | 25 | last = frappe.db.sql(query, as_dict=1) 26 | if len(last) == 0: 27 | return result 28 | last = last[0] 29 | 30 | result["last_purchased_quantity"] = last.qty 31 | result["last_purchase_order"] = last.parent 32 | result["transaction_date"] = last.transaction_date 33 | return result 34 | -------------------------------------------------------------------------------- /inn/patches.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/patches.txt -------------------------------------------------------------------------------- /inn/public/.gitignore: -------------------------------------------------------------------------------- 1 | dist -------------------------------------------------------------------------------- /inn/public/css/inn.bundle.scss: -------------------------------------------------------------------------------- 1 | @import "./style.bundle"; 2 | 3 | .pos-card { 4 | background-color: var(--fg-color); 5 | box-shadow: var(--shadow-base); 6 | border-radius: var(--border-radius-md); 7 | } 8 | 9 | .table-section { 10 | @extend .pos-card; 11 | display: flex; 12 | flex-direction: column; 13 | padding: var(--padding-md) var(--padding-lg); 14 | overflow: visible; 15 | margin-top: var(--margin-md); 16 | 17 | > .table-details { 18 | display: flex; 19 | flex-direction:column ; 20 | background-color: var(--fg-color); 21 | 22 | > .header { 23 | display: flex; 24 | margin-bottom: var(--margin-md); 25 | } 26 | } 27 | } 28 | 29 | .table-number { 30 | font-size: var(--text-md); 31 | font-weight: 500; 32 | color: var(--gray-600); 33 | margin-top: auto; 34 | } 35 | 36 | .pointer-no-select { 37 | cursor: pointer; 38 | user-select: none; 39 | } 40 | 41 | .primary-action-pos { 42 | @extend .pointer-no-select; 43 | display: flex; 44 | align-items: center; 45 | justify-content: center; 46 | padding: var(--padding-sm); 47 | margin-top: var(--margin-sm); 48 | border-radius: var(--border-radius-md); 49 | font-size: var(--text-lg); 50 | font-weight: 700; 51 | } 52 | 53 | .print-button-order { 54 | background-color: var(--gray-300); 55 | width: 100%; 56 | color: white; 57 | } 58 | 59 | 60 | .print-order-section{ 61 | display: flex; 62 | column-gap: 1em; 63 | 64 | > .caption-order-btn { 65 | @extend .primary-action-pos; 66 | @extend .print-button-order; 67 | } 68 | 69 | > .table-order-btn { 70 | @extend .primary-action-pos; 71 | @extend .print-button-order; 72 | } 73 | } 74 | 75 | .transfer-btn { 76 | @extend .primary-action-pos; 77 | @extend .print-button-order 78 | } -------------------------------------------------------------------------------- /inn/public/css/style.bundle.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/public/css/style.bundle.scss -------------------------------------------------------------------------------- /inn/public/dist/css-rtl/main.bundle.HZ76Z3LM.css: -------------------------------------------------------------------------------- 1 | nav ul{margin:0;padding:0;list-style:none}nav a{display:block;padding:6px 15px;text-decoration:none} 2 | /*# sourceMappingURL=main.bundle.HZ76Z3LM.css.map */ 3 | -------------------------------------------------------------------------------- /inn/public/dist/css-rtl/main.bundle.HZ76Z3LM.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "sources": ["../../../../../../../../../../../../../../tmp/tmp-76447-b74EcX2q0G5v/inn/inn/public/css/main.bundle.css"], 4 | "sourcesContent": ["nav ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\nnav a {\n display: block;\n padding: 6px 15px;\n text-decoration: none;\n}"], 5 | "mappings": "AAAA,0BAGE,gBAEF,MACE,cANF,iBAQE", 6 | "names": [] 7 | } 8 | -------------------------------------------------------------------------------- /inn/public/dist/css/main.bundle.2GB6FCNV.css: -------------------------------------------------------------------------------- 1 | nav ul{margin:0;padding:0;list-style:none}nav a{display:block;padding:6px 15px;text-decoration:none} 2 | /*# sourceMappingURL=main.bundle.2GB6FCNV.css.map */ 3 | -------------------------------------------------------------------------------- /inn/public/dist/css/main.bundle.2GB6FCNV.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "sources": ["../../../../../../../../../../../../../../tmp/tmp-76447-RXjy2Azs7eTE/inn/inn/public/css/main.bundle.css"], 4 | "sourcesContent": ["nav ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\nnav a {\n display: block;\n padding: 6px 15px;\n text-decoration: none;\n}"], 5 | "mappings": "AAAA,0BAGE,gBAEF,MACE,cANF,iBAQE", 6 | "names": [] 7 | } 8 | -------------------------------------------------------------------------------- /inn/public/js/inn-pos.bundle.js: -------------------------------------------------------------------------------- 1 | import "../../inn_hotels/page/pos_extended/pos_extended_itemcart.js"; 2 | import "../../inn_hotels/page/pos_extended/pos_extended_pastordersummary.js"; 3 | import "../../inn_hotels/page/pos_extended/pos_extended_payment.js"; 4 | import "../../inn_hotels/page/pos_extended/pos_extended_pastorderlist.js"; 5 | -------------------------------------------------------------------------------- /inn/public/js/purchase-order/purchase-order.js: -------------------------------------------------------------------------------- 1 | frappe.ui.form.on("Purchase Order", { 2 | refresh: function (frm) { 3 | if (frm.doc.docstatus === 0) { 4 | frm.add_custom_button( 5 | __("Check Last Purchase"), 6 | async function () { 7 | for (const row of frm.doc.items) { 8 | await get_last_purchase(frm, row) 9 | } 10 | refresh_field("items") 11 | } 12 | ) 13 | } 14 | }, 15 | before_save: async function (frm) { 16 | for (const row of frm.doc.items) { 17 | await get_last_purchase(frm, row) 18 | } 19 | } 20 | }) 21 | 22 | frappe.ui.form.on("Purchase Order Item", { 23 | item_code: async function (frm, cdt, cdn) { 24 | var row = locals[cdt][cdn] 25 | 26 | await get_last_purchase(frm, row) 27 | refresh_field("items") 28 | } 29 | }) 30 | 31 | 32 | async function get_last_purchase(frm, row) { 33 | let result = await frappe.call({ 34 | method: "inn.overrides.erpnext.accounts.purchase_order.purchase_order.get_last_purchase_request", 35 | args: { 36 | item_code: row.item_code 37 | } 38 | }) 39 | result = result.message 40 | row.custom_last_purchased_quantity = result.last_purchased_quantity 41 | row.custom_last_purchase_order = result.last_purchase_order 42 | row.custom_last_purchase_date = result.transaction_date 43 | } -------------------------------------------------------------------------------- /inn/templates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/templates/__init__.py -------------------------------------------------------------------------------- /inn/templates/emails/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | import os 3 | import json 4 | 5 | app = Flask(__name__, template_folder=".") 6 | 7 | @app.route('/') 8 | @app.route('/index') 9 | def index(): 10 | args = { 11 | "customer_name" : "Sigma", 12 | "booking_code": "BAC23", 13 | "start": "02-02-2024", 14 | "end": "03-02-2024", 15 | "number_of_rooms": "2", 16 | "room_type": "Deluxe", 17 | "bed_type": "Single", 18 | "allow_smoking": "0", 19 | "incl_breakfast": "1", 20 | "price": "599000", 21 | "phone_number": "08123123123", 22 | "email": "sigmaapha@gmail.com", 23 | "company": "Hotel Daily Inn" 24 | } 25 | 26 | return render_template(f'booking_email.html', data=args) 27 | 28 | if __name__ == '__main__': 29 | app.run() -------------------------------------------------------------------------------- /inn/templates/pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/core-initiative/front-desk/1432efedefc6ac73bf98873346e05ed5892a86e4/inn/templates/pages/__init__.py -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | License: MIT -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | frappe -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from setuptools import setup, find_packages 3 | import re, ast 4 | 5 | with open('requirements.txt') as f: 6 | install_requires = f.read().strip().split('\n') 7 | 8 | # get version from __version__ variable in inn/__init__.py 9 | _version_re = re.compile(r'__version__\s+=\s+(.*)') 10 | 11 | with open('inn/__init__.py', 'rb') as f: 12 | version = str(ast.literal_eval(_version_re.search( 13 | f.read().decode('utf-8')).group(1))) 14 | 15 | setup( 16 | name='inn', 17 | version=version, 18 | description='Apps for handling hotel business', 19 | author='Core Initiative', 20 | author_email='info@coreinitiative.id', 21 | packages=find_packages(), 22 | zip_safe=False, 23 | include_package_data=True, 24 | install_requires=install_requires 25 | ) 26 | --------------------------------------------------------------------------------