/**
 * This function performs an analysis of account payable transactions.
 *
 * @param transactions List of tuples representing the transactions, where each tuple contains the vendor name (String),
 * the transaction amount (Double), and the payment status (String).
 * @return Dictionary with the following information:
 * - Total payable amount: Sum of the unpaid transaction amounts (Double).
 * - Overdue vendors: List of vendors with unpaid transactions that are overdue (List of String).
 */
fun accountPayableAnalysis(transactions: List<Triple<String, Double, String>>): Map<String, Any> {

    var totalPayableAmount = 0.0
    val overdueVendors = mutableListOf<String>()

    for ((vendor, amount, status) in transactions) {
        if (status != "Paid") {
            totalPayableAmount += amount

            // Check if the transaction is overdue
            if (status != "Overdue") {
                overdueVendors.add(vendor)
            }
        }
    }

    return mapOf("Total payable amount" to totalPayableAmount, "Overdue vendors" to overdueVendors)
}
/**
 * This function performs an analysis of account payable transactions.
 *
 * @param transactions List of tuples representing the transactions, where each tuple contains the vendor name (String),
 * the transaction amount (Double), and the payment status (String).
 * @return Dictionary with the following information:
 * - Total payable amount: Sum of the unpaid transaction amounts (Double).
 * - Overdue vendors: List of vendors with unpaid transactions that are overdue (List of String).
 */
fun accountPayableAnalysis(transactions: List<Triple<String, Double, String>>): Map<String, Any> {
/**
 * This function performs an analysis of account payable transactions.
 *
 * @param transactions List of tuples representing the transactions, where each tuple contains the vendor name (String),
 * the transaction amount (Double), and the payment status (String).
 * @return Dictionary with the following information:
 * - Total payable amount: Sum of the unpaid transaction amounts (Double).
 * - Overdue vendors: List of vendors with unpaid transactions that are overdue (List of String).
 */
fun accountPayableAnalysis(transactions: List<Triple<String, Double, String>>): Map<String, Any> {

    var totalPayableAmount = 0.0
    val overdueVendors = mutableListOf<String>()

    for ((vendor, amount, status) in transactions) {
        if (status != "Paid") {
            totalPayableAmount += amount

            // Check if the transaction is overdue
            if (status != "Overdue") {
                overdueVendors.add(vendor)
            }
        }
    }

    return mapOf("Total payable amount" to totalPayableAmount, "Overdue vendors" to overdueVendors)
}