Agrowth Livestock

Módulo ganadero para ERPNext: compras, ventas, stock y trazabilidad de ganado.

Install Agrowth Livestock

bench get-app https://github.com/Agrowthapp/agrowth_livestock

Add the Frappe Gems badge to your README

Maintain Agrowth Livestock? Paste this into your README:

[![Listed on Frappe Gems](https://frappegems.com/api/method/frappe_gems.seo.badge?app=Agrowthapp%2Fagrowth_livestock)](https://frappegems.com/gems/apps/Agrowthapp/agrowth_livestock)

About Agrowth Livestock

Agrowth Livestock - App Frappe

Módulo ganadero para ERPNext: compras, ventas, stock y trazabilidad de ganado.

Installation

Requirements

  • ERPNext v15+
  • Frappe Bench installed

Steps

  1. Copy app to bench:

    # On your ERPNext server
    cd /home/frappe/frappe-bench/apps
    git clone  agrowth_livestock
    
  2. Install dependencies:

    cd /home/frappe/frappe-bench
    bench get-app agrowth_livestock
    
  3. Install on site:

    bench --site [your_site] install-app agrowth_livestock
    
  4. Migrate:

    bench --site [your_site] migrate
    

Initial Setup

1. Create Animal Items

In ERPNext, create Items with Item Group = Animales:

  • Bovino - Ternero
  • Bovino - Vaquillona
  • Bovino - Novillo
  • Bovino - Vaca

Set the Tax Category with the corresponding VAT rate.

2. Create Warehouses

Create Warehouses for livestock:

  • Depot Principal
  • Corral A
  • Corral B

3. Create Withholding Profiles

Go to: Configuration > Withholding Profile

Create profiles for different provinces with their IIBB/IIGG rules:

  • Profile Name: e.g., "IIBB - Córdoba"
  • Province: Select province
  • Counterparty Type: Supplier / Customer / Both
  • Active: Checked

Add Rules: - Type: IIBB, IIGG, Sellos, Comisión - Rate (%): Percentage to withhold - Fixed Amount: Or fixed amount instead of rate - Min Base: Minimum base amount to apply - Effective From/To: Validity period

4. Configure Withholding Accounts

In ERPNext, ensure you have the following accounts configured: - Retención IIBB - AC - Retención Ganancias - AC - Retención Sellos - AC

Usage

Create Purchase Settlement (Liquidación de Compra)

  1. Go to: Livestock > Purchase Settlement
  2. Fill in:
    • Company
    • Supplier
    • Date
    • Document Number
    • Warehouse (destination)
    • Province
  3. Add lines with animals:
    • Item
    • Quantity (heads)
    • Average weight (if price per kg)
    • Unit price
  4. Submit

On submit, automatically generates: - Purchase Invoice (draft) - Herd Batch (flock/herd) - Stock Entry (draft)

Create Dispatch (Venta Ganadera)

  1. Go to: Livestock > Dispatch
  2. Choose mode:
    • Full Batch: Select a complete herd batch to sell
    • Mixed: Manually select animals from multiple batches
  3. Fill in:
    • Company
    • Customer
    • Date
    • Warehouse (origin)
    • Province
  4. Submit

On submit, automatically generates: - Sales Invoice (draft) - Stock Entry (Material Issue) (draft) - Updates herd batch status (Sold or deducts quantities)

View Herds

Go to: Livestock > Herd Batch

Shows all active herds with their status.

Create Reclassification (Reclasificación)

Used to change animal category (e.g., ternero → novillo):

  1. Go to: Livestock > Reclassification
  2. Fill in:
    • Company
    • Date
    • Herd Batch (origin)
    • From Item (e.g., Bovino - Ternero)
    • To Item (e.g., Bovino - Novillo)
    • Quantity
    • Reason (optional)
  3. Submit

On submit, automatically generates: - Stock Entry (Repack) - issues fromitem, receipts toitem - Updates herd batch lines

Individual Animal Tracking (Caravanas)

For operations requiring individual animal tracking:

  1. Create Animal (for each head):

    • Go to: Livestock > Animal
    • Fill in:
      • Ear Tag ID (caravan number) - unique
      • Species
      • Sex
      • Category
      • Herd Batch
      • Warehouse
      • Origin (Purchase, Birth, Transfer)
    • Submit

    On submit, automatically creates:

    • Serial No in ERPNext linked to the animal
  2. Record Events:

    • Go to: Livestock > Animal Event
    • Event types: Weighing, Health, Movement, Death, Category Change
    • Events update the animal's current state

| DocTypes Structure

DocType Description
Herd Batch Herd/flock of animals
Herd Batch Line Herd line item
Livestock Settlement Purchase settlement
Livestock Settlement Line Settlement line item
Livestock Dispatch Sales dispatch
Livestock Dispatch Line Dispatch line item
Livestock Reclassification Category change (ternero→novillo)
Animal Individual animal with ear tag (caravana)
Animal Event Event: weighing, health, movement, death
Withholding Profile Withholding profile
Withholding Rule Withholding rule

Workflows

Purchase Flow

Livestock Settlement (Submit)
    │
    ├─► Purchase Invoice (draft)
    ├─► Herd Batch (Active)
    └─► Stock Entry - Material Receipt (draft)

Sale Flow (Full Batch)

Livestock Dispatch - Full Batch (Submit)
    │
    ├─► Sales Invoice (draft)
    ├─► Stock Entry - Material Issue (draft)
    └─► Herd Batch (status = Sold)

Sale Flow (Mixed)

Livestock Dispatch - Mixed (Submit)
    │
    ├─► Sales Invoice (draft)
    ├─► Stock Entry - Material Issue (draft)
    └─► Herd Batch (deduct qty from multiple batches)

Reclassification Flow

Livestock Reclassification (Submit)
    │
    ├─► Stock Entry - Repack (draft)
    │      ├─► Issue: from_item (ternero)
    │      └─► Receipt: to_item (novillo)
    └─► Herd Batch
           ├─► Deduct from_item qty
           └─► Add to_item qty

Development

Regenerate DocTypes

If you modify the JSON files:

bench --site [your_site] migrate

Logs

Logs are located at:

/home/frappe/frappe-bench/logs/

Frontend Integration

This app can be used standalone with ERPNext or integrated with the Agrowth frontend.

Standalone Usage

Use the standard Frappe/ERPNext interface: - Go to: Livestock > [Module] - Create and manage from the backend UI

Agrowth Frontend Integration

The Agrowth frontend (agrowth repo) provides a modern React/Next.js interface that consumes these DocTypes via REST API.

For integration details, APIs, and frontend usage: - Frontend Documentation: Agrowth GANADERIA Module - Frontend Repository: https://github.com/jvan0/agrowth - Integration Status: GANADERIA_INTEGRATIONS.md

APIs Consumed by Frontend

Endpoint DocType Usage
/api/resource/Herd Batch Herd Batch Stock management
/api/resource/Animal Animal Individual animal tracking
/api/resource/Livestock Settlement Settlement Purchase liquidations
/api/resource/Livestock Dispatch Dispatch Sales dispatch
/api/resource/Livestock Movement Movement Stock movements
/api/resource/Livestock Health Health Sanitary events
/api/resource/Livestock Weighing Weighing Weight records

Implementation Status

Stage Feature Status
1 Purchase Settlement + Herd Batch ✅ Done
2 Dispatch (Full/Mixed) ✅ Done
3 Reclassification ✅ Done
4 Animal + Serial No (Caravanas) ✅ Done
5 Withholdings IIBB/IIGG ✅ Done

Version: 0.0.2 Author: Agrowth License: MIT

Related Localization apps for Frappe & ERPNext

  • Wiki — Free and Open Source Wiki built on top of Frappe
  • India Compliance — Simple, yet powerful compliance solutions for Indian businesses
  • Nepal Compliance — Open source ERP for Nepal with HR, Payroll & Accounting compliance, based on ERPNext by Frappe Technologies.
  • Erpnextswiss — ERPNext application for Switzerland-specific use cases
  • Erpnext Germany — ERPNext customizations for German companies
  • Ksa Compliance — KSA Compliance App for KSA E-invoice
  • Zatca Erpgulf — Implementation of Zatca Phase-2 E-Invoicing - for FrappeCLoud
  • Kenya Compliance — KRA eTIMS Tax Compliance Integration This app works to integrate ERPNext with KRA's eTIMS via the Online Sales Control Unit (OSCU) to allow for the sharing of information with the revenue authority.via OSCU with ERPNext