mirror of
https://github.com/imapsync/imapsync.git
synced 2025-08-03 23:41:52 +02:00
1.498
This commit is contained in:
parent
b62a0dae2a
commit
2ca1ed54cb
21 changed files with 6228 additions and 305 deletions
|
@ -1,16 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: memo,v 1.6 2012/02/24 12:23:38 gilles Exp gilles $
|
||||
# $Id: memo,v 1.9 2012/07/05 20:37:53 gilles Exp gilles $
|
||||
|
||||
|
||||
echo paypal_bilan_tests_invoice
|
||||
paypal_bilan_tests_invoice() {
|
||||
# DID output no diff between paypal_bilan_1.47 and 1.48
|
||||
echo paypal_bilan_todo
|
||||
paypal_bilan_todo() {
|
||||
cat <<EOF
|
||||
http://www.cabinet-antoine.fr/spip.php?article138
|
||||
Si vous réalisez des ventes de biens au profit d\u2019entreprises ressortissantes d\u2019autres états membres de l\u2019Union européenne et si ces ventes sont exonérées de TVA, les factures correspondantes doivent impérativement comporter le numéro de TVA intracommunautaire de vos clients ainsi que la mention : « Exonération de TVA, article 262 ter, I du Code général des impôts ». Là encore, ces factures ne doivent évidemment pas comporter de taux ni de montant de TVA.
|
||||
Si vous fournissez des prestations de services à un client installé dans un autre État membre de l\u2019Union européenne, depuis le 1er janvier 2010, le lieu d\u2019imposition des prestations de services entre entreprises est celui où est situé l\u2019acheteur et non plus celui où est établi le prestataire. En conséquence, en application du système dit de l\u2019autoliquidation de la TVA, vous ne devez plus faire mention de la TVA sur vos factures, mais vous devez indiquer : « Exonération de TVA, article 283-2 du Code général des impôts ».
|
||||
|
||||
|
||||
Hors Europe a un non-assujetti : Article 259 B => prestation hors France pour
|
||||
- Article 259 B-1 Cessions de droits de licences
|
||||
- Article 259 B-4 Prestations des conseillers, ingénieurs dans tous les domaines
|
||||
- Article 259 B-5 Traitement de données et fournitures d information
|
||||
|
||||
Hors Europe : Article 262 => Exoneration
|
||||
- Article 262-1 les livraisons de biens expédiés par le vendeur [...] ainsi que les prestations de services directement liées à l exportation ;
|
||||
- Article 262-2 les livraisons de biens expédiés ou transportés par l acheteur [...] ainsi que les prestations de services directement liées à l exportation.
|
||||
|
||||
Europe a un autre assujetti : Article 262 ter => Exoneration
|
||||
- Article 262 ter-1 sur livraisons de biens expédiés. Question : oeuvre immaterielle, service ?
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
echo paypal_bilan_tests_tva
|
||||
paypal_bilan_tests_tva() {
|
||||
# DID output no diff between paypal_bilan_1.55 and 1.5?
|
||||
(
|
||||
#set -x
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan_1.47 --bnc --debug --debug_invoice --first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' /g/paypal/paypal_201?_??_complet.csv \
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan_1.55 --bnc --debug --debug_invoice --first_in 147 \
|
||||
--avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653' \
|
||||
/g/paypal/paypal_201?_??_complet.csv \
|
||||
> /g/var/paypal_bilan/tests/paypal_invoice.out1 2>&1
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug --debug_invoice --first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' /g/paypal/paypal_201?_??_complet.csv \
|
||||
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug --debug_invoice --first_in 147 \
|
||||
--avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653' \
|
||||
/g/paypal/paypal_201?_??_complet.csv \
|
||||
> /g/var/paypal_bilan/tests/paypal_invoice.out2 2>&1
|
||||
|
||||
echo diff /g/var/paypal_bilan/tests/paypal_invoice.out1 /g/var/paypal_bilan/tests/paypal_invoice.out2
|
||||
diff /g/var/paypal_bilan/tests/paypal_invoice.out1 /g/var/paypal_bilan/tests/paypal_invoice.out2
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
#echo paypal_bilan_tests_invoice
|
||||
paypal_bilan_tests_invoice() {
|
||||
# DID output no diff between paypal_bilan_1.53 and 1.53
|
||||
(
|
||||
#set -x
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan_1.52 --bnc --debug --debug_invoice --first_in 147 \
|
||||
--avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653' \
|
||||
/g/paypal/paypal_201?_??_complet.csv \
|
||||
> /g/var/paypal_bilan/tests/paypal_invoice.out1 2>&1
|
||||
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug --debug_invoice --first_in 147 \
|
||||
--avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653' \
|
||||
/g/paypal/paypal_201?_??_complet.csv \
|
||||
> /g/var/paypal_bilan/tests/paypal_invoice.out2 2>&1
|
||||
|
||||
echo diff /g/var/paypal_bilan/tests/paypal_invoice.out1 /g/var/paypal_bilan/tests/paypal_invoice.out2
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_bilan,v 1.48 2012/04/15 09:24:49 gilles Exp gilles $
|
||||
# $Id: paypal_bilan,v 1.56 2012/07/16 21:57:51 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
@ -13,6 +13,11 @@ use Test::More 'no_plan' ;
|
|||
|
||||
die unless (utf8_supported_charset('ISO-8859-1'));
|
||||
|
||||
my $rcs = '$Id: paypal_bilan,v 1.56 2012/07/16 21:57:51 gilles Exp gilles $ ' ;
|
||||
$rcs =~ m/,v (\d+\.\d+)/ ;
|
||||
my $VERSION = ($1) ? $1: "UNKNOWN" ;
|
||||
|
||||
|
||||
my $total_usd_received = 0 ;
|
||||
my $total_usd_invoice = 0 ;
|
||||
my $total_HT_EUR_exo = 0 ;
|
||||
|
@ -140,7 +145,7 @@ foreach my $invoice ( @invoices_wanted ) {
|
|||
if ( $invoice_sent ) {
|
||||
$invoice_sent{ $invoice }++ ;
|
||||
#build_invoice( $invoice ) ;
|
||||
}else{
|
||||
}elsif( not ( $invoice_canceled{ $invoice } or $invoice_refund{ $invoice } ) ) {
|
||||
$invoice_not_sent{ $invoice }++ ;
|
||||
build_invoice( $invoice ) ;
|
||||
}
|
||||
|
@ -154,6 +159,9 @@ my @invoice_canceled = sort { $a <=> $b } keys( %invoice_canceled ) ;
|
|||
my @invoice_suspended = sort { $a <=> $b } keys( %invoice_suspended ) ;
|
||||
my @invoice_refund = sort { $a <=> $b } keys( %invoice_refund ) ;
|
||||
|
||||
print( "\n", "=" x 60, "\n" ) if $bnc ;
|
||||
|
||||
|
||||
print "USD banque $total_usd_received\n" ;
|
||||
print "USD invoice $total_usd_invoice\n" ;
|
||||
my $total_eur_from_usd ;
|
||||
|
@ -180,9 +188,9 @@ print "EUR total TVA $total_TVA_EUR\n" ;
|
|||
print "EUR total HT sup $total_HT_EUR_sup\n" ;
|
||||
print "EUR total TVA sup $total_TVA_EUR_sup\n" ;
|
||||
print "Nb invoice $nb_invoice ( from $first_invoice_paypal to $last_invoice )\n" ;
|
||||
print "Nb invoice canceled $nb_invoice_canceled @invoice_canceled\n" ;
|
||||
print "Nb invoice suspended $nb_invoice_suspended @invoice_suspended\n" ;
|
||||
print "Nb invoice refund $nb_invoice_refund @invoice_refund\n" ;
|
||||
print "Nb invoice canceled ($nb_invoice_canceled) @invoice_canceled\n" ;
|
||||
print "Nb invoice suspended ($nb_invoice_suspended) @invoice_suspended\n" ;
|
||||
print "Nb invoice refund ($nb_invoice_refund) @invoice_refund\n" ;
|
||||
print "Nb invoice sent $nb_invoice_sent\n" ;
|
||||
print "Have to send invoices @invoice_not_sent\n" if ( @invoice_not_sent ) ;
|
||||
|
||||
|
@ -479,9 +487,10 @@ sub compute_line {
|
|||
$IND_flag = ' IND' if ('imapsync usage' eq $Nom_Option_1 and 'individual' eq $Valeur_Option_1 ) ;
|
||||
my $SUPPORT_flag = '' ;
|
||||
$SUPPORT_flag = ' support' if ( 'imapsync support' eq $Titre_de_l_objet ) ;
|
||||
print "FE $invoice$FR_flag$IND_flag\n" ;
|
||||
#print "FE $invoice$FR_flag$IND_flag\n" ;
|
||||
#printf( "%.2f [EUR %.2f]\n", $Montant, $MontantEUR ) ;
|
||||
print "FE $invoice$FR_flag$IND_flag imapsync$SUPPORT_flag $Nom\n" ;
|
||||
printf( "%.2f [EUR %.2f]\n", $Montant, $MontantEUR ) ;
|
||||
print "[$Date]$FR_flag$IND_flag $MontantEUR $Devise \n" ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -589,7 +598,8 @@ sub build_invoice {
|
|||
$priceTTC,
|
||||
$messageTVAFR,
|
||||
$messageTVAEN,
|
||||
$priceTTCusd
|
||||
$priceTTCusd,
|
||||
$HTorTTC
|
||||
)
|
||||
= tva_stuff( $clientTypeEN, $Pays, $Hors_taxe, $Devise, $Titre_de_l_objet ) ;
|
||||
|
||||
|
@ -600,7 +610,7 @@ sub build_invoice {
|
|||
|
||||
my ( $Nom1 ) = cut( $Nom, 42 ) ;
|
||||
my $tex_variables = qq{
|
||||
%% Begin input from paypal_bilan
|
||||
%% Begin input from paypal_bilan $VERSION
|
||||
\\providecommand{\\invoiceNumber}{$invoice}
|
||||
\\providecommand{\\clientName}{$Nom1}
|
||||
\\providecommand{\\clientEmail}{$De_l_adresse_email}
|
||||
|
@ -610,6 +620,7 @@ sub build_invoice {
|
|||
\\providecommand{\\clientAdrD}{$clientAdrD}
|
||||
\\providecommand{\\clientAdrE}{$clientAdrE}
|
||||
\\providecommand{\\clientAdrF}{$clientAdrF}
|
||||
\\providecommand{\\clientVAT}{}
|
||||
\\providecommand{\\invoiceDate}{$Date}
|
||||
\\providecommand{\\invoiceHour}{$Heure}
|
||||
|
||||
|
@ -623,6 +634,7 @@ sub build_invoice {
|
|||
\\providecommand{\\tvaFR}{$tvaFR}
|
||||
\\providecommand{\\tvaEN}{$tvaEN}
|
||||
\\providecommand{\\priceTVA}{$priceTVA}
|
||||
\\providecommand{\\HTorTTC}{$HTorTTC}
|
||||
\\providecommand{\\priceTTC}{$priceTTC}
|
||||
\\providecommand{\\priceTTCusd}{$priceTTCusd}
|
||||
\\providecommand{\\messageTVAFR}{$messageTVAFR}
|
||||
|
@ -995,6 +1007,7 @@ sub tva_stuff {
|
|||
$priceTTC,
|
||||
$messageTVAFR,
|
||||
$messageTVAEN,
|
||||
$HTorTTC
|
||||
) ;
|
||||
|
||||
if ( ( 'individual' eq $clientTypeEN)
|
||||
|
@ -1008,16 +1021,18 @@ sub tva_stuff {
|
|||
$tvaEN = '';
|
||||
$priceTVA = sprintf('%2.2f', $Hors_taxe/1.196*0.196) ;
|
||||
$priceTTC = sprintf('%2.2f', $Hors_taxe) ;
|
||||
$messageTVAFR = '';
|
||||
$messageTVAEN = '';
|
||||
$HTorTTC = 'TTC' ;
|
||||
$messageTVAFR = '' ;
|
||||
$messageTVAEN = '' ;
|
||||
}else{
|
||||
$priceHT = sprintf('%2.2f', $Hors_taxe) ;
|
||||
$tvaFR = 'néant';
|
||||
$tvaEN = '(none)';
|
||||
$priceTVA = 0 ;
|
||||
$priceTTC = $priceHT;
|
||||
$messageTVAFR = 'Exonération de TVA, article 259 B-1 du Code Général des Impôts';
|
||||
$messageTVAEN = '(VAT tax-exempt, article 259 B-1 French General Tax Code)';
|
||||
$tvaFR = '' ;
|
||||
$tvaEN = '' ;
|
||||
$priceTVA = 'néant (none)' ;
|
||||
$priceTTC = $priceHT ;
|
||||
$HTorTTC = 'HT' ;
|
||||
$messageTVAFR = 'Exonération de TVA, articles 262 1-2 du Code Général des Impôts';
|
||||
$messageTVAEN = '(VAT tax-exempt, articles 262 1-2 French General Tax Code)';
|
||||
}
|
||||
foreach my $price ( $priceHT, $priceTVA, $priceTTC, $priceTTCusd ) {
|
||||
#print "[$price]\n" ;
|
||||
|
@ -1031,7 +1046,8 @@ sub tva_stuff {
|
|||
$priceTTC,
|
||||
$messageTVAFR,
|
||||
$messageTVAEN,
|
||||
$priceTTCusd
|
||||
$priceTTCusd,
|
||||
$HTorTTC
|
||||
) ;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_bilan,v 1.47 2012/02/24 12:22:05 gilles Exp gilles $
|
||||
# $Id: paypal_bilan,v 1.55 2012/07/16 19:33:46 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
@ -13,6 +13,11 @@ use Test::More 'no_plan' ;
|
|||
|
||||
die unless (utf8_supported_charset('ISO-8859-1'));
|
||||
|
||||
my $rcs = '$Id: paypal_bilan,v 1.55 2012/07/16 19:33:46 gilles Exp gilles $ ' ;
|
||||
$rcs =~ m/,v (\d+\.\d+)/ ;
|
||||
my $VERSION = ($1) ? $1: "UNKNOWN" ;
|
||||
|
||||
|
||||
my $total_usd_received = 0 ;
|
||||
my $total_usd_invoice = 0 ;
|
||||
my $total_HT_EUR_exo = 0 ;
|
||||
|
@ -140,7 +145,7 @@ foreach my $invoice ( @invoices_wanted ) {
|
|||
if ( $invoice_sent ) {
|
||||
$invoice_sent{ $invoice }++ ;
|
||||
#build_invoice( $invoice ) ;
|
||||
}else{
|
||||
}elsif( not ( $invoice_canceled{ $invoice } or $invoice_refund{ $invoice } ) ) {
|
||||
$invoice_not_sent{ $invoice }++ ;
|
||||
build_invoice( $invoice ) ;
|
||||
}
|
||||
|
@ -154,6 +159,9 @@ my @invoice_canceled = sort { $a <=> $b } keys( %invoice_canceled ) ;
|
|||
my @invoice_suspended = sort { $a <=> $b } keys( %invoice_suspended ) ;
|
||||
my @invoice_refund = sort { $a <=> $b } keys( %invoice_refund ) ;
|
||||
|
||||
print( "\n", "=" x 60, "\n" ) if $bnc ;
|
||||
|
||||
|
||||
print "USD banque $total_usd_received\n" ;
|
||||
print "USD invoice $total_usd_invoice\n" ;
|
||||
my $total_eur_from_usd ;
|
||||
|
@ -180,9 +188,9 @@ print "EUR total TVA $total_TVA_EUR\n" ;
|
|||
print "EUR total HT sup $total_HT_EUR_sup\n" ;
|
||||
print "EUR total TVA sup $total_TVA_EUR_sup\n" ;
|
||||
print "Nb invoice $nb_invoice ( from $first_invoice_paypal to $last_invoice )\n" ;
|
||||
print "Nb invoice canceled $nb_invoice_canceled @invoice_canceled\n" ;
|
||||
print "Nb invoice suspended $nb_invoice_suspended @invoice_suspended\n" ;
|
||||
print "Nb invoice refund $nb_invoice_refund @invoice_refund\n" ;
|
||||
print "Nb invoice canceled ($nb_invoice_canceled) @invoice_canceled\n" ;
|
||||
print "Nb invoice suspended ($nb_invoice_suspended) @invoice_suspended\n" ;
|
||||
print "Nb invoice refund ($nb_invoice_refund) @invoice_refund\n" ;
|
||||
print "Nb invoice sent $nb_invoice_sent\n" ;
|
||||
print "Have to send invoices @invoice_not_sent\n" if ( @invoice_not_sent ) ;
|
||||
|
||||
|
@ -477,9 +485,12 @@ sub compute_line {
|
|||
$FR_flag = ' FR' if $Pays eq 'France' ;
|
||||
my $IND_flag = '' ;
|
||||
$IND_flag = ' IND' if ('imapsync usage' eq $Nom_Option_1 and 'individual' eq $Valeur_Option_1 ) ;
|
||||
print "FE $invoice$FR_flag$IND_flag\n" ;
|
||||
print "FE $invoice$FR_flag$IND_flag imapsync $Nom\n" ;
|
||||
printf( "%.2f [EUR %.2f]\n", $Montant, $MontantEUR ) ;
|
||||
my $SUPPORT_flag = '' ;
|
||||
$SUPPORT_flag = ' support' if ( 'imapsync support' eq $Titre_de_l_objet ) ;
|
||||
#print "FE $invoice$FR_flag$IND_flag\n" ;
|
||||
#printf( "%.2f [EUR %.2f]\n", $Montant, $MontantEUR ) ;
|
||||
print "FE $invoice$FR_flag$IND_flag imapsync$SUPPORT_flag $Nom\n" ;
|
||||
print "[$Date]$FR_flag$IND_flag $MontantEUR $Devise \n" ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -587,7 +598,8 @@ sub build_invoice {
|
|||
$priceTTC,
|
||||
$messageTVAFR,
|
||||
$messageTVAEN,
|
||||
$priceTTCusd
|
||||
$priceTTCusd,
|
||||
$HTorTTC
|
||||
)
|
||||
= tva_stuff( $clientTypeEN, $Pays, $Hors_taxe, $Devise, $Titre_de_l_objet ) ;
|
||||
|
||||
|
@ -598,7 +610,7 @@ sub build_invoice {
|
|||
|
||||
my ( $Nom1 ) = cut( $Nom, 42 ) ;
|
||||
my $tex_variables = qq{
|
||||
%% Begin input from paypal_bilan
|
||||
%% Begin input from paypal_bilan $VERSION
|
||||
\\providecommand{\\invoiceNumber}{$invoice}
|
||||
\\providecommand{\\clientName}{$Nom1}
|
||||
\\providecommand{\\clientEmail}{$De_l_adresse_email}
|
||||
|
@ -621,6 +633,7 @@ sub build_invoice {
|
|||
\\providecommand{\\tvaFR}{$tvaFR}
|
||||
\\providecommand{\\tvaEN}{$tvaEN}
|
||||
\\providecommand{\\priceTVA}{$priceTVA}
|
||||
\\providecommand{\\HTorTTC}{$HTorTTC}
|
||||
\\providecommand{\\priceTTC}{$priceTTC}
|
||||
\\providecommand{\\priceTTCusd}{$priceTTCusd}
|
||||
\\providecommand{\\messageTVAFR}{$messageTVAFR}
|
||||
|
@ -993,6 +1006,7 @@ sub tva_stuff {
|
|||
$priceTTC,
|
||||
$messageTVAFR,
|
||||
$messageTVAEN,
|
||||
$HTorTTC
|
||||
) ;
|
||||
|
||||
if ( ( 'individual' eq $clientTypeEN)
|
||||
|
@ -1006,16 +1020,18 @@ sub tva_stuff {
|
|||
$tvaEN = '';
|
||||
$priceTVA = sprintf('%2.2f', $Hors_taxe/1.196*0.196) ;
|
||||
$priceTTC = sprintf('%2.2f', $Hors_taxe) ;
|
||||
$messageTVAFR = '';
|
||||
$messageTVAEN = '';
|
||||
$HTorTTC = 'TTC' ;
|
||||
$messageTVAFR = '' ;
|
||||
$messageTVAEN = '' ;
|
||||
}else{
|
||||
$priceHT = sprintf('%2.2f', $Hors_taxe) ;
|
||||
$tvaFR = 'néant';
|
||||
$tvaEN = '(none)';
|
||||
$priceTVA = 0 ;
|
||||
$priceTTC = $priceHT;
|
||||
$messageTVAFR = 'Exonération de TVA, article 259 B-1 du Code Général des Impôts';
|
||||
$messageTVAEN = '(VAT tax-exempt, article 259 B-1 French General Tax Code)';
|
||||
$tvaFR = '' ;
|
||||
$tvaEN = '' ;
|
||||
$priceTVA = 'néant (none)' ;
|
||||
$priceTTC = $priceHT ;
|
||||
$HTorTTC = 'HT' ;
|
||||
$messageTVAFR = 'Exonération de TVA, articles 262 1-2 du Code Général des Impôts';
|
||||
$messageTVAEN = '(VAT tax-exempt, articles 262 1-2 French General Tax Code)';
|
||||
}
|
||||
foreach my $price ( $priceHT, $priceTVA, $priceTTC, $priceTTCusd ) {
|
||||
#print "[$price]\n" ;
|
||||
|
@ -1029,7 +1045,8 @@ sub tva_stuff {
|
|||
$priceTTC,
|
||||
$messageTVAFR,
|
||||
$messageTVAEN,
|
||||
$priceTTCusd
|
||||
$priceTTCusd,
|
||||
$HTorTTC
|
||||
) ;
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: paypal_build_invoices,v 1.29 2012/04/13 10:42:44 gilles Exp gilles $
|
||||
# $Id: paypal_build_invoices,v 1.34 2012/07/16 14:00:28 gilles Exp gilles $
|
||||
|
||||
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
|
||||
|
||||
|
@ -25,7 +25,10 @@ set -x
|
|||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1335 /g/paypal/paypal_2012_01_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1417 /g/paypal/paypal_2012_02_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1508 /g/paypal/paypal_2012_03_complet.csv
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1575 /g/paypal/paypal_2012_04_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1575 /g/paypal/paypal_2012_04_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1654 /g/paypal/paypal_2012_05_complet.csv
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1743 /g/paypal/paypal_2012_06_complet.csv
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1824 /g/paypal/paypal_2012_07_complet.csv
|
||||
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv
|
||||
|
@ -37,29 +40,32 @@ set -x
|
|||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 733 --usdeur 1.4395 /g/paypal/paypal_2011_06_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 824 --usdeur 1.4496 /g/paypal/paypal_2011_07_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 917 --usdeur 1.4397 /g/paypal/paypal_2011_08_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1094 --usdeur 1.4380 /g/paypal/paypal_2011_10_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1185 --usdeur 1.3387 /g/paypal/paypal_2011_11_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1263 --usdeur 1.3856 /g/paypal/paypal_2011_12_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1335 /g/paypal/paypal_2012_01_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 999 --usdeur 1.4380 /g/paypal/paypal_2011_09_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1094 --usdeur 1.3387 /g/paypal/paypal_2011_10_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1185 --usdeur 1.3856 /g/paypal/paypal_2011_11_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1263 --usdeur 1.3438 /g/paypal/paypal_2011_12_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1335 --usdeur 1.2952 /g/paypal/paypal_2012_01_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1417 /g/paypal/paypal_2012_02_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1508 /g/paypal/paypal_2012_03_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1575 /g/paypal/paypal_2012_04_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1654 /g/paypal/paypal_2012_05_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1743 /g/paypal/paypal_2012_06_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1824 /g/paypal/paypal_2012_07_complet.csv
|
||||
|
||||
set +x
|
||||
|
||||
# La totale
|
||||
|
||||
: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653' \
|
||||
/g/paypal/paypal_201?_??_complet.csv
|
||||
|
||||
: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653' \
|
||||
/g/paypal/paypal_201?_??_complet.csv
|
||||
|
||||
echo 'sh paypal_build_invoices /g/var/paypal_invoices/1???'
|
||||
|
||||
|
||||
|
||||
# USD de 147 à 340
|
||||
# EUR de 341 à ...
|
||||
|
||||
|
@ -67,43 +73,6 @@ echo 'sh paypal_build_invoices /g/var/paypal_invoices/1???'
|
|||
# 20110412 Found problems with 189 199 242 249 258 263 359 382 537
|
||||
# cen cen JAP cen cen cen cen TCH JAP
|
||||
# cen
|
||||
# 155 TVA 1,89
|
||||
# 171 TVA 4,42
|
||||
# 220 TVA 3,16
|
||||
# 225 TVA 3,16
|
||||
# 236 TVA 4,42
|
||||
# 298 TVA 3,16
|
||||
# 307 TVA 4,42
|
||||
# 312 TVA 4,42
|
||||
# 324 TVA 4,42
|
||||
# 351 TVA 4,92
|
||||
# 395 TVA 4,92
|
||||
# 408 TVA 4,92
|
||||
# 419 TVA 4,92
|
||||
# 432 TVA 4,92
|
||||
# 435 TVA 4,92
|
||||
# 452 TVA 4,92
|
||||
# 460 TVA 4,92
|
||||
# 461 TVA 4,92
|
||||
# 463 TVA 4,92
|
||||
# 464 TVA 4,92
|
||||
# 475 TVA 4,92
|
||||
# 487 TVA 4,92
|
||||
# 489 TVA 4,92
|
||||
# 502 TVA 4,92
|
||||
# 504 TVA 4,92
|
||||
# 511 TVA 4,92
|
||||
# 522 TVA 4,92
|
||||
# 523 TVA 4,92
|
||||
# 533 TVA 4,92
|
||||
# 537 TVA 4,92
|
||||
# 540 TVA 4,92
|
||||
# 543 TVA 4,92
|
||||
# 549 TVA 4,92
|
||||
# 551 TVA 4,92
|
||||
# 552 TVA 4,92
|
||||
# 556 TVA 4,92
|
||||
# 563 TVA 4,92
|
||||
|
||||
for d in "$@"; do
|
||||
echo "==== $d ===="
|
||||
|
@ -118,7 +87,7 @@ for d in "$@"; do
|
|||
rm -f facture_imapsync-$bd.tex
|
||||
cp -f ../facture_imapsync-000.tex facture_imapsync-$bd.tex
|
||||
|
||||
if ! pdflatex facture_imapsync-$bd.tex < /dev/null > /dev/null; then
|
||||
if { ! pdflatex facture_imapsync-$bd.tex < /dev/null > /dev/null || test -f facture_imapsync-${bd}_good.tex ; } then
|
||||
echo "PB $bd"
|
||||
if test -f facture_imapsync-${bd}_good.tex \
|
||||
&& pdflatex facture_imapsync-${bd}_good.tex < /dev/null > /dev/null
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_build_reply,v 1.17 2011/12/07 23:47:03 gilles Exp gilles $
|
||||
# $Id: paypal_build_reply,v 1.19 2012/04/30 22:57:04 gilles Exp gilles $
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
@ -11,7 +11,7 @@ my ($amount, $name, $email);
|
|||
my (
|
||||
$paypal_line, $paypal_info,
|
||||
$buyer, $description, $object,
|
||||
$url_source, $url_exe, $url, $release, $release_exe,
|
||||
$url, $release, $release_exe,
|
||||
);
|
||||
|
||||
my $help ;
|
||||
|
@ -52,8 +52,6 @@ while(<>) {
|
|||
$release = firstline( '/g/public_html/imapsync/VERSION' ) ;
|
||||
$release_exe = firstline( '/g/public_html/imapsync/VERSION_EXE' ) ;
|
||||
my $path_last = firstline( '/g/public_html/imapsync/dist/path_last.txt' ) ;
|
||||
$url_source = firstline( '/g/var/paypal_reply/url_source' ) ;
|
||||
$url_exe = firstline( '/g/var/paypal_reply/url_exe' ) ;
|
||||
|
||||
$url = "http://ks.lamiral.info/imapsync/dist/$path_last/" ;
|
||||
|
||||
|
@ -99,7 +97,7 @@ while(<>) {
|
|||
|
||||
my $address = 'gilles.lamiral@laposte.net';
|
||||
my $address2 = 'gilles@lamiral.info';
|
||||
my $rcstag = '$Id: paypal_build_reply,v 1.17 2011/12/07 23:47:03 gilles Exp gilles $';
|
||||
my $rcstag = '$Id: paypal_build_reply,v 1.19 2012/04/30 22:57:04 gilles Exp gilles $';
|
||||
|
||||
my $download_info = "You will find the latest imapsync.exe binary (release $release_exe)
|
||||
and the latest imapsync source code (release $release) at the following link:
|
||||
|
@ -147,7 +145,7 @@ my $subject_support = "[imapsync support] imapsync release $release [$email]" ;
|
|||
my $subject ;
|
||||
|
||||
my $text ;
|
||||
if ( 'imapsync support' eq $object ) {
|
||||
if ( $object =~ m{imapsync support} ) {
|
||||
$text = $text_support ;
|
||||
$subject = $subject_support ;
|
||||
}else{
|
||||
|
@ -194,7 +192,7 @@ EOM
|
|||
|
||||
|
||||
print $message;
|
||||
#print "[$amount] [$name] [$email] [$paypal_line] [$object]\n";
|
||||
$debug and print "[$amount] [$name] [$email] [$paypal_line] [$object]\n";
|
||||
|
||||
|
||||
sub firstline {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: paypal_functions,v 1.18 2011/12/02 01:56:55 gilles Exp gilles $
|
||||
# $Id: paypal_functions,v 1.19 2012/04/17 12:05:32 gilles Exp gilles $
|
||||
|
||||
paypal_prerequisites() {
|
||||
perl -mMIME::Lite -e '' || echo 'sudo aptitude install libmime-lite-perl'
|
||||
|
@ -105,9 +105,9 @@ convert_utf8() {
|
|||
|
||||
|
||||
troncate_last_2_chars() {
|
||||
length=`expr length "$1"`
|
||||
length_2=`expr $length - 2`
|
||||
expr substr "$1" 1 $length_2
|
||||
length=`expr length "$1"`
|
||||
length_2=`expr $length - 2`
|
||||
expr substr "$1" 1 $length_2
|
||||
|
||||
}
|
||||
|
||||
|
@ -115,16 +115,17 @@ build_reply() {
|
|||
mkdir -p $tmpdir/msg_reply/
|
||||
test -z "`ls $tmpdir/msg_out/`" && echo no mail && return
|
||||
for f in $tmpdir/msg_out_utf8/*/*.txt; do
|
||||
echo "$f"
|
||||
#echo "$f"
|
||||
d=`dirname "$f"`
|
||||
bd=`basename "$d"`
|
||||
file_id=`troncate_last_2_chars $bd`
|
||||
d_reply="$tmpdir/msg_reply/$file_id"
|
||||
test -f "$d_reply/$file_id.txt" && continue
|
||||
test -s "$d_reply/$file_id.txt" && continue
|
||||
mkdir -p "$d_reply"
|
||||
echo building "$d_reply/$file_id.txt"
|
||||
echo paypal_build_reply "$f" "$tmpdir/msg_id/$file_id"
|
||||
paypal_build_reply "$f" "$tmpdir/msg_id/$file_id" > "$d_reply/$file_id.txt"
|
||||
test -s "$d_reply/$file_id.txt" || rm "$d_reply/$file_id.txt"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue