Ana içeriğe geç

laravel-sapb1-toolkit

PHP

SAP Business One Service Layer API için iş mantığı soyutlaması sağlayan kapsamlı bir Laravel paketi. Satış, satın alma, stok ve finans modülleri için Eloquent tarzı 54 model, 110 action sınıfı, 122+ builder sınıfı ve 145+ DTO içerir. Yerel veritabanı senkronizasyonu ve öncelik tabanlı önbellekleme desteği sunar.

Gereksinimler

  • PHP 8.4+
  • Laravel 11.x / 12.x
  • laravel-sapb1 ^1.0

Kurulum

composer require ismaildasci/laravel-sapb1-toolkit
php artisan vendor:publish --tag="sapb1-toolkit-config"

Özellikler

  • • 54 Eloquent tarzı SAP B1 modeli
  • • 110 CRUD action sınıfı
  • • 122+ fluent document builder
  • • 145+ type-safe DTO
  • • 36 SAP B1 enum mapping
  • • 17 iş akışı servis sınıfı
  • • Öncelik tabanlı entity önbellekleme
  • • Yerel veritabanı senkronizasyonu
  • • Soft delete desteği ile sync
  • • Satış, Satın Alma, Stok, Finans, HR modülleri

Eloquent-style Queries

// Query orders like Eloquent
$orders = Order::where('DocTotal', '>', 1000)
    ->with('documentLines')
    ->orderBy('DocDate', 'desc')
    ->get();

// Build documents fluently
$orderData = OrderBuilder::create()
    ->cardCode('C001')
    ->docDate(now())
    ->addLine(fn($line) => $line
        ->itemCode('ITEM001')
        ->quantity(10)
        ->price(99.90)
    )
    ->build();

// Local sync with Artisan
// php artisan sapb1:sync Items
// php artisan sapb1:sync Items --full